Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
359 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you look to your demo you'll see that using color it sets the tooltip color and not the marker.

To fix it use marker fillColor instead, like the following.

data: [
    {x: 1343862840000, y: 4, marker:{ fillColor: 'red'} },
    {x:1343863200000, y:5, marker:{ fillColor: 'green'}}
]

demo

Update:
It works on highstock see this demo.
You have to init it using the right object.
Use Chart instead of StockChart.

reference


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...