Nevron Forum

DisplayOnAxis problem

https://www.nevron.com/Forum/Topic3865.aspx

By Lou Laskey - Friday, July 23, 2010

I am using a Horizontal bar type (PredefinedChartStyle.HorizontalLeft).

There are 3 series: 1 bar and 2 lines

There are 3 axes (1 X and 2 Y).

The bar series and 1 of the line series (a threshold display) uses DisplayOnAxis(StandardAxis.PrimaryY, true) and they are ok.

My second line series uses DisplayOnAxis(StandardAxis.SecondaryY, true) and that is where the problem occurs. The series scales to the primary Y axis.

I put a chart command bar on the form so I could see the settings at run time. When I look at the Axes tab for the line series in question, the Y Axes is set to Both. If I change it to SecondaryY, it works as planned.

Any help would be appreciated.
TIA
Lou

By Nevron Support - Monday, July 26, 2010

Hi Lou,

By default all series will scale on the PrimaryY axis - the following code shows how to tell a series to scale on the secondary Y axis only:

someSeries.DisplayOnAxis((int)StandardAxis.PrimaryY, false);
someSeries.DisplayOnAxis((int)StandardAxis.SecondaryY, true);

in other words you also have to disable the series from scaling on the primary Y.

By Lou Laskey - Monday, July 26, 2010

That took care of it.

Thanks,
Lou