Unplanned
Last Updated: 28 Mar 2023 08:27 by James
James
Created on: 28 Mar 2023 08:27
Category: Chart
Type: Bug Report
3
Chart: [UWP] Resetting the zoom does not work every time

When having the following code on a button click 

private void Button_Clicked(object sender, System.EventArgs e)
{
       this.chart.Zoom = new Size();
}

The chart zoom is reset first time, but when zooming again and pressing the button, the zoom level does not reset. You have to pan the chart, then zoom reset works. 

This code resets the zoom:

private void OnResetZoomClicked(object sender, EventArgs e)
{
	this.chart.Zoom = new Size(1, 1); // This line is added as a workaround to reset the Zoom level
	this.chart.Zoom = new Size();
}

 

 

0 comments