Horizontal Bar in RadCharView

2 posts, 0 answers
  1. Mirror
    Mirror avatar
    2 posts
    Member since:
    Sep 2013

    Posted 02 Mar 2015 Link to this post

    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
  2. Mirror
    Mirror avatar
    2 posts
    Member since:
    Sep 2013

    Posted 02 Mar 2015 in reply to Mirror Link to this post

    after setting categoricalAxis.AxisType = AxisTypes.Second it works.

    Issue solved

    Thanks
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top