Sandy
Sandy

Reputation: 1053

Highchart - tooltip for legends

I am using highcharts to represent data. In my chart based on conditions some series are disabled.

Is there any way to remove the legend itemhoverstyle property for disabled series?

Is there any way to add a tooltip to the legend items?

Upvotes: 3

Views: 5090

Answers (1)

Ricardo Lohmann
Ricardo Lohmann

Reputation: 26320

You can remove the serie from the legend:

series:[{
    name: 'serie1',
    type: 'line',
    data: yourArrayOfData,
    showInLegend: false
}]

If you want to change the css on hovering you'll have to change this highcharts-legend style.

To add a tooltip to the legend do something like the following example:
Link

Upvotes: 4

Related Questions