max*_*ide 4 jquery tooltip labels highcharts axis-labels
如何在highcharts中的x轴标签上添加工具提示?
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas'],
labels: {
x: 5,
useHTML: true,
formatter: function () {
return categoryImgs[this.value];
}
}
}
Run Code Online (Sandbox Code Playgroud)
目前,工具提示仅显示在图表中的点上,我希望用户在悬停在x轴上的标签上时也能看到工具提示/自定义描述.那可能吗?谢谢
通常,Highcharts不支持标签上的工具提示.
但是你有两个解决方案:
Custom-events插件,在标签上添加事件:https://www.highcharts.com/products/plugin-registry/single/15/Custom-Events(演示有点击,鼠标悬停应该工作相同,以显示自定义工具提示)| 归档时间: |
|
| 查看次数: |
8629 次 |
| 最近记录: |