Adaptive Sampling + Zoom + Scrolling

12 posts, 1 answers
  1. Alexander
    Alexander avatar
    3 posts
    Member since:
    Nov 2011

    Posted 20 Dec 2011 Link to this post

    Hello Telerik,

    Currently I'm evaluating RadChartView control for task of rendering huge data collections (millions of points) as line charts.
    I need the following chart behavior:
    - show brief charts when no Zoom
    - show precise charts when Zoom is on (greater precise for greater zoom values)
    - scrolling should work always on all data (no input data cut is possible though)
    - everything should work relatively fast (especially on scrolling)

    I know how to achieve part of requirements using ChartDataSource, but I can't understand if it's possible to implement such dynamic adaptive data sampling on zooming and with proper scrolling support.

    Could you please advise if it's possible? Is this feature planned? Can it be done using RadChart instead of RadChartView (with good performance on millions of raw data objects)?

    Thanks.
  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 22 Dec 2011 Link to this post

    Hi,

    You may want to consider using the ChartDataSource control included with RadChartView. It has facilities for data sampling which will be very useful when dealing with huge amounts of data. You can see how it is used in this demo: http://demos.telerik.com/silverlight/#ChartView/SmoothScrolling

    Currently it does not offer adaptive data sampling. You will need to change the SamplingThreshold property of the ChartDataSource as you change your zoom level.

    We have a help topic in the works but it is not yet live on the website. Please, do not hesitate to let me know if you have any other questions about the data sampling and ChartDataSource.

    Regards,
    Vladimir Milev
    the Telerik team

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

  3. UI for WPF is Visual Studio 2017 Ready
  4. Alexander
    Alexander avatar
    3 posts
    Member since:
    Nov 2011

    Posted 22 Dec 2011 Link to this post

    Hello Vladimir,
    Thank you for your response.

    Unfortunately changing Threshold on zooming is not a solution. Since I need more precise view of data on scrolling I need to eliminate threshold at all on full zoom. This leads to all millions of points rendered on control again (but i need only the part of them that visible on viewport) and control dies. This can't be done without adaptive sampling because this is not only about sampling but about proper part of data rendered on the control too. Chart primitives for only visible data should be actually created by control. Currently it creates all primitives for all data independently of it visibility on viewport (this is a bad design in my opinion). I can't do this data cutting manually either because I need proper scrolling and control calculates it's scrolling properly only if it knows all data.

    Am I right that this is not supported neither planned?
  5. Answer
    Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 23 Dec 2011 Link to this post

    Hello Alexander,

    You raise a very valid point. Currently we are indeed unable to fulfill the scenario described, however, it is of core importance for RadChartView. We are definitely commiting to providing this experience and I can also use the opportunity to share with you how we envision this hapening at the moment:

    We will create a UI virtualization mechanism for linear charts which will only display the part of the line which is actually visible during zooming and scrolling. Let's say you have bound the chart to 1,000,000 records  and have zoomed a small part of say 1000 points. You will still be able to use smooth scrolling and zoom the chart as usual, however, only the visible part of the line will be rendered meaning you will get a polyline segment with 1000 points in that particular case.

    We will also consider implementing a mechanism to call back to ChartDataSource and adjust the sampling threshold mechanism in accordance with the zoom level. This means that once you zoom, the sampling will change and the ChartDataSource will provide a continuously more detailed view of the data, while keeping performance good using UI Virtualization.

    We have our hopes that this will happen in time for the Q1 release which will also mark the official release of RadChartView.

    Thank you again for your feedback and feel free to write back to me should you have any ideas, problems, concerns with how RadChartView handles large amounts of data.

    Greetings,
    Vladimir Milev
    the Telerik team

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

  6. Alexander
    Alexander avatar
    3 posts
    Member since:
    Nov 2011

    Posted 23 Dec 2011 Link to this post

    Thank you for your kind response.
    Looking forward to see described features in Q1.
  7. Anand
    Anand avatar
    12 posts
    Member since:
    Dec 2011

    Posted 30 May 2012 Link to this post

    Hello Vladimir  

    Can you provide an example of RadChartView with Adaptive Sampling + Zoom + Scrolling + Cross Line + Multiple Y (auto size)?

    Thanks


    Anand
  8. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 05 Jun 2012 Link to this post

    Hello,

    Unfortunately we cannot offer such an example, because adaptive sampling is not yet implemented. We apologize for the inconenience.

    All the best,
    Vladimir Milev
    the Telerik team

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

  9. Spimac
    Spimac avatar
    7 posts
    Member since:
    Jan 2013

    Posted 31 Oct 2013 Link to this post

    Hello,

    As the adaptive sampling been implemented yet?

    Thanks.
  10. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 01 Nov 2013 Link to this post

    Hi,

    Unfortunately we have not yet implemented the adaptive sampling feature and it is also not included in our plans for the upcoming Q.

    Regards,
    Petar Marchev
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  11. Spimac
    Spimac avatar
    7 posts
    Member since:
    Jan 2013

    Posted 01 Nov 2013 Link to this post

    Hello.

    Thanks for the info.

    Can you give any suggestions as to how I can get around this in the meantime?

    We have a dynamic chart with hourly values that can span through multiple years. When we set try to zoom to the minimum (when all points are shown in the chart) the control starts to lag and the user experience deteriorates.

    I have noticed that you can set the MaxZoom but there is no MinZoom property of the zoom slider. Is there a way to limit the minimum zoom level?

    Thanks.
  12. Ian
    Ian avatar
    61 posts
    Member since:
    Jul 2010

    Posted 01 Nov 2013 Link to this post

    Hi Guys

    I would also like to add my support for the inclusion of the adaptive sampling feature.

    We are trying to display Candlestick charts of 1 minute pricing data over 1-2 years (approx 500,000 data points). This is not possible for the reasons discussed above.

    We would like to be able to do several things
    1. Use a cartesian candlestick chart inside a RadTimeBar so that the user (or our code) can select the required visible period
    2. Allow the user to use the time slider to move any period into view with no loss of performance
    3. Have the chart control re-evaluate the y axis values to best display the visible elements of the chart. Currently the axis is set for ALL the elements which results in a lot of vertical compression of the candles if the range of the dataset being used is large.
    4. Be able to continue to see the trackball when using the chart inside the timebar. At the moment when we embed the chart into the timebar the trackball disappears

    Looking forward to hearing your response
    Regards
    Ian Carson
  13. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 04 Nov 2013 Link to this post

    Hi,

    Paulo, I have attached a small project (wpf_ChartView_494618_AdaptiveSampling) to demonstrate one possible approach to achieve the adaptive sampling effect. You can attach an event handler to the ZoomChanged event of the chart and update the SamplingThreshold. Note that the data will be resampled each time you change the threshold so this might in turn lead to performance issues. Perhaps you can apply some custom logic  in the event handler so that the threshold is updated on some steps (say 100, 200, 300 ...). I have demonstrated one possible way - with the log pow variables.
    Perhaps one option for you would be to have two different charts. One of the charts will be sampled and will have some selection period and the other will show unsampled data for the points in the selection. See the inverse axis example for reference.

    Is there a way to limit the minimum zoom level?
    While the chart does not offer it as a first-level API you can set the MaximumRangeSpan of the PanZoomBar (you can use an implicit style to do that or use the PanZoomBarStyle property of the axis).

    Ian, there is no problem to use a ChartView inside a time bar. Just remember to collapse the vertical axis so that the chart and time bar are in sync. I have attached a small example to demonstrate one possible approach for this (wpf_ChartView_494618_TimeBarSelection). However your question is not directly related to the adaptive sampling so I will ask that if you have any other questions - please create a new thread. This way we can more easily follow communication. I have also uploaded a project that demonstrates how you can have both timebar selection and chart track ball (sl_ChartView_TimeBar_TrackBall). But once again - if you need further assistance, do create a new thread.

    Regards,
    Petar Marchev
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WPF is Visual Studio 2017 Ready