Menu

Change axis to scale to shown data

Help
Nick
2008-12-04
2012-09-19
  • Nick

    Nick - 2008-12-04

    I have long list of data over time, but I allow the user to change the range of the xaxis. However, when I change the x axis, the y axis' min and max are still the min and max over the entire range of data, not just the range being displayed. Is there a way to automatically change the y axis to just data within the specified x min and max?

    Thanks.

    -Nick

     
    • tfjield

      tfjield - 2008-12-22

      I believe the answer is that you need to set the flag IsBoundedRanges.

      From the help file:

      Namespaces ► ZedGraph ► GraphPane ► IsBoundedRanges

      Gets or sets a boolean value that determines if the auto-scaled axis ranges will subset the data points based on any manually set scale range values.

      Declaration Syntax
      C# Visual Basic Visual C++

      public bool IsBoundedRanges{ get; set;}
      Public Property IsBoundedRanges As Boolean
      public:
      property bool IsBoundedRanges {
      bool get ();
      void set (bool value);
      }

      Remarks
      The bounds provide a means to subset the data. For example, if all the axes are set to autoscale, then the full range of data are used. But, if the XAxis.Min and XAxis.Max values are manually set, then the Y data range will reflect the Y values within the bounds of XAxis.Min and XAxis.Max. Set to true to subset the data, or false to always include all data points when calculating scale ranges.

       
    • Ronan O Sullivan

      I believe a call to AxisChange should update the y axis scale.

       
    • Nick

      Nick - 2008-12-05

      AxisChange sets the axis to the min and max over the entire of data set, not just the data displayed on the screen.

       

Log in to post a comment.

MongoDB Logo MongoDB