RadCartesianChart - No data in range, still shows data

4 posts, 0 answers
  1. John
    John avatar
    2 posts
    Member since:
    Jun 2012

    Posted 06 Jun 2012 Link to this post

    Hi Telerik,

    I have a RadCartesianChart with a DateTimeContinuousAxis on the X-axis.  I have a data series added to the chart and this draws fine when the data is within the range of the DateTimeContinuousAxis set.

    We have buttons to change the date range shown on the X-axis.  When we do this we update the minimum and maximum properties of the X-axis.

    Again, this works as planned when the data series has data that should be shown within the range.  When the data series is outside the range, the chart still shows the series when it should be empty.

    Any ideas?

    Many Thanks.
  2. Rosko
    Admin
    Rosko avatar
    137 posts

    Posted 11 Jun 2012 Link to this post

    Hi John,

    I closely investigated the scenario and can conclude that this is a bug of RadChartView. As a sign of gratitude your Telerik points have been updated. You can track and vote for the bug over here.

    All the best,
    Rosko
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Michele
    Michele avatar
    13 posts
    Member since:
    Aug 2011

    Posted 05 Jul 2012 Link to this post

    I have exactly the same problem, if not worse as my users can specify both X and Y ranges.
    When the minimum or maximum are updated, the chart only updates the points that are currently in range without removing those out of range.
    Is there a work around?
  5. Rosko
    Admin
    Rosko avatar
    137 posts

    Posted 10 Jul 2012 Link to this post

    Hello Michele,

    What you need to do is to reset the ItemsSource after you change the minimum and maximum.
    (chart.HorizontalAxis as DateTimeContinuousAxis).Minimum = newMinimum;
    (chart.HorizontalAxis as DateTimeContinuousAxis).Maximum = newMaximum;
    //Data is the original source
    ObservableCollection<SomeInfo> temp = new ObservableCollection<SomeInfo>(Data);
    chart.Series[0].ItemsSource = temp;

    I hope this will help you.

    Kind regards,
    Rosko
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top