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

[Solved] How do you set the pan position of a chart?

4 Answers 225 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dan
Top achievements
Rank 1
Dan asked on 09 Jan 2013, 05:14 AM
I've got a chart with a ChartPanAndZoomBehavior. How can I set the pan position programmatically? On Windows Phone, I could do this with chart.PanOffset, but I don't see this in the Windows 8 chart. There's a PlotOrigin, but it's read only.

4 Answers, 1 is accepted

Sort by
0
Accepted
Ivaylo Gergov
Telerik team
answered on 09 Jan 2013, 03:21 PM
Hi Dan,

Thank you for using our RadControls for Windows 8!

If I understand your scenario correctly you can take advantage of the RadCartesianChart.ScrollOffset property which takes Point(double x, double y)  value. It works in logical units, here is a sample setup.:

- You have initial zoom factor of 5 applied along the X-axis
- You want to have the third view displayed within the Viewport and have two views on the left and two on the right.

What you need to specify here is:

<telerikChart:RadCartesianChart ScrollOffset="-2,0">

Please let me know if you need further assistance in order to achieve your desired scenario.


Regards,
Ivaylo Gergov
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Dan
Top achievements
Rank 1
answered on 10 Jan 2013, 02:49 AM
Thanks, don't know how I missed that.
0
Dan
Top achievements
Rank 1
answered on 10 Jan 2013, 03:50 AM
Is there a way to see when the scroll value changes? I'd like to link two graphs to scroll together.
0
Ivaylo Gergov
Telerik team
answered on 10 Jan 2013, 11:44 AM
Hello Dan,

Thank you for getting back to us.

RadCartesianChart.ScrollOffset is a DependencyProperty and you can bind it to the ScrollOffset of another chart:
<telerik:RadCartesianChart ScrollOffset="{Binding ElementName=otherChart, Path=ScrollOffset, Mode=TwoWay}">

I hope this helps. Let me know if I can assist you in some other way.

 

All the best,
Ivaylo Gergov
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Chart for XAML
Asked by
Dan
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Dan
Top achievements
Rank 1
Share this question
or