panzoombar for multiple y axis

2 posts, 0 answers
  1. jzhou
    jzhou avatar
    7 posts
    Member since:
    Jul 2015

    Posted 26 Oct 2015 Link to this post


     I created multiple y axis and line serieses dynamically, but the panzoombar for y axis disappear.

    How can I show the panzoombar for each y axis?

    Is it possible to hide the panzoombar automatically if there is no zoom, and show the panzoombar if there is zoom.


  2. Martin Ivanov
    Martin Ivanov avatar
    1451 posts

    Posted 28 Oct 2015 Link to this post

    Hi jzhou jzhou,

    RadChartView doesn't support zooming on individual axis. The zooming is shared between all axes. Note that the PanZoomBar will be displayed only if the chart has defined its axes. For example, if you add vertical axes only for the series, but not for the chart itself, the vertical PanZoomBar won't be displayed. We have a feature request for implementing individual axis zooming in our feedback portal where you can track its status. Also, you can take a look at the IndividualAxisZooming SDK example that demonstrates how you can achieve the desired effect using custom code.

    As for hiding the PanZoomBar based on the zoom level, you can subscribe for the PanOffsetChanged event of RadCartesianChart and change the PanZoomBar's Visbility in its handler. Here is an example with such customization:
    public partial class MainWindow : Window
        private PanZoomBar verticalPanZoomBar;
        public MainWindow()
            this.RadCartesianChart.PanOffsetChanged += RadCartesianChart_PanOffsetChanged;
            this.RadCartesianChart.Loaded += RadCartesianChart_Loaded;
        void RadCartesianChart_Loaded(object sender, RoutedEventArgs e)
            this.verticalPanZoomBar = this.RadCartesianChart.VerticalAxis.FindChildByType<PanZoomBar>();
        void RadCartesianChart_PanOffsetChanged(object sender, ChartPanOffsetChangedEventArgs e)
            if (this.verticalPanZoomBar == null)
            if (this.RadCartesianChart.VerticalZoomRangeStart == 0 &&
                this.RadCartesianChart.VerticalZoomRangeEnd == 1 )
                this.verticalPanZoomBar.Opacity = 0;
                if (this.verticalPanZoomBar.Opacity == 0)
                    this.verticalPanZoomBar.Opacity = 1;
    I hope this helps.

    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 Telerik Feedback Portal and vote to affect the priority of the items
Back to Top