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

Message ListMessage List     Post MessagePost Message

  Crosshair labels for multiple Y-axis's
Posted by srinivas on Aug-23-2016 13:23
Attachments:

Hi Peter Kwan,

I implemented finance chart with track line and cross hair features. Every thing working fine. But My Chart have multiple Y-axis's.  I'm getting cross hair labels for two Y-axis and I want cross hair labels for all Y-axis's.
sample for multiple Y-axis is attached.
Capture.PNG

  Re: Crosshair labels for multiple Y-axis's
Posted by Peter Kwan on Aug-24-2016 00:56
Hi srinivas,

In one of your previous post, you mentioned that the crosshair is only for one y-axis, and you would like to have it for two y-axis. I suggest to just repeat the code for the second y-axis. See:

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

For your case, have you tried to repeat the code for all the other y-axes that you have?

Regards
Peter Kwan

  Re: Crosshair labels for multiple Y-axis's
Posted by srinivas on Aug-24-2016 15:20
Attachments:
Yes, I tried. every thing working fine. I'm getting cross hair label for both Y-axes. Now I have another question, I added two more Y-axes and I need cross hair label for that axes also.
Untitled.png

  Re: Crosshair labels for multiple Y-axis's
Posted by Peter Kwan on Aug-25-2016 01:37
Hi srinivas,

In Javascript, you can obtain the two extra axes with:

yAxisY3 = c.getAxis(4);
yAxisY4 = c.getAxis(5);

In this way, you can use the same code to add crosshair labels to these axes.

(The xAxis(), xAxis2(), yAxis(), yAxis2() are internally numbered from 0 to 3. so the extra axes start from 4 onwards.)

Regards
Peter Kwan

  Re: Crosshair labels for multiple Y-axis's
Posted by srinivas on Aug-25-2016 14:23
Thanks Peter perfect!!! That should be what i need.