Profile Picture

Axis manual ranging

Posted By rich dudley 7 Years Ago

Axis manual ranging

Author
Message
rich dudley
Question Posted 7 Years Ago
View Quick Profile
Forum Guru

Forum Guru (51 reputation)Forum Guru (51 reputation)Forum Guru (51 reputation)Forum Guru (51 reputation)Forum Guru (51 reputation)Forum Guru (51 reputation)Forum Guru (51 reputation)Forum Guru (51 reputation)Forum Guru (51 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 33, Visits: 76
Using these settings I would expect the graph axis to have steps at 350, 405, 460, 515 570, 625.  Unfortunately this is not the case.  What do I need to do to make this happen?

chart.Axis(StandardAxis.PrimaryY).View = new NRangeAxisView(new NRange1DD(350, 625), true, true);
((NStandardScaleConfigurator)chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator).MajorTickMode = MajorTickMode.CustomStep;
((NLinearScaleConfigurator)chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator).CustomStep = 55;
((NLinearScaleConfigurator)chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator).RoundToTickMax = false;
((NLinearScaleConfigurator)chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator).RoundToTickMin = false;

This is the result.
72% of original size (was 696x19) - Click to enlarge
https://www.nevron.com/forum/uploads/images/28ee2dc6-7acd-40d6-8a77-a323.png



Nevron Support
This post has been flagged as an answer
Posted 7 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,437 reputation)Supreme Being (4,437 reputation)Supreme Being (4,437 reputation)Supreme Being (4,437 reputation)Supreme Being (4,437 reputation)Supreme Being (4,437 reputation)Supreme Being (4,437 reputation)Supreme Being (4,437 reputation)Supreme Being (4,437 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 3,055, Visits: 4,055
Hi Rich,
You also need to modify the axis origin as by default numbering starts from 0 and not from the view range begin value:

((NLinearScaleConfigurator)chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator).UseOrigin = true;
((NLinearScaleConfigurator)chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator).Origin = 350;




Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic

1 active, 1 guest, 0 members, 0 anonymous.
No members currently viewing this topic!