We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to show a particular range of data when the chart is loaded?

Hi,

I have a bar series with a large number of data points in the x-axis. So I am using the "ChartZoomPanBehaviour" to enable panning. Can the scroll position be changed to a different point? For example, I have item1 to item5 in the x-axis, when the chart is loaded, item1 is visible and I have to pan up to see item5. But I would like item5 to be visible first and pan down to see item1. Is it possible to obtain such behaviour?

Thank you.

1 Reply

KV Karthikeyan V Syncfusion Team January 8, 2014 06:29 AM UTC

Hi Mary,

Thanks for using Syncfusion products.

We have analysed the reported requirement. You can achieve your requirement by setting ZoomFactor and ZoomPosition as your zoom values.

Code Snippet [XAML]:

        <chart:SfChart>

            <chart:SfChart.Behaviors>

                <chart:ChartZoomPanBehavior  EnablePanning="True" />

            </chart:SfChart.Behaviors>

            <chart:SfChart.PrimaryAxis>

                <chart:CategoryAxis  ZoomFactor="0.8" ZoomPosition="0.8" Header="X (Meter)" />

            </chart:SfChart.PrimaryAxis>

            <chart:SfChart.SecondaryAxis>

                <chart:NumericalAxis Header="Elevation (Meter)" />

            </chart:SfChart.SecondaryAxis>

            <chart:BarSeries   XBindingPath="X"   YBindingPath="Elevation" ItemsSource="{Binding Products}">

            </chart:BarSeries>

        </chart:SfChart>

Please let us know if you have any query.

Thanks,

Karthikeyan V.


Loader.
Up arrow icon