I am working on Highstock, I am trying to set a color to a specific point in "data" in Highstock, like in the example, but I couldn't get it to work, no matter how I set the color, it doesn't show on the graph.
I have tried the option with Highchart API, it works, but it doesn't work with Highstock.
jsfiddle link(what I have tried)
Is it because I am using x, y to specify the point? Please help.
如果你看看你的演示中,你会看到使用color
它设置提示的颜色,而不是marker
。
要修复它使用标记fillColor
代替,像下面这样。
data: [
{x: 1343862840000, y: 4, marker:{ fillColor: 'red'} },
{x:1343863200000, y:5, marker:{ fillColor: 'green'}}
]
演示
更新 :
它适用于highstock
看到这个演示。
您可以选择使用合适的对象来初始化它。
使用Chart
来代替StockChart
。
参考
Highstock在默认情况下禁用点标记。 你需要让他们明确如下:
plotOptions: {
series: {
marker: {
enabled: true
}
}
},
多见于http://api.highcharts.com/highstock/plotOptions.series.marker