The chart does not reset when Minimum and Maximum values are set.

I’m using a WPF Chart.

When I set the Minimum and Maximum values on the chart, the graph is drawn correctly.
However, when I try to clear the graph using Clear(), it doesn’t get erased.
If I don’t set the Minimum and Maximum values, Clear() works as expected


Code:

<chart:SfChart Grid.Column="0"

        ColorModel="{StaticResource CustomColor}"

        Margin="5,0,10,0"

        Palette="Custom"

        Header="CH 1"

        FontSize="22">

    <chart:SfChart.PrimaryAxis>

        <chart:NumericalAxis

             Header="Bin"

             EnableScrollBar="True"

             ThumbLabelVisibility="Visible"

             ShowGridLines="True"

             ShowTrackBallInfo="True"/>

    </chart:SfChart.PrimaryAxis>


    <chart:SfChart.SecondaryAxis>

        <chart:NumericalAxis

             HorizontalAlignment="Center"

             Header="dB"

             Minimum="{Binding FftYAxisMinimum}" Maximum="{Binding FftYAxisMaximum}"

             ThumbLabelVisibility="Visible"

             ShowGridLines="True"

             ShowTrackBallInfo="True"/>

    </chart:SfChart.SecondaryAxis>


    <chart:SfChart.Series>

        <chart:FastLineBitmapSeries

             ItemsSource="{Binding ChartCh1FFT}"

             XBindingPath="XValue"

             YBindingPath="YValue"/>

    </chart:SfChart.Series>


    <chart:SfChart.Behaviors>

        <chart:ChartTrackBallBehavior PositionChanged="ChartTrackBallBehavior_PositionChanged"/>

        <chart:ChartZoomPanBehavior EnableMouseWheelZooming="True" />

    </chart:SfChart.Behaviors>

</chart:SfChart>



Be-hind Code

void Clear()

{

    this.viewmodel. ChartCh1FFT.Clear()

}


2 Replies

AJ Arul Jenith Berkmans Syncfusion Team November 7, 2025 01:03 PM UTC

Hi Han Kyu Hyeong,

 

Following our validation, we’ve confirmed that the issue appears when using a numerical axis. Other axis types are unaffected. At the code level, the bitmap is cleared from the buffer, but the UI is not updating as expected. We’re actively investigating the root cause and will share more details as soon as they’re available.

 

In the meantime, as a workaround, you can force a UI refresh by toggling any bindable property on the chart or axis (for example, EnableScrollBar). This triggers a re-render of the chart.

 

Sample snippets for reference:

 

XAML:

 

<chart:SfChart.PrimaryAxis>

        <chart:NumericalAxis x:Name="numericAxis"

             Header="Bin"

             EnableScrollBar="True"

             ThumbLabelVisibility="Visible"

             ShowGridLines="True"

             ShowTrackBallInfo="True"/>

    </chart:SfChart.PrimaryAxis>

 

C#:
 

void Clear()

{

    this.viewmodel.ChartCh1FFT.Clear();

 

    // Toggle a bindable property to force a re-render of the chart UI.

    // Example: flip EnableScrollBar off and on.

    numericAxis.EnableScrollBar = false;

    numericAxis.EnableScrollBar = true;

}

 

Thank you for your understanding and patience while we work on a permanent fix.

 

Regards,

Arul Jenith B.



VR Vallarasu Ravichandran Syncfusion Team December 2, 2025 10:35 AM UTC

Hi Han Kyu Hyeong,

 

We have fixed the reported issue and included the issue fix in our latest weekly NuGet release update version 31.2.16, which is available for download at nuget.org .

 

NuGet Version: 31.2.16 

 

Root cause: 

The root cause of issue is the chart’s bitmap rendering logic did not refresh when axis range (Minimum/Maximum) was explicitly set. The internal condition for clearing bitmap series skipped updates when these properties were applied.

 

We appreciate your support and patience. Please feel free to contact us if you need any further assistance.

 

Regards,

Vallarasu R.


Loader.
Up arrow icon