Highchart - 图例的工具提示 [英] Highchart - tooltip for legends

查看:162
本文介绍了Highchart - 图例的工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用highcharts来表示数据。在我的图表基于条件一些系列被禁用。

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

是否有任何方法删除禁用系列的 itemhoverstyle 属性?

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?

推荐答案

删除图例中的系列

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

如果要更改悬停时的css,则必须更改此highcharts-legend样式。

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

这篇关于Highchart - 图例的工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆