当鼠标悬停在图表上时,“标记”是一个圆形的灰色圆圈--我想将其更改为绿色的圆形圆圈。
当前图表http://jsfiddle.net/uqjvdtx2/3/
{
"title": {
"text": "Jun 15, 2021",
"style": {
"fontWeight": "bold"
}
},
"lang": {
"noData": "Your custom message"
},
"legend": {
"enabled": false
},
"xAxis": {
"categories": [],
"crosshair": {
"width": 1,
"zIndex": 2,
"color": "#ccc"
},
"title": {
"text": "test"
},
"visible": true,
"labels": {
"enabled": false
}
},
"chart": {
"height": 200
},
"yAxis": {
"title": false,
"crosshair": false
},
"credits": {
"enabled": false
},
"tooltip": {
"enabled": true,
"backgroundColor": "#fff",
"borderColor": "#ddd",
"borderRadius": 0,
"borderWidth": 0,
"shadow": false,
"shared": false,
"useHTML": true,
"zIndex": 99999
},
"plotOptions": {
"area": {
"marker": {
"enabled": true,
"symbol": "circle",
"fillColor": "green",
"radius": 2,
"states": {
"hover": {
"enabled": true,
"fillColor": "green"
}
}
}
}
},
"series": [
{
"name": "",
"data": [
72.61,
61.66,
62.48,
62.22,
55.29,
59.15,
63.91,
61.05,
60.12,
60.84,
60.96,
53.72,
56.31,
63.41,
62.25
],
"color": "#ccc",
"events": {}
}
]}enter code here
当鼠标悬停在图表上时,“标记”是一个圆形的灰色圆圈--我想将其更改为绿色的圆形圆圈。
发布于 2021-07-14 17:14:01
您为面积系列定义了标记选项,并使用了线系列。更正选项结构,并针对每个州使用单独的选项。
plotOptions: {
line: {
marker: {
states: {
hover: {
fillColor: 'green'
},
normal: { ... }
}
}
}
}现场演示: http://jsfiddle.net/BlackLabel/er7fnkh0/
接口参考: https://api.highcharts.com/highcharts/plotOptions.line.marker.states.hover
https://stackoverflow.com/questions/68374378
复制相似问题