This is a migrated thread and some comments may be shown as answers.

Define Y axis max and min values along with the increment in a bar chart

1 Answer 636 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Karthik
Top achievements
Rank 1
Karthik asked on 07 Oct 2013, 07:19 AM
I use a bar chart in my project which displays the sales data. I would like to define the max and min values and also the increment value for each step .How can this be done please help or point me out to some articles.



1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 10 Oct 2013, 06:30 AM
Hi Karthik,

Thank you for writing.

For example if you have the following BarSeries:
BarSeries barSeries = new BarSeries("Performance", "RepresentativeName");
barSeries.Name = "Q1";
barSeries.DataPoints.Add(new CategoricalDataPoint(500, "Harley"));
barSeries.DataPoints.Add(new CategoricalDataPoint(800, "White"));
barSeries.DataPoints.Add(new CategoricalDataPoint(143, "Smith"));
this.radChartView1.Series.Add(barSeries);

then you can set the minimum, maximum and the step as follows:
LinearAxis verticalAxis = radChartView1.Axes.Get<LinearAxis>(1);
 
verticalAxis.Minimum = 0;
verticalAxis.Maximum = 1000;
verticalAxis.MajorStep = 100;

Please let me know if there is something else I can help you with.

Regards,
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ChartView
Asked by
Karthik
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or