Vega Line Chart add tooltip

Viewed 148

Could anyone help to add a tooltip to my Line Chart example?

I tried to add something like but no luck

 tooltip: [
    { field: 'x', type: 'quantitative' },
    { field: 'y', type: 'quantitative' },
    { field: 'c', type: 'quantitative' },
 ],

Docs from vega lite does not provide any working example for Line chart.

Install of vega-tooltip does not help as well

My spec at Vega Lite Editor

1 Answers

Add the following line to the update section in your line mark:

"tooltip": {"signal": "datum"}

Editor link

Related