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

When Zoom Rectangle too small on RadChart the chart does not zoom

5 Answers 54 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Jason Moore
Top achievements
Rank 1
Jason Moore asked on 10 Jul 2014, 03:59 AM
Hi,

I have a RadChart control, however when I try to zoom in and my zoom rectangle that I drag is too small, the chart ends up displaying the NoDataString
property of the ChartArea component.

This maybe supposedly correct functionality but my zoom rectangle did encapsulate the point circled in the attachment so I thought it therefore should zoom correctly?

Any feedback about this is appreciated.

Thanks


5 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 14 Jul 2014, 11:52 AM
Hi Jason,

I tested the zoom of the RadChart, but I wasn't able to reproduce such (as the reported) behavior. Can you please elaborate more on your scenario by sending me a sample project demonstrating the behavior? This will help me in better understanding your case and assist you further.

Also keep in mind that the RadChart is our old charting component that has many known limitations and issues. This is why we designed the new RadChartinView charting suite that has better implementation and improved performance. The new chart view is also more flexible and easier to set up than the old chart. Furthermore, the RadChart is in a maintenance mode, which means that we no longer provide bug fixes and new features for it.

You can read about the differences between the controls in the RadChart vs RadChartView help article. In general, if you just starting to use the RadChart or its integration in your application is not very complex, I recommend you to give the RadChartView components a try and let me know if it works for you.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Jason Moore
Top achievements
Rank 1
answered on 27 Nov 2014, 04:16 AM
Hi,

In the attached images where this has happened again, everytime I make a zoom rectangle past the value 10 like in the image
RadChartZoomCorrect.png it zooms in correctly, but if I trace a rectangle that has is before the value 10 like in
RadChartZoomError.png then the chart seems to think it has no data.

If you can suggest a workaround or anything that would be great.
Assuming it may take a while to upgrade to the new chart it seems unlikely we can go down that path for a while as its API seems completely different.

Thanks




0
Martin Ivanov
Telerik team
answered on 01 Dec 2014, 01:18 PM
Hi Jason,

We tested your case further and it seems that there is a known issue with the zooming of RadChart which looks like the reported behavior. 

As a workaround you can subscribe for the DataBound event of RadChart and manually calculate the zoom selection range. You can set the new range with the SetSelectionRange() method of the ZoomScrollSettings.

this.chart.DefaultView.ChartArea.ZoomScrollSettingsX.SetSelectionRange(min, max);

For your convenience I attached a project demonstrating this workaround.

Regards,
Martin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jason Moore
Top achievements
Rank 1
answered on 03 Dec 2014, 12:23 AM
Hi Martin,

Apologies but I am just having problems trying to figure out how to use the sample application you provided.

When I run it and try to drag a rectangle to zoom in and out it does not appear to be doing anything.

In essence I guess I need to figure out how to determine the new zoom location of both the X and Y Axis and set the accordingly
which I am unsure how to do.

Thanks
0
Petar Marchev
Telerik team
answered on 05 Dec 2014, 10:00 AM
Hello Jason,

The project Martin attached was meant to be a guide for you to implement a work-around in your project, if possible. The chart shows up with a single point in the middle (actually 5 series with 1 point, all at the same date time) just to demonstrate the very no-data-series problem resolved. 

The chart does not allow drag-to-zoom at this point, because it detects that it cannot really be zoomed in more. The chart is, however, zoomed in when you use the slider, because the chart tries to respect the SelectionStart and SelectionEnd properties of the slider to a maximum extent. 

Please find the OnLoaded handler and change the itemCount variable to a larger number (say 100). Now you will see a line chart, where you will be able to zoom with both dragging the mouse and with the slider. The code in the ChartControlDataBound ensures that when the count of data points within the visible range is 0 - a new zoom range is chosen, thus resolving the no-data-series issue.

The code basically finds a selection start and selection end that contain at least one data point. The provided code is data specific, and you will need to update it to work with the data of your application.

Another, simpler solution is to set a MinZoomRange:
this.Chart.DefaultView.ChartArea.ZoomScrollSettingsX.MinZoomRange = 0.4;

Let us know if you need more information.

Regards,
Petar Marchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ChartView
Asked by
Jason Moore
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Jason Moore
Top achievements
Rank 1
Petar Marchev
Telerik team
Share this question
or