'Vega Line Chart add tooltip

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



Solution 1:[1]

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

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

Editor link

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David