Vertical DateTimeContinuousAxis

2 posts, 0 answers
  1. Jan
    Jan avatar
    1 posts
    Member since:
    Dec 2011

    Posted 23 Dec 2011 Link to this post

    Hello Sir,
    is possible to use DateTimeContinuousAxis as vertical axis? I have horizontal CategoricalAxis and need datetime value on vertical, but when i use this code-behind:


    ....
    DateTimeContinuousAxis yOsa = new DateTimeContinuousAxis();
    yOsa.Maximum = new DateTime(2012, 12, 30, 1, 1, 1);
    yOsa.Minimum = new DateTime(2012, 12, 1, 1, 1, 1);
    chart.VerticalAxis = yOsa;
    .....


    it doesnt work. No exception is thrown, but no values on vertical axis are displayed. With LinearAxis its working...

    Thanks for any advice...
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 27 Dec 2011 Link to this post

    Hello Jan,

    Thank you for contacting us.

    If I understand correctly, you want to display DataTime values on the vertical axis. If you set the vertical axis to DateTimeContinuousAxis and the horizontal to LinearAxis, the chart will display the data horizontally instead of vertically. This is the expected behavior since almost always the values for the data are numerical.
    Note that you also need to add data points with the data you want to display. For example:

    BarSeries barSeries = new BarSeries();
    CategoricalDataPoint point = new CategoricalDataPoint();
    point.Category = DateTime.Parse("2012-12-4");
    point.Value = 1.2;
    barSeries.DataPoints.Add(point);
    this.chart.Series.Add(barSeries);


    If, however this is not what you want, I would kindly like to ask you to share some further details on your scenario so I could assist you further.

    Regards, Todor
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top