I have time series data that has gaps on holidays and weekends that must be omitted from the charts. I am fine indexing the dates, that actually works good for me. What I need to do is replace the index that is present on the X axis with the date it represents. I have not found how to do this on the WPF charting controls.
Thanks!
Thanks!
5 Answers, 1 is accepted
0
Hi david maloney,
In order to enable the X axis to plot not only numerical sequence, but categorical values, you have to map the desired category values to the XCategory property of the DataPoint. You can do this by creating a DataBound chart and mapping the Field from your data source that holds the dates to the XCategory in the following way :
For more information on Data Binding,please, refer to this help topic.
Regards,
Nikolay
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.
In order to enable the X axis to plot not only numerical sequence, but categorical values, you have to map the desired category values to the XCategory property of the DataPoint. You can do this by creating a DataBound chart and mapping the Field from your data source that holds the dates to the XCategory in the following way :
seriesMapping.ItemMappings.Add( new ItemMapping( "Dates", DataPointMember.XCategory ) );
For more information on Data Binding,please, refer to this help topic.
Regards,
Nikolay
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.
0
Matt Tonsager
Top achievements
Rank 1
answered on 17 Sep 2010, 07:12 PM
Hello,
I have noticed when we change the XValue to XCategory it slows the performance of displaying the chart dramatically.
Is there an explanation as to why this is?
Thanks in advance!
Matt
I have noticed when we change the XValue to XCategory it slows the performance of displaying the chart dramatically.
Is there an explanation as to why this is?
Thanks in advance!
Matt
0
Hello Matt,
Indeed, there is such issue in the current official release. Our developers have already addressed it and the fix will be available in the upcoming service pack release.
Sincerely,
Ves
the Telerik team
Indeed, there is such issue in the current official release. Our developers have already addressed it and the fix will be available in the upcoming service pack release.
Sincerely,
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
0
DMM
Top achievements
Rank 1
answered on 20 Oct 2010, 08:00 PM
Okay, I see I can switch the axis to DataPointMember.XCategory , but it I have a lot of data points, the Axis becomes unreadable. I have 100+ days, want to plot them in a chart with gaps in data(weekend and holidays). What do you suggest?
0
Hello David Maloney,
You can set the AxisX.LabelStep property to 7 or 14 -- this will force the chart to display only every 7-th or every 14-th label, hiding the rest of them.
Best regards,
Ves
the Telerik team
You can set the AxisX.LabelStep property to 7 or 14 -- this will force the chart to display only every 7-th or every 14-th label, hiding the rest of them.
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