Telerik Forums RSShttp://www.telerik.com/urn:uuid:c3f9fb1b-e1b9-4d86-9f5d-465e53eec3d6http://www.telerik.com/forums/permalink/G_v5w7nhhk2fXUZeU-7D1gHow to categorize data in chartHello Prashant,<br />
<br />
Thank you for getting back to us.<br />
<br />
While there is no method that sets a minimum zoom, you can use the <em>setZoomMode</em> method to achieve your desired scenario.<br />
Just set the zoom mode to none after you set up your pan zoom behavior so that you don't let user change the zoom level set by you:<br />
<br />
<br />
<div class="tFormatCodeBlock supportThreadCodeBlock" style="border: 1px solid #7f9db9; overflow-y: auto;" id="highlighter_30941">
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">panZoomBehavior.setZoomToChart(3, 1, 0, 0);</code></span></div>
<div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"><code style="color: #000000;">panZoomBehavior.setZoomMode(ChartPanZoomMode.NONE);</code></span></div>
</div>
<br />
I hope this information helps.<br />
<br />
Regards,<br />
Todor <br />
Telerik
<div class="forumBaloon">
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the <a target="_blank" href="http://www.telerik.com/support/feedback">
Telerik Feedback Portal</a>
and vote to affect the priority of the items
</div>urn:uuid:f157937b-623b-4cc5-a6ae-82691236d98bhttp://www.telerik.com/forums/permalink/e5NX8TtixUymroJpEjbZiwHow to categorize data in chart<p>Hi Todor,</p>
<p>Thanks for answering . Sorry but i have one more thing to ask.&nbsp;</p>
<p>I am using PAN and ZOOM behavior on X axis only. I have set initial zoom to the chart to show just 10 data points and rest chart is scrollable. But, user can Zoom in and Zoom out and hence labels create multiple lines while Zooming out as shown in the attached image. Is there any way to set MINIMUM ZOOM so that user won't be able to zoom out beyond a limit?&nbsp;</p>
<p>&nbsp;<span style="line-height: 1.5;">Thanks,</span></p>
<p>Prashant</p>urn:uuid:f2ed1848-c780-48ff-bf8a-8e3a7ec4e06dhttp://www.telerik.com/forums/permalink/SBjt8oDH_0i_io46fsTgbQHow to categorize data in chartHello Prashant,<br />
<br />
Thank you for your question.<br />
<br />
The DateTimeContinuousAxis has minimum and maximum properties that can be set in order to limit the visible data. Since you want to distribute your data for a single week, we can assume that you data actually fits within a week and we can use a random item to determine which week to show. Here's how to get the data from the first item and set limits for the axis:<br />
<br />
<div class="tFormatCodeBlock supportThreadCodeBlock" style="border: 1px solid #7f9db9; overflow-y: auto;" id="highlighter_34052">
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">Calendar minDate = </code><code style="color: #006699; font-weight: bold;">this</code><code style="color: #000000;">.getData().</code><code style="color: #006699; font-weight: bold;">get</code><code style="color: #000000;">(0).date;</code></span></div>
<div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"><code style="color: #000000;">minDate.</code><code style="color: #006699; font-weight: bold;">set</code><code style="color: #000000;">(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">axis.setMinimum(minDate);</code></span></div>
<div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"><code style="color: #000000;">Calendar maxDate = </code><code style="color: #006699; font-weight: bold;">this</code><code style="color: #000000;">.getData().</code><code style="color: #006699; font-weight: bold;">get</code><code style="color: #000000;">(0).date;</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">maxDate.</code><code style="color: #006699; font-weight: bold;">set</code><code style="color: #000000;">(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);</code></span></div>
<div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"><code style="color: #000000;">axis.setMaximum(maxDate);</code></span></div>
</div>
<br />
In this sample, getData returns a list of your data items and date is property that returns Calendar object.<br />
<br />
Regards,<br />
Todor <br />
Telerik
<div class="forumBaloon">
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the <a target="_blank" href="http://www.telerik.com/support/feedback">
Telerik Feedback Portal</a>
and vote to affect the priority of the items
</div>urn:uuid:4b319344-1b45-43b0-8863-67c86a481c6chttp://www.telerik.com/forums/permalink/RJMxS0UbsEOIY2fIakgcbAHow to categorize data in chart<p>Hi,<br />
<br />
One thing which i need urgently.<br />
<br />
* I want to categorize data in 7 week days which must start at "Sunday" and end at "Saturday" on DateTimeContinuous axis and distribute accordingly. I am getting date from API in MM/dd/yy format which i am converting to EEEE format to convert to days of week. But, my horizontal axis always start with the corresponding day of very first date received from API. Is there a way to set "Sunday" as Minimum and "Saturday" as maximum on DateTimeContinuous X-axis. Please refer to the attached image for more clarification of my requirement.</p>
<p>&nbsp;</p>
<p>Thanks,</p>
<p>Prashant<br />
<br />
</p>