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

DateTime, AddRange issues

1 Answer 58 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Mark Woodlief
Top achievements
Rank 1
Mark Woodlief asked on 18 Apr 2011, 07:02 PM
I'm attempting to use RadChart, and have had nothing but issues using DateTime as the xaxis.  I've attempted to hack around most of my issues, but feel Telerik is 'thinking' too much for the developers.  

Currently I have an issue binding to a dataset that looks like this.

4/30/2010 12:00 AM 99.98  
5/31/2010 12:00 AM 99.98
6/30/2010 12:00 AM 99.98
7/31/2010 12:00 AM 100
 8/31/2010 12:00 AM 99.73
 9/30/2010 12:00 AM 99.95
 10/31/2010 12:00 AM 99.98
 11/30/2010 12:00 AM 99.56
 12/31/2010 12:00 AM 99.92
 1/31/2011 12:00 AM 100
 2/28/2011 12:00 AM 99.91
 3/31/2011 12:00 AM 99.92

You'll notice that this is the last day of the month for each month of the past year.  I'm attempting to display the labels as Jan-10, Feb-10, etc.  using a BarChart approach the values should be directly above the month labels.


The binding of the xaxis for DateTime has been a nightmare for us, so much so that we have considered retooling away from Telerik.  We've spent Months and several bugs that we've discovered with the Telerik RadChart.  At some point we are hoping things will go a bit smoother as we like some of the features, like zooming and scrolling for instance.

Any help here would be much appreciated, especially since my  project was due last week, ;(.. 

Thanks!

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 21 Apr 2011, 11:24 AM
Hi Mark Woodlief,

When displaying DateTime values in this manner, strict mode (i.e. setting XValue) might not be always appropriate as the span between Jan 31-st and Feb 28-th is 28 days and the span between Feb 28-th and Mar 31-st is 31 days, i.e. the items would not be evenly spaced. I would suggest using a categorical chart -- each month represents a category, no matter how long this month is.

Please, find attached a small example, showing two possible ways to achieve the desired result. The first uses pre-formated DateTime values and binds directly the XCategory property. The second one assumes you do not have the pre-formatted values, so XCategory is set for each individual DataPoint after applying the desired formatting.

Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
Mark Woodlief
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or