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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to programmatically pan a ColumnSeries bar chart

Thread ID:





117652 Nov 24,2014 12:33 PM UTC Nov 25,2014 01:05 PM UTC WinRT 1
Tags: SfChart
Mark Riley
Asked On November 24, 2014 12:33 PM UTC

I have a bar chart with a Numerical y-axis and a Category x-axis.

Due to the large number of categories on the x-axis, I had to implement scrolling using the following behaviour:

       <chart:ChartZoomPanBehavior EnablePanning="True"/>

and also setting the 'ZoomFactor' on the CategoryAxis appropriately.

This works great, and you can scroll along with the mouse or by touch. However I also need to scroll the chart programmatically. So for example if I have a ZoomFactor of 0.5, I can see the first 50% of the bars. I want to then programmatically show the second 50% of the bars (i.e. without using the mouse or touch).

I can't see how to do this, so any help would be appreciated.

Magesh Kumar Krishnan [Syncfusion]
Replied On November 25, 2014 01:05 PM UTC

Hi Mark,

Thanks for using Syncfusion products.


SfChart provides the API called ZoomPosition for panning, we can use this property for programmatic panning requirement. It takes the values from 0 to 1. You can define the ZoomPosition property as in below code snippet.


Code snippet:


<chart:CategoryAxis Name="primaryAxis" EnableScrollBar="False" ZoomFactor="0.3" ZoomPosition="0.5" FontSize="20">



Please refer the link given below.

Link : http://help.syncfusion.com/ug/wpf/default.htm#!documents/zoomingandpanning.htm


We have prepared sample based on your requirement . please find the sample in the attachment.

Please let us know if you have any queries .



Magesh Kumar K

Attachment: ZoomPosition_af7f114a.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon