Auto scale does not work with just negative numbers


Author
Message
Daniel Csimszi
Daniel Csimszi
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
Posts: 61, Visits: 35
Thanks, works perfectly. silly me
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

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
Daniel Csimszi
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
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
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search