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

Horizontal Bar in RadCharView

1 Answer 143 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mirror
Top achievements
Rank 1
Mirror asked on 02 Mar 2015, 03:12 PM
Dear sir

I have a issue with how to set Y-axis as a categorical axis in
RadChartView

Document are as following

Data points are represented by a box where the height (width) of
the box is the distance between the point’s numerical value and
the categorical axis that plots the point. Bars may be either
“horizontal” or “vertical” depending on whether the categorical
axis is specified as an “X-axis” or as a “Y-axis”.

My code is as following

var barSeries = new BarSeries();

radChartView.Axes.Clear();
var verticalAxis = new CategoricalAxis();
verticalAxis.LabelFormat = "{0}";
verticalAxis.Title = "Time";
barSeries.VerticalAxis = verticalAxis;

var horizontalAxis = new LinearAxis();
horizontalAxis.Title = "Value";
horizontalAxis.LabelFormat = "{0}";
horizontalAxis.AxisType = AxisType.Second;
barSeries.HorizontalAxis = horizontalAxis;

radChartView.Series.Add(barSeries);

but the horizontalAxis is still the Categorical one

Could anyone give me a sample how to set Y-axis as Categorical Axis and Y-axis as Linear Axis to make bars show horizontally?

Thanks

1 Answer, 1 is accepted

Sort by
0
Mirror
Top achievements
Rank 1
answered on 03 Mar 2015, 02:33 AM
after setting categoricalAxis.AxisType = AxisTypes.Second it works.

Issue solved

Thanks
Tags
ChartView
Asked by
Mirror
Top achievements
Rank 1
Answers by
Mirror
Top achievements
Rank 1
Share this question
or