Reputation: 1125
How to add markers at particular points (x,y) in high-chart line graph?
I have tried this:-
marker: {
symbol: 'square'
}
Am adding x and y values as dynamic array.I need to iterate the array in a loop and plot markers manually at certain points .Is it possible?
Upvotes: 0
Views: 999
Reputation: 807
probably the best way to do it is to add a data series that represents the marker, so it would be something like this (pseudo-code):
var myMarkerPosition = myValueFromArray;
mychart.addSeries(myMarkerPosition);
and you can then do something like:
mychart.series[1].update({ symbol: square });
later on if you want to. Don't forget to replace your marker if you want to move it to another position by updating it.
Upvotes: 3