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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to redraw the chart while dragging the series out of the range?

Platform: UWP |
Control: SfChart |
Published Date: March 4, 2016 |
Last Revised Date: June 27, 2019 |
.NET Framework: 4.5


The chart series can be dragged out of the boundary range, i.e., the Minimum and Maximum values that are not defined for the axis. This article describes how to drag the series with explicit minimum and maximum values.


The chart can be redrawn in the predefined range by using the DragEnd event, which is used to add the functionalities after dragging. In the DragEnd event, you can get the new position and axis value where the segment is dragged.

Based on the new value, you can change the secondary axis and values of the Minimum and Maximum properties.


         <chart:CategoryAxis x:Name="axis1" />
         <chart:NumericalAxis x:Name="sec_axis" Minimum="10" Maximum="350" RangePadding="Round" Interval="50" />
    <chart:LineSeries XBindingPath="Product" YBindingPath="Price" DragEnd="LineSeries_DragEnd" ItemsSource="{Binding Products}" EnableDragTooltip="True" EnableSegmentDragging="True" >


private void LineSeries_DragEnd(object sender, Syncfusion.UI.Xaml.Charts.ChartDragEndEventArgs e)
                sec_axis.Minimum = e.NewYValue;
            else if(e.NewYValue>sec_axis.Maximum)
                sec_axis.Maximum = e.NewYValue;


LIne series before dragging in WPF

Figure 1: Initial segment position and preview dragging segment position.

Line series after dragging in WPF

Figure 2: Segment redrawn after dragging.

2X faster development

The ultimate UWP UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon