我正在尝试使用不同的光标样式来悬停在 Highcharts 图表中的图例上。
例如,图例 Series 1
应该有 cursor:"default"
而 Series 2
应该有 cursor:"pointer"
。悬停时。
我该怎么做?
最佳答案
您可以像这样在 css 中定义规则:
.highcharts-legend-item.highcharts-color-0 text {
cursor: pointer !important;
}
.highcharts-legend-item.highcharts-color-1 text {
cursor: crosshair !important;
}
color-0和color-1分别对应series 1和series 2
关于javascript - 如何在 Highcharts 中为图例设置不同的光标样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46218888/