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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
I believe a call to AxisChange should update the y axis scale.
AxisChange sets the axis to the min and max over the entire of data set, not just the data displayed on the screen.