Completed
Last Updated: 30 Jan 2015 17:50 by ADMIN
ADMIN
George
Created on: 25 Mar 2014 13:30
Category: ChartView
Type: Feature Request
0
ADD. RadChartView - Add the ability to show negative values under the 0 point of the area
When one adds data points with negative and positive values, the negative ones should go below the 0, for example, with the following data:

AreaSeries areaSeries = new AreaSeries();
areaSeries.DataPoints.Add(new CategoricalDataPoint(5, "Jan"));
areaSeries.DataPoints.Add(new CategoricalDataPoint(-10, "Apr"));

Resolution: 
To use the functionality one should set the StartPositionAxis and StartPositionValue properties of an axis. The first property is the axis along which the current axis will be aligned. The second is the value where the current axis should be positioned.
Here is a sample code: 
AreaSeries areaSeries = new AreaSeries();
areaSeries.DataPoints.Add(new CategoricalDataPoint(13, "Jan"));
areaSeries.DataPoints.Add(new CategoricalDataPoint(20, "Apr"));
areaSeries.DataPoints.Add(new CategoricalDataPoint(-15, "Jul"));
areaSeries.DataPoints.Add(new CategoricalDataPoint(16, "Oct"));
this.radChartView1.Series.Add(areaSeries);

areaSeries.HorizontalAxis.StartPositionAxis = areaSeries.VerticalAxis;
areaSeries.HorizontalAxis.StartPositionValue = 0; 
0 comments