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

Set ZoomAndPan Range on load

3 Answers 17 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 24 Mar 2014, 04:02 AM
I have a chart that loads with both PanAndZoom enabled. I am experimenting with zoom and in my constructor I am setting zoom as follows:

myRadCartesianChart.Zoom = new Size(10, 1);

When I do this, the pan and zoom bar is always on the far left side by default. Is there a way I can set the initial PanAndZoom so that it is set from the right? So if my X-axis is a continuous datetime, I want the panandzoom bar to initialize from the latest datetime to some earlier period of time.

See attached images. Currently it loads as zoombarload. I want zoombardesired.png. 

Also, in the event where there are a lot of dates along the the X-axis, there X-axis gets crowded. Is there a setting so that the interval of dates displayed are appropriately chosen and spaced to avoid crowding?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 25 Mar 2014, 10:16 AM
Hi Terry,

I suggest you do not use the Zoom property, but instead use the HorizontalZoomRangeStart and HorizontalZoomRangeEnd properties of the chart. They work in relative units, from 0 to 1.

Regards,
Petar Marchev
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Terry
Top achievements
Rank 1
answered on 26 Mar 2014, 01:12 PM

Thanks.

how about the second part? Auto-adjusting the labels on the x-axis so when there are lots of x-items fewer are displayed automatically.

0
Petar Marchev
Telerik team
answered on 27 Mar 2014, 09:00 AM
Hello Terry,

I apologize for overlooking the second question. Unfortunately, we do not have such an autimatic-step built-in funcionality, that will change the step of the axis based on its size. Perhaps you can use one of our LabelFitModes. You can set the LabelFitMode of the axis and see which mode best suits your needs. You can also set a LabelFormat to make the label shorter, or set a label template to have a two-row label, if this would fulfill your requirements. 

Let me know if there is anything else I can help you with. 

Regards,
Petar Marchev
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
ChartView
Asked by
Terry
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Terry
Top achievements
Rank 1
Share this question
or