Inaccurate data display for out of range data

8 posts, 0 answers
  1. Jinyan
    Jinyan avatar
    23 posts
    Member since:
    Jul 2012

    Posted 09 Aug 2012 Link to this post

    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
  2. Jinyan
    Jinyan avatar
    23 posts
    Member since:
    Jul 2012

    Posted 09 Aug 2012 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 10 Aug 2012 Link to this post

    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.

  5. Jinyan
    Jinyan avatar
    23 posts
    Member since:
    Jul 2012

    Posted 10 Aug 2012 Link to this post

    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
  6. Jinyan
    Jinyan avatar
    23 posts
    Member since:
    Jul 2012

    Posted 10 Aug 2012 Link to this post

    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! 
  7. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 13 Aug 2012 Link to this post

    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.

  8. Jinyan
    Jinyan avatar
    23 posts
    Member since:
    Jul 2012

    Posted 13 Aug 2012 Link to this post

    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
  9. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 16 Aug 2012 Link to this post

    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.

Back to Top
UI for WPF is Visual Studio 2017 Ready