Applies to: Nevron Chart for .NET
How to force the chart Y axis minimum and maximum to specific value?
The following code will set the chart Y axis range to minimum value of 0 and maximum of 1000. Note that in this example, we set the Round To Tick Min/Max to false, because by default the axis scale Round To Tick property is enabled.
[C#]
chart.Axis(StandardAxis.PrimaryY).View =
new
NRangeAxisView(
new
NRange1DD(0, 1000),
true
,
true
);
NStandardScaleConfigurator scale = chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator
as
NStandardScaleConfigurator;
scale.RoundToTickMax =
false
;
scale.RoundToTickMin =
false
;
[VB.NET]
chart.Axis(StandardAxis.PrimaryY).View =
New
NRangeAxisView(
New
NRange1DD(0, 1000),
True
,
True
)
Dim
scale
As
NStandardScaleConfigurator = TryCast(chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator, NStandardScaleConfigurator)
scale.RoundToTickMax =
False
scale.RoundToTickMin =
False
Article ID: 147, Created On: 11/30/2010, Modified: 12/1/2010