Home > Mobile >  Live Charts, How do i make the graph to follow the last data updates after changing zoom
Live Charts, How do i make the graph to follow the last data updates after changing zoom

Time:08-03

How do i make Live Charts graph to show the last update after changing zoom https://i.stack.imgur.com/fECsZ.png

CodePudding user response:

I face the same problem after zooming and panning. My way is to let the user reset the zoom and panning when they are done looking at the point they want. I did it in code behind when the reset button is clicked.

             private void btn_Reset_Click(object sender, RoutedEventArgs e)
                {    
                      foreach (var XAxis in ConstantChangeCartesianChart.AxisX)                    
                      {
                        XAxis.MinValue = double.NaN;
                        XAxis.SetRange(double.NaN, double.NaN);
                      }
                      foreach (var YAxis in ConstantChangeCartesianChart.AxisX)
                      {
                        YAxis.MinValue = double.NaN;
                        YAxis.SetRange(double.NaN, double.NaN);
                      }
                }

This will simply reset all the range and minimum value. Hope this help.

  • Related