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

Message ListMessage List     Post MessagePost Message

  Multiple Trend Layer based on data...
Posted by Ramesh on Sep-06-2012 22:05
Attachments:
Hi,
I have a chart with multiple range of data on both axis(y and y2).
When i try to plot trend line for the different range of data, its not plotting Y2 axis data. Is
there any way i can make it?
Below is the code snippet:

CurrTrendLayer = _chart.addTrendLayer2(pointTimestamps, currVar.Points.GetValues(),
Chart.CColor(TrendColors.GetNextColor()));

CurrTrendLayer.setLineWidth(3);

Also, attached the picture, in that, you can see blue colored lines are trend lines, for 2 sets
of data and the range is covered in Y-axis, there is one more variable with the data range is
on Y2 axis. There is no trend line for that variable.

Can anyone help me?

Thanks
Ramesh
Trend Chart.PNG

  Re: Multiple Trend Layer based on data...
Posted by Peter Kwan on Sep-06-2012 23:07
Hi Ramesh,

Have you use Layer.setUseYAxis2 to inform ChartDirector that the data series should be using the secondary y-axis, like :

CurrTrendLayer.setUseYAxis2();

Without Layer.setUseYAxis2 , ChartDirector cannot know which data series is using which axis, and it will simply use the default (the primary axis) for all data series. So to use the secondary y-axis, the Layer.setUseYAxis2 or DataSet.setUseYAxis2 is needed.

Hope this can help.

Regards
Peter Kwan

  Re: Multiple Trend Layer based on data...
Posted by Ramesh on Sep-07-2012 13:10
Hi Peter,

Thanks for your help!!! this one worked.
I was looking for something like this method.

Thanks
Ramesh