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

Dynamically Resize Y Axis

Thread ID:





119164 May 16,2015 07:54 AM UTC May 20,2015 09:15 AM UTC WPF 2
Tags: SfChart
Tim Douglas
Asked On May 16, 2015 07:54 AM UTC


Currently I dynamically resize the X axis using code from the ChartAutoScrollingDemo_2013 as below.  I've tried to adpat this to the Y axis but when doing so the candles are no longer plotted although I can the chart is functioning as the X asix continues to scroll.

Is this possible to do?


Xaxis - works

       public void XAxis_ActualRangeChanged(object sender, ActualRangeChangedEventArgs e)
            if (e.IsScrolling)
            e.VisibleMinimum = (double)e.ActualMaximum - 100d;

Yaxis - Candles do not render

        private void YAxis_ActualRangeChanged(object sender, ActualRangeChangedEventArgs e)
            if (e.IsScrolling)
            e.VisibleMinimum = Convert.ToDouble(e.ActualMaximum) + 10;

XAML code



                <charts:DateTimeCategoryAxis ShowTrackBallInfo="True" LabelFormat="HH:mm" Interval="20" IntervalType="Minutes" EnableScrollBar="True" ActualRangeChanged="XAxis_ActualRangeChanged" Margin="4"/>
                <charts:NumericalAxis  ShowTrackBallInfo="True" OpposedPosition="True" Margin="-2" ActualRangeChanged="YAxis_ActualRangeChanged" />

            <charts:CandleSeries Name="series" ItemsSource="{Binding obPriceBar}" StrokeThickness="1" XBindingPath="DateTime"  High="High" Open="Open" Close="Close"
                                 Low="Low"  Label="Candleseries" ShowTooltip="True" BearFillColor="Blue" BullFillColor="Red"
                                 charts:ChartTooltip.HorizontalAlignment="Left" charts:ChartTooltip.TooltipMargin="10"

Suresh S [Syncfusion]
Replied On May 18, 2015 12:30 PM UTC

Hi Tim,

We were able to reproduce the issue and we have confirmed this as bug and logged a report on this. Also we have created a support incident under your account to track the status of this issue.

Please log on to our support website to check for further updates.

Link: https://www.syncfusion.com/account/login


Suresh S

Satheesh Kumar T [Syncfusion]
Replied On May 20, 2015 09:15 AM UTC

Hi Tim,
Please ignore the previous update.
Upon further analysis with your problem in source, we have confirmed this as a behavior. Please find the details below.

Event Arguments

Use Case


Get or set the start value of the axis.


Get or set end value of the axis.

VisibleMinimum & VisibleMaximum

To define the range of values to be display for the view port.

Note: VisibleMinimum and VisibleMaximum should be lay between the ActualMinimum and ActualMaximum.
In your code snippet, we have noticed the below code.
e.VisibleMinimum = Convert.ToDouble(e.ActualMaximum) + 10d;
It will results to VisibleMinimum is greater than ActualMaximum, then it will not work.

If your requirement is to show only the last few range of values in Y Axis as like AutoScrolling Demo, we can set VisibleMinimum as below:
e.VisibleMinimum = (double)e.ActualMaximum - 100d; //to view last 100 range values in view port.
e.VisibleMinimum = Convert.ToDouble(e.ActualMinimum) + 10d; //to ignore the 10 initial values.
Note: If this is not your requirement, please provide more information regarding your requirement so that we can provide you the better solution.
Please let us know, if you need any further assistance.
Satheesh Kumar T


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

This page will automatically be redirected to the 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