Rescaling the Domain Axis in a CombinedDomainXYPlot
The CombinedDomainXYPlot allows for multiple subplots to share a common domain axis. However, when hiding a series, only the range axes automatically rescale while the domain axis remains unchanged. This article explores ways to manually refresh the scaling or enable automatic scaling of the domain axis.
Data Range Establishment
CombinedDomainXYPlot establishes the combined maximum range for its shared domain axis in its getDataRange() method. This is crucial for axis sharing among subplots. Changing series visibility has no impact on the domain axis, while modifying the dataset updates it through its configure() method.
Manual Refresh or Automatic Update
To manually refresh the domain axis after hiding a series:
mainPlot.getDomainAxis().configure();
To enable automatic updates of the domain axis, use addSeries() or removeSeries() instead of setSeriesVisible().
Additional Considerations
The above is the detailed content of How to Rescale the Domain Axis in a CombinedDomainXYPlot After Hiding Series?. For more information, please follow other related articles on the PHP Chinese website!