Profile Picture

How to make the points not displayed on the axis

Posted By Xiaolong Zhu 13 Years Ago
Author
Message
Xiaolong Zhu
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 18, Visits: 1
Hi Experts

i want to display points in a NChart with axis of content view, which means the range of the axis decided by Nevron would make sure all of the points are visible.

But i found some points were displayed on the axis which should be clipped, pls refer to the picture attached.

The following is the code i used:

for each axis:

NLinearScaleConfigurator scaleConfig= new NLinearScaleConfigurator();
axis.ScaleConfigurator = scaleConfig;
scaleConfig.RoundToTickMax = true;
scaleConfig.RoundToTickMin = true;
scaleConfig.MinorTickCount = 3;
scaleConfig.ViewRangeInflateMode = ScaleViewRangeInflateMode.Absolute;
scaleConfig.OuterMajorTickStyle.Length = new NLength(2, scaleConfig.OuterMajorTickStyle.Length.MeasurementUnit);
scaleConfig.OuterMinorTickStyle.Length = new NLength(1, scaleConfig.OuterMajorTickStyle.Length.MeasurementUnit);
scaleConfig.OuterMinorTickStyle.LineStyle.Color = axisColor;
scaleConfig.OuterMajorTickStyle.LineStyle.Color = axisColor;
scaleConfig.OuterMinorTickStyle.Visible = true;
scaleConfig.InnerMinorTickStyle.Visible = false;
scaleConfig.InnerMajorTickStyle.Visible = false;
scaleConfig.RulerStyle.BorderStyle.Color = axisColor;
axis.View = new NContentAxisView();

So could you give any hints? Thanks in advance.

Attachments
PointsOnAxis.png (70 views, 40.00 KB)
Nevron Support
Posted 13 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: 2 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Xiaolong,

What is the effect you want to achive? - generally there are two options:

1. Have the axes automatically inflated so that all points show inside the plot - this is achieved by setting the inflate margins property to true:

someSeries.InflateMargins = true;

2. Have the axes always clip the plot content:

someAxis.ClipMode = AxisClipMode.Always;

Please elaborate...



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic