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

Inaccurate data display for out of range data

7 Answers 77 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Jinyan
Top achievements
Rank 1
Jinyan asked on 10 Aug 2012, 02:42 AM
Hi all,

I am using a custom min/max value for my x-axis (mainly to simulate the live data feel by scrolling the x-axis on every data update). However, it seems that when I run for the graph for a long period of time, the data points that should be out of the graph display range are being displayed on the edge of the graph instead of being omitted completely. Attached is a screenshot of the issue. 

I read somewhere else that this is a known issue. If so, are there any workarounds for omitting the data that won't fit in the current x-axis?

Furthermore, I also tried the workaround of having two separate data sets (one for storing all past values and another for holding the actual displayed data, which is a subset of the previous). However, when I change the ItemsSource from one to the other, the graph displays some strange behavior (erratic line drawings, etc.), which is why I am hoping to find a workaround without having to switch my data source.

Thanks,
Jin

7 Answers, 1 is accepted

Sort by
0
Jinyan
Top achievements
Rank 1
answered on 10 Aug 2012, 03:04 AM
Furthermore, when I manually change the range of the display, it gets even weirder in that the values out of range simply stay in their original position instead of either disappearing or going to the side of the graph. Attached are two screenshots. First one is when I pause the graph to view all data, second one is when I resume the graph to display the most recent 10 data points and manually setting the X-axis range.
0
Yavor
Telerik team
answered on 10 Aug 2012, 02:20 PM
Hello Jinyan,

RadChartView draws the points in they original order and doesn't apply sorting. This means that if the data points are not in sorted view the line will look strange. We believe, from the screenshots you shared, that your data is not sorted by its X-value. Can you please check that?

All the best,
Yavor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jinyan
Top achievements
Rank 1
answered on 10 Aug 2012, 05:04 PM
HI Yavor,

I just checked, my code is simply adding new data every second to an ObservableCollection, so the data is sorted by increasing time.

Furthermore, for the Initial and After screenshots, I did not change anything regarding the data source. I only changed the Min and Max for the HorizontalAxis to change the viewing range.

Thanks for the response, tell me if you need more information.
Jin
0
Jinyan
Top achievements
Rank 1
answered on 11 Aug 2012, 12:00 AM
Right now my temporary workaround is to use two data sources again and manually resetting the data context to avoid the strange behavior I was experiencing before. It would be awesome if there is a more graceful fix/workaround! 
0
Yavor
Telerik team
answered on 13 Aug 2012, 11:57 AM
Hello Jinyan,

We haven't encountered such an issue in our internal tests. I have prepared for you a small runnable demo application that shows live data coming every second and restricting the range to the last 10 seconds of data. Can you please check it in your environment and see if it is working as expected?

In the images you shared we can see that the horizontal axis has been reverted (showing the newest data to the left instead of to the right as normal). Can you confirm that this is a desired effect and how you are achieving it?

Regards,
Yavor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jinyan
Top achievements
Rank 1
answered on 13 Aug 2012, 06:40 PM
Hi Yavor,

Thanks for the response. The attached project is a Silverlight project, and my application is built based on the WPF assemblies. So I cannot run the application because I don't have the correct assemblies.

I just checked, and I am running 2012 Q1 SP1 version of WPF controls. I am not sure if this was something that's fixed in Q2.

Finally, I don't think the horizontal axis is not reverted. The latest data (thus the most recent time) is on the right hand side. Can you please recheck and further clarify?

Thanks,
Jin
0
Yavor
Telerik team
answered on 16 Aug 2012, 12:12 PM
Hello Jinyan,

Please excuse me for the misunderstanding. You can find the sample sample app in a WPF project attached to this post. 

Kind regards,
Yavor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
Jinyan
Top achievements
Rank 1
Answers by
Jinyan
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or