Highchart - tooltip for legends

a 夏天 提交于 2019-12-30 07:16:20

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/10225896/highchart-tooltip-for-legends

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!