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

Replacement for PanOffset?

1 Answer 57 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Scott
Top achievements
Rank 1
Scott asked on 27 Jan 2015, 04:30 PM
I've built several Windows Phone apps in the past, using your "UI For Windows Phone".  I use RadCartesianChart for my charts and DateTimeContinuous axis for my x-axis.  I always bind the charts dynamically (in my view model).  For pannable charts,  I've always set the PanOffset to the calculated width of my entire chart minus the plot width of the canvas.  

Now I'm building a Windows Phone project using "UI For Windows Universal" and I've discovered that PanOffset is no longer a member of RadCartesianChart.  How do I handle panning now?  I've tried to set ScrollOffset to the fraction of the page that is not shown, but when I set ScrollOffset in my code, it doesn't retain the value to which I set it.  Can you point me to a link that explains the difference between panning in the old phone library and panning in the new library?

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 30 Jan 2015, 08:46 AM
Hi Scott,

It is now ScrollOffset and it is somewhat different from PanOffset in WindowsPhone. It still follows the paradigm that in order to view the chart to the right, you actually "pan" it to the left, hence the negative X coordinate for the point. The change is that now these are units, which are relative to the viewport, e.g. (-1, 0) will scroll one viewport width. This way you will not need to calculate the width of the plot area. Instead, if you need to scroll the chart to the far right you can use new Point(Zoom.Width - 1, 0)

Best regards,
Ves
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
Chart
Asked by
Scott
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or