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

RadChartView Horizontal Axis for duplicate dates

1 Answer 72 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Tarun
Top achievements
Rank 1
Tarun asked on 10 Jul 2013, 01:02 PM
Hi All,

I have a requirement to plot date time data on the RadCartesianChart, I have multiple series but each has a value and a datetime , what type of Horizontal Axis should I be choosing if my collection can have multiple points for the same date time

So for example, for 27th October 2013, I expect the series to have,
DateTime                          Value
27/10/2013 1:45:00 62.5
27/10/2013 2:00:00 32.5
27/10/2013 2:15:00 32.5
27/10/2013 2:30:00 32.5
27/10/2013 2:45:00 32.5
27/10/2013 2:00:00 99.1
27/10/2013 2:15:00 99.1
27/10/2013 2:30:00 100.2
27/10/2013 2:45:00 65.5
27/10/2013 3:00:00 32.5

Please refer to the attached screen shot of how I would expect the graph to look (please ignore the values on the y axis in the graph, they will not match with those specified in the example above). 

For those familiar with financial vertical would recognize this as the Long day when the clock change takes place and the 2nd hour is duplicated when dealing with GMT +1 timezone.  

Regards,
Tarun






1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 15 Jul 2013, 11:04 AM
Hi Tarun,

Generally, for plotting DateTime data on the horizontal axis you can use DateTimeContinuousAxis which may be configured like this:
<telerik:DateTimeContinuousAxis MajorStep="15"
                      MajorStepUnit="Minute"
                      LabelFitMode="Rotate"
                      LabelRotationAngle="-90"
                      LabelFormat="dd/MMM/yyyy HH:mm:ss" />

As for the Daylight saving time support, the control relies on the .NET Framework and does not provide specific options for customizing its behavior.

First I would recommend reading this blog post on MSDN, detailing the problems associated with DST. It will give you some ideas about how to deal with it. 
Next for RadCartesianChart you can use a label template with a converter to change axis labels presentation as per your requirement.

I have attached a small project were you can test your solution.

I hope this helps.
 

Regards,
Petar Kirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ChartView
Asked by
Tarun
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or