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

RadCartesianChart - No data in range, still shows data

3 Answers 75 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 06 Jun 2012, 10:14 AM
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.

3 Answers, 1 is accepted

Sort by
0
Rosko
Telerik team
answered on 11 Jun 2012, 01:10 PM
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 >>

0
Michele
Top achievements
Rank 1
answered on 05 Jul 2012, 04:59 PM
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?
0
Rosko
Telerik team
answered on 10 Jul 2012, 08:19 AM
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 >>

Tags
ChartView
Asked by
John
Top achievements
Rank 1
Answers by
Rosko
Telerik team
Michele
Top achievements
Rank 1
Share this question
or