Home > Java > javaTutorial > Why Doesn't CombinedDomainXYPlot Automatically Rescale the Domain Axis When Hiding Series?

Why Doesn't CombinedDomainXYPlot Automatically Rescale the Domain Axis When Hiding Series?

Linda Hamilton
Release: 2024-12-11 07:00:10
Original
975 people have browsed it

Why Doesn't CombinedDomainXYPlot Automatically Rescale the Domain Axis When Hiding Series?

CombinedDomainXYPlot Domain Axis Rescaling

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.

Shared Domain Axis in CombinedDomainXYPlot

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.

Manual Rescaling

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.

Automatic Rescaling

To automatically update the shared domain axis upon changing series visibility, utilize addSeries() or removeSeries() instead of setSeriesVisible().

Additional Considerations

  • Attention should be paid to the initial thread and pack() method when setting up the chart.
  • An example with an image is provided to illustrate the combined plot and its controls for updating data and toggling series visibility.

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template