Class TestForIssue585
java.lang.Object
org.knowm.xchart.standalone.issues.TestForIssue585
Demonstrates issue #585 — a symmetric colormap definition produces an asymmetric legend.
The gradient legend bar for the Vertical layout has its LinearGradientPaint "start" point
placed fontSize pixels above the actual bottom of the rectangle. This leaves a strip at
the bottom that is always clamped to rangeColors[0] (the min colour), making the
min-colour area visually larger than the max-colour area even when the colormap and data range
are perfectly symmetric.
Two windows open side by side — one for each LegendPosition — so the asymmetry is visible in both orientations. The colourmap intentionally goes blue → dark → blue to make the off-centre midpoint obvious.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HeatMapChartgetChart()static HeatMapChartHorizontal legend — shown for comparison.static HeatMapChartVertical legend — bug is visible here: blue band at the bottom is wider than at the top.static void
-
Constructor Details
-
TestForIssue585
public TestForIssue585()
-
-
Method Details
-
main
-
getChartVertical
Vertical legend — bug is visible here: blue band at the bottom is wider than at the top. -
getChartHorizontal
Horizontal legend — shown for comparison. -
getChart
-