Group: Forum Members
Last Active: 8 Years Ago
Posts: 61,
Visits: 35
|
Hi,
I have a graph which has 2 axis; "Left" and "Right". Both of the axis can be set to auto scale or user input max, min. The problem of mine, when I leave the scaling automatic and I load in data with just negative values it does not work.
Do you have any idea what could be the problem?
Here is the method how I set the axis to auto scale:
internal void turnOnAutoscale(string axis) { if (axis.Equals("Left")) { m_Chart.Axis(StandardAxis.PrimaryY).View = new NRangeAxisView(new NRange1DD(0, 0), true, false); NStandardScaleConfigurator scale = m_Chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator as NStandardScaleConfigurator; scale.RoundToTickMax = true; } else { m_Chart.Axis(StandardAxis.SecondaryY).View = new NRangeAxisView(new NRange1DD(0, 0), true, false); NStandardScaleConfigurator scale = m_Chart.Axis(StandardAxis.SecondaryY).ScaleConfigurator as NStandardScaleConfigurator; scale.RoundToTickMax = true; } }
Thank you, Daniel
|
Group: Forum Members
Last Active: 6 hours ago
Posts: 3,054,
Visits: 4,012
|
Hi Daniel, You explicitly specify that the axis range should start from 0: new NRangeAxisView(new NRange1DD(0, 0), true, false); (second parameter is true) and therefore the axis range can never be negative. If you want automatic range you should use: someAxis.View = new NContentAxisView(); which is the default setting.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 8 Years Ago
Posts: 61,
Visits: 35
|
Thanks, works perfectly. silly me
|