Profile Picture

When I'm using auto scale in the chart, how can i get the the Range Min/Max

Posted By Jacky zhang 13 Years Ago

When I'm using auto scale in the chart, how can i get the the Range...

Author
Message
Jacky zhang
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 16, Visits: 1

When I'm using auto scale in the chart, how can i get the the Range Min/Max?

or Can I set Y axis minimum only ? (maximum value will be dynamic)

thanks,

 

_jacky



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: Last Week
Posts: 3,054, Visits: 4,009

Hi Jacky,

The following code snippet shows how to achieve these tasks:

   NChart chart = nChartControl1.Charts[0];

   NBarSeries bar = new NBarSeries();
   bar.Values.Add(10);
   bar.Values.Add(20);
   bar.Values.Add(30);
   chart.Series.Add(bar);

   // setting axis min to 15
   chart.Axis(StandardAxis.PrimaryY).View = new NRangeAxisView(new NRange1DD(15, 0), true, false);

   // turning off tick rounding
   NStandardScaleConfigurator scaleY = chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator as NStandardScaleConfigurator;
   scaleY.RoundToTickMin = false;
   scaleY.RoundToTickMax = false;

   // getting axis range
   nChartControl1.Document.Calculate();
   nChartControl1.Document.RecalcLayout(nChartControl1.View.Context);

   NRange1DD viewRange = chart.Axis(StandardAxis.PrimaryY).ViewRange;

Let us know if you meet any problems.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic