|
Identify individual charts |
Posted by Toni Solarin on Oct-30-2013 23:30 |
|
I have successfully implemented a finance chart but I am trying to create a functionality that allows me to identify individual charts within the main chart and be able to set its properties. For example being able to right click on a bolinger band and change its color without affecting volume bars, SMA or whatever other chart might have been drawn. |
Re: Identify individual charts |
Posted by Peter Kwan on Oct-31-2013 01:31 |
|
Hi Toni,
If you would like to identify a part of a chart (such as a particular technical indicator in a chart), there are two methods:
(a) Use the image map / hot spot mechanism to detect if the user has clicked on a point on the line.
(b) Use the track cursor method. If you look at the "Track Line with Data Labels" sampe code, the track cursor support allows you to determine the positions of all data points which are at or near the x-coordinate of the mouse cursor. The sample code uses these information to draw dots and labels at the data point positions. Your code can also use these information to determine if the mouse click is close enough to a data point to be considered as clicking on that line.
Hope this can help.
Regards
Peter Kwan |
|