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

Set initial pan position of a chart?

5 Answers 63 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.
Dominic
Top achievements
Rank 1
Dominic asked on 03 Sep 2013, 01:17 AM
Hey Telerik Team,

2 quick questions:

1. How do I set the starting position of the pan and zoom chart? Eg, I have a series of dates but I want the view to begin at the farthest point on the X axis. Then the user can scroll back in time if they desire. Currently it always begins at the first (left most date).

2. Is it possible to only show ticks for the date of the data? Eg, 1 June,15 June, 22 July, 24 July, 28 July, 3 Sept. If so, how?

I'll be using the chart for WP7 and WP8.

I've tried to find the answer online and the forums without luck.

Thanks,
Dominic

5 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 04 Sep 2013, 03:29 PM
Hi Dominic,

Thanks for writing.

1. You can use the PanOffset property to do this. Just set it to a Point instance with a very large X value and the chart will pan to its end by clamping the value to the biggest possible according to the provided data.

2. You can format the labels by providing a corresponding string format. That is done by using the LabelFormat property as described here:

http://www.telerik.com/help/windows-phone/radchart-axes-datetimeaxes.html

I hope this helps.

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
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
Dominic
Top achievements
Rank 1
answered on 04 Sep 2013, 09:34 PM
Good to hear from you Deyan,

1. Thanks, that solved my first question.

2. The question wasn't related to label formatting - I've got that sorted. I was asking how do I only show dates on the x axis that correspond directly to my data. So if my data is at irregular intervals such as 1 June,15 June, 22 July, 24 July, 28 July, 3 Sept, how do I only have those ticks appear on the chart evenly spaced?

Thanks,
Dominic
0
Deyan
Telerik team
answered on 09 Sep 2013, 11:31 AM
Hi Dominic,

Thanks for writing back and for the further details on your questions.

I think the best option here would be to use a Categorical Axis instead of DateTime one. In this way you will be able to display the exact values and format them accordingly:

http://www.telerik.com/help/windows-phone/radchart-axes-categoricalaxis.html

Let me know if you need further assistance with this.

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
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
Dominic
Top achievements
Rank 1
answered on 11 Sep 2013, 08:23 AM
Cheers for the reply Deyan,

I had a look at the chart you recommended.

Would you be able to provide a simple example how to create it with a pan ability?

I tried but couldn't get it working.

Thanks,
Dominic

0
Deyan
Telerik team
answered on 16 Sep 2013, 07:14 AM
Hi Dominic,

You do not need to implement anything to enable the Pan and Zoom functionality. You should simply make sure enough data is loaded into the chart so that it exceeds the viewport. Then you simply need to define a Pan and Zoom behavior for it and it will work as expected:

http://www.telerik.com/help/windows-phone/radchart-features-panzoom.html

If you still find it difficult to do this, please open a new support ticket and send me your project so that I can setup it for you.

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
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 >>
Tags
Chart
Asked by
Dominic
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Dominic
Top achievements
Rank 1
Share this question
or