Profile Picture

Auto scale does not work with just negative numbers

Posted By Daniel Csimszi 11 Years Ago
Author
Message
Daniel Csimszi
Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)

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

Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

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



Daniel Csimszi
Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 61, Visits: 35
Thanks, works perfectly. silly me



Similar Topics


Reading This Topic