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

Scrolling issue with Non Numeric X-Axis labels

1 Answer 76 Views
Chart
This is a migrated thread and some comments may be shown as answers.
SivaPrasad Bevara
Top achievements
Rank 1
SivaPrasad Bevara asked on 26 Sep 2011, 12:15 PM
Hi,

I am using Bar Chart for dipslaying the Categories and its counts.
I am displaying the Category Name in the X-Aixs. I have 16 Categories to display in the X-Axis.
The category labels are overlapping, when I display all the categories. So I wanted to use the scrolling for displaying the Categories.

I tried scrolling with the following code.
ZoomScrollSettings zoomSettings = new ZoomScrollSettings();
zoomSettings.ScrollMode = ScrollMode.ScrollOnly;
_chartArea.ZoomScrollSettingsX = zoomSettings;
But it is not working. It is just shrinking the Items within the Chart Area.

In all the examples I have seen, the scrolling is implemented with the Numeric X-Axis labels.

Please provide some samples for implemeting the scrolling with Non Numeric X-Axis labels.

I tried with setting the LabelStep. I think it will element some categories. I want to display all the categories with scrolling.

Please help.

Regards,
SivaPrasad.B

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 29 Sep 2011, 08:24 AM
Hello Sivaprasad Bevara,

We have had an issue when using the ScrollOnly mode in the 2011.Q2 release ( version 2011.2.712 ), that has been fixed for the Service Pack ( version 2011.2.920 ), which caused the scroll bar not to be displayed.

In order to display only a specific range from the axis you would need to set the RangeStart, RangeEnd and also SliderSelectionStart and SliderSelectionEnd properties. Here is a sample code snippet demonstrating how to set the Zoom/Scroll setting for the X axis :
<telerik:ChartArea.ZoomScrollSettingsX>
                            <telerik:ZoomScrollSettings ScrollMode="ScrollOnly" RangeStart="0.2" RangeEnd="0.4" SliderSelectionStart="0.2" SliderSelectionEnd="0.4"/>
                        </telerik:ChartArea.ZoomScrollSettingsX>

This way scrolling would work for numeric, as well as categorical values.

Hope this helps.

Kind regards,
Nikolay
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
SivaPrasad Bevara
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or