auto range options


https://www.nevron.com/Forum/Topic12335.aspx
Print Topic | Close Window

By rich dudley - 7 Years Ago
Are there axis or chart settings to make the automatic ranging tighter?  for example if data on a linear scale is ranging from 325 to 570 I would prefer that the automatic range would be 325 to 575 with increments of 50 but it is currently auto ranging to 300 to 600 with increments of 100.  I know I can force this with custom step and range, but we are generating several hundred graphs with different ranges and it would be nice if it auto ranged instead of being manually set.
By Nevron Support - 7 Years Ago
Hi Rich,

The following code shows how to increase the automatic tick density (by default ticks are placed at about 25pt - this code sets this property to 15pt):
NLinearScaleConfigurator yScale = nChartControl1.Charts[0].Axis(StandardAxis.PrimaryY).ScaleConfigurator as NLinearScaleConfigurator;
yScale.MajorTickMode = MajorTickMode.AutoMinDistance;
yScale.MinTickDistance = new NLength(15, NGraphicsUnit.Point);