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

Adaptive Sampling + Zoom + Scrolling

13 Answers 496 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 20 Dec 2011, 03:12 PM
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.

13 Answers, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 22 Dec 2011, 12:24 PM
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 >>

0
Alexander
Top achievements
Rank 1
answered on 22 Dec 2011, 12:46 PM
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?
0
Accepted
Vladimir Milev
Telerik team
answered on 23 Dec 2011, 03:17 PM
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 >>

0
Alexander
Top achievements
Rank 1
answered on 23 Dec 2011, 04:04 PM
Thank you for your kind response.
Looking forward to see described features in Q1.
0
Anand
Top achievements
Rank 1
answered on 30 May 2012, 05:13 PM
Hello Vladimir  

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

Thanks


Anand
0
Vladimir Milev
Telerik team
answered on 05 Jun 2012, 08:24 AM
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 >>

0
Spimac
Top achievements
Rank 1
answered on 31 Oct 2013, 05:35 PM
Hello,

As the adaptive sampling been implemented yet?

Thanks.
0
Petar Marchev
Telerik team
answered on 01 Nov 2013, 09:56 AM
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 >>
0
Spimac
Top achievements
Rank 1
answered on 01 Nov 2013, 04:40 PM
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.
0
Ian
Top achievements
Rank 1
answered on 02 Nov 2013, 03:11 AM
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
0
Petar Marchev
Telerik team
answered on 04 Nov 2013, 12:56 PM
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 >>
0
Bjarne
Top achievements
Rank 1
answered on 01 Oct 2019, 11:25 AM

Reading this 6 years later makes me wonder if this has actually been implemented? I am in the same situation as the original poster and I don't want to load all the data when I zoom all the way in, only the visible data.

Is this possible now?

0
Martin Ivanov
Telerik team
answered on 04 Oct 2019, 07:25 AM

Hello Bjarne,

This is not yet implemented as a built-in feature. In order to achieve it you will need to manually filter your data on ZoomChanged (or PanOffsetChanged), as described in the previous posts.

Regards,
Martin Ivanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ChartView
Asked by
Alexander
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Alexander
Top achievements
Rank 1
Anand
Top achievements
Rank 1
Spimac
Top achievements
Rank 1
Petar Marchev
Telerik team
Ian
Top achievements
Rank 1
Bjarne
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or