This is a migrated thread and some comments may be shown as answers.
Save/Restore Pan/Zoom RadCartesianChart
2 Answers 16 Views
This is a migrated thread and some comments may be shown as answers.
Reilly
Top achievements
Rank 1
Reilly asked on 04 Jan 2019, 03:02 PM

I'm using 2017.3.1018.45 on 64-bit Windows 10 and Visual Studio 2017.

My application has a single chart view. I can change the data that is displaying. The DataContext changes out from under the view. When the DataContextChanged message arrives, I:

   1. save the current pan/zoom settings for the chart.

   2. clear all series.

   3. generate all series for the new data context

   4. restore the pan/zoom settings that were saved from the last time this data was displayed.

Except that it doesn't work at all. I have tried saving and restoring: Zoom, PanOffset, Horizontal/Vertical-ZoomRange-Start/End.

At first, I tried just saving/restoring Zoom and PanOffset. I could successfully set the Zoom, but the PanOffset was always (0,0) after the set.

I have tried invoking my restore operation on the dispatcher during Idle, so it should be done after everything has been complete.

Any ideas?

-John.

 

 

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Jan 2019, 07:56 AM
Hi John,

I can't tell why the reported issue appears because I am not familiar with your setup. But, I've prepared a small example, based on your description, that shows saving/restoring the HorizontalZoomRangeStart/End properties. Can you please give it a try and let me know if I am missing something?

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.
0
Reilly
Top achievements
Rank 1
answered on 11 Jan 2019, 01:49 PM

Hi Martin,

Your example was helpful.

When I change my application to save / restore only the Horizontal/VerticalZoomRangeStart/End properties, it works just fine.

I had been doing save / restore of the PanOffset and Zoom properties in addition to the ZoomRange properties. That did not work.

I thought I had tried just the ZoomRange properties, but I guess I hadn't. 

Thanks for your help. Always appreciated.

Highest regards,

-John Reilly.

 

 

 

 

Asked by
Reilly
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Reilly
Top achievements
Rank 1
Share this question
or