Nevron Forum

Add a Chart margin

https://www.nevron.com/Forum/Topic3884.aspx

By Brian J Warren - Monday, July 26, 2010

Hello,

I have a chart with an NLineSeries -- the most recent point shows just before the right axis.  Is there a way to create a margin so that this point appears perhaps only 90% of the chart width away from the right axis?

Thanks, Brian Warren

By Nevron Support - Tuesday, July 27, 2010

Hi Brian,

You can use view range inflate for this purpose - for example the following code applies a 10% margin on the right of the x axis:

NStandardScaleConfigurator scale = chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator as NStandardScaleConfigurator;

scale.ViewRangeInflateMode = ScaleViewRangeInflateMode.Absolute;
scale.InflateViewRangeEnd = true;

You can also take a look at the following example:
All Examples\Axes\General\View Range Inflate

By Brian J Warren - Tuesday, July 27, 2010

Thank you, I appreciate it.
By Matt Hawkins - Friday, November 5, 2010

I have a similar problem however I am using nevron chart 2008 version and the inflate feature does not seem to be available. Was this a new feature added in the 2010 version?
By Nevron Support - Wednesday, November 10, 2010

Hi Matt,

Yes it was added in later versions. You can work around it by using invisible data series but it will work in scale units, not absolute.