Gaps in Dates on AxisX

6 posts, 0 answers
  1. DMM
    DMM avatar
    8 posts
    Member since:
    May 2010

    Posted 21 May 2010 Link to this post

    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!
  2. Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 26 May 2010 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Matt Tonsager
    Matt Tonsager avatar
    10 posts
    Member since:
    May 2010

    Posted 17 Sep 2010 Link to this post

    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
  5. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 22 Sep 2010 Link to this post

    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
  6. DMM
    DMM avatar
    8 posts
    Member since:
    May 2010

    Posted 20 Oct 2010 Link to this post

    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?
  7. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 25 Oct 2010 Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready