ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Need Help for chart cursor.
Posted by Yogesh I on Jun-08-2011 18:46
Attachments:
Hi Peter,

How can i get a cursor in my chart application as shown in the following link.


http://nseguide.com/charts.php?symbol=NIFTY

There are 2 cursor X and Y . Cursor moves with mouse move and shows the high low close
and other details on the top label. (Fig2)

Also how do i do the right label on Y axis (Fig 1)

i have attached image also
Preview.jpg

  Re: Need Help for chart cursor.
Posted by Peter Kwan on Jun-09-2011 02:22
Hi Yogesh,

The site you mentioned is written using ChartDirector. However, the user interaction code is not written by us. It is written by our customer.

To achieve the same effect, you may use the following code:

(a) Handle the Javascript mousemove event of the image. In the event handler, computes the candlestick that the mouse is over based on the mouse x-coordinate. See the following thread for an example:

http://www.chartdir.com/forum/download_thread.php?site=chartdir&bn=chartdir_support&thread=1143449610#N1289602318

(b) After your code gets the index of the candlestick, you may update your DIV block to show the information. (If you look careful at http://nseguide.com/charts.php?name=IFCI, you can see that the values that changes are not part of the chart. They are just normal HTML DIV blocks that floats over the chart image.) The mouse cursor are also DIV blocks, not part of the chart.

(Note: To do the above, you must be very familiar with HTML/Javascript.)

Hope this can help.

Regards
Peter Kwan