This issue arises when hiding a series in a chart utilizing a CombinedDomainXYPlot. While the range axes are automatically rescaled, the domain axis remains unadjusted. This article explores the reasons behind this behavior and offers solutions for manual rescaling.
CombinedDomainXYPlot establishes a combined maximum range for its domain axis in getDataRange() to enable sharing the axis. Modifying the visibility of a series or changing the dataset updates the shared domain axis through its configure() method. Notably, the subplot range axes can be altered independently.
To manually update the shared domain axis, one can toggle the setAutoRange() method or call configure() directly. However, these approaches may not yield the desired result as the data and its maximum range remain unchanged.
To automatically update the shared domain axis upon changing series visibility, utilize addSeries() or removeSeries() instead of setSeriesVisible().
The above is the detailed content of Why Doesn't CombinedDomainXYPlot Automatically Rescale the Domain Axis When Hiding Series?. For more information, please follow other related articles on the PHP Chinese website!