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

Numerical (non-Categorical) X Axis

3 Answers 117 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Travis
Top achievements
Rank 1
Travis asked on 14 May 2013, 06:34 PM
Hello,

I cannot seem to get an X Axis to behave as a non-categorical type of axis. In other words, not only do we have numerical data in the Y-Axis, but also we've got numerical data in the X-Axis. Is this possible with Telerik RadChartView? Or does the X Axis always get treated like a "category"? If so, how?

Thank you...

Regards,

Michael Powell

3 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 14 May 2013, 08:42 PM
Hello Michael,

I believe this is case is covered in the demos application, could you please take a look at that one, under ChartView -> Drill-down, and drill down to the most explicit chart there there are numerical values for both X an Y values.

Please let me know if I've misunderstood the question

Best Regards,
Emanuel Varga, MVP
0
Travis
Top achievements
Rank 1
answered on 15 May 2013, 06:17 PM
DateTimeContinuousAxis horizontalAxis = new DateTimeContinuousAxis();
horizontalAxis.MajorStepUnit = Charting.TimeInterval.Year;
horizontalAxis.MajorStep = 1;
horizontalAxis.LabelFormat = "{0:yyyy}";
horizontalAxis.Title = "Year";

Starting from this snippet of code, close but not quite. We're not working with DateTime, per se. We are working with TimeSpan, or possibly floats/doubles if we expose TotalSeconds, TotalMilliseconds, etc.
0
Ivan Petrov
Telerik team
answered on 17 May 2013, 04:35 PM
Hi Michael,

Thank you for writing.

From what I understand you want a series which has two numerical dimensions along the two axes. If this is correct then you can have a look at the ScatterSeries and the ScatterLineSeries. They work with two numerical axes. 

I hope this will be useful. Should you have further questions.

Regards,
Ivan Petrov
the Telerik team
RadChart for WinForms is obsolete. Now what?
Tags
ChartView
Asked by
Travis
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Travis
Top achievements
Rank 1
Ivan Petrov
Telerik team
Share this question
or