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

Vertical DateTimeContinuousAxis

1 Answer 56 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jan
Top achievements
Rank 1
Jan asked on 23 Dec 2011, 10:48 AM
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...

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 27 Dec 2011, 01:50 PM
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 >>

Tags
Chart
Asked by
Jan
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or