highcharts怎么更改crosshairs的点怎么更改

2025-05-06 06:20:24
推荐回答(1个)
回答(1):

1、十字准星

注:在 Highcharts 5.0.0 后十字准星线相关的配置移至坐标轴下面了,使用方法同之前的配置,为了兼容之前版本,我们继续保留提示框下的十字准星配置,更多详情参考 API 文档

crosshairs 有三种配置形式,最基础的是设置 crosshairs = true 表示启用竖直方向准星线,三种设置方式是:

crosshairs: true          // 启用竖直方向准星线crosshairs: [true, true]  // 同时启用竖直及水平准星线crosshairs: [{            // 设置准星线样式
width: 3,
color: 'green'}, {
width: 1,
color: "#006cee",
dashStyle: 'longdashdot',
zIndex: 100 }]

参考文档:网页链接