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

Gaps in Dates on AxisX

5 Answers 74 Views
Chart
This is a migrated thread and some comments may be shown as answers.
DMM
Top achievements
Rank 1
DMM asked on 21 May 2010, 07:49 PM
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!

5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 26 May 2010, 02:09 PM
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 :
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
0
Ves
Telerik team
answered on 22 Sep 2010, 12:27 PM
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
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
Ves
Telerik team
answered on 25 Oct 2010, 02:22 PM
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
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
DMM
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Matt Tonsager
Top achievements
Rank 1
Ves
Telerik team
DMM
Top achievements
Rank 1
Share this question
or