Open prackode opened 4 days ago
My motive is too create a label with the price, and remove/delete it with respect to the line only.
An idea:
1) Add a label via axis range.
2) Add drawingadded
event to execute once to StockChart
.
3) When it kicks in, use its drawingId
to associate axis range data item with thge drawingId
via some kind of custom object.
4) Add drawingremoved
event to execute once to StockChart
.
5) Once it kicks in, use its drawingId
to look up related axis range data item and dispose it.
I hope that makes sense.
Glad that I got the same thought @martynasma Exactly that's what I have done, and handled almost all the edge cases like deleting/erasing drawings removing labels too etc.
Got stuck in one edge case, that what If user dragged (upwards/downwards) the line, by clicking on the pointer/bullet present on the line. So in that case ideally the label should move with that right?
In amchart there is an event named drawingsupdated
, so if somehow I can get the drawingId of that line which was dragged then I can link/map that axisLabel .
As the drawingsupdated doesn't gets the individual drawingId it doesn't have that param, That's where this issue comes #1740
As the drawingsupdated doesn't gets the individual drawingId it doesn't have that param,
It's doesn't, and there's no specific event for that.
I suppose you could cycle through all lines when it kicks in and update the related labels.
I am using stock Chart, and there is a feature where user can draw the line using the plus button too. This very good feature to have, appreciated. Just I want one feature in that:
There are a couple of ways to do ADD THE LABEL, only: I did by using the axis range, Like this :
But the issue is :