The StackedAreaChart contructor accepts any Axis as y-axis. But to support the "stacking" the y-axis must be a ValueAxis (we need numeric values that can be added together). It's already the same in StackedBarChart, which requires one of the axes to be a ValueAxis. In case of StackedBarChart, it's not enforced by the constructor as it allows both horizontal and vertical mode. StackedAreaChart doesn't have these modes.
So we should either create new constructors with ValueAxis and deprecate the old or do an "instanceof" check in current constructors are throw Exception if y-axis is not a ValueAxis
So we should either create new constructors with ValueAxis and deprecate the old or do an "instanceof" check in current constructors are throw Exception if y-axis is not a ValueAxis
- relates to
-
JDK-8093119 [StackedAreaChart] Display problem with StackedAreaChart when the axis is not displayed
- Resolved