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

Message ListMessage List     Post MessagePost Message

  Intersection with X - axis
Posted by Alejandro on May-19-2022 22:23
Attachments:
Hi everyone, I'm working with CD in PHP, my programming skills are not too high, I need to find the way to draw vertical  lines (xMark) in the point where graph finds intersection with xAxis (where the plotting crosses from above  0 (Y) to below 0 (Y), for example:
Thank you in advance!!
crossing.PNG

  Re: Intersection with X - axis
Posted by Peter Kwan on May-20-2022 01:11
Hi Alejandro,

To find the zero crossing point, you do not need ChartDirector. You can write some code to scan your data to find the zero crossing point.

First, you need to define what is the zero crossing. For example, if the data are *(10 5, 2, -3, -7), then it is obvious the zero crossing point is between 2 and -3 and can simply be determined by interpolation. However, if the data are (100, 99, 0, 0, 0, 0, 0, 0, -7), exact where is the zero crossing point(s)? This depends on how you define zero crossing.

Once you define what is meant by "zero crossing" for all the possible cases, you can write PHP code scan your data to find the zero crossing points. You can then ask ChartDirector to add them to the chart using Axis.addMark.

Hope this can help.

Regards
Peter Kwan

  Re: Intersection with X - axis
Posted by Alejandro on May-20-2022 04:05
Thank you very much