You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While investigating issue #32 using the demo app, I first added the ability to set the time-axis lower and upper margin values in ChartBuilder. While this worked fine for time-gapped charts that use DateAxis, this quickly became non-trivial for gapless charts that rely on NumberAxis. Part of the issue was the gapless chart NumberAxis not adding tick labels in the margin area of the axis like DateAxis does. The other was if the margin value was set near or above 0.01 (1% of the axis range) in gapless charts, then the logic in NumberAxis#selectHorizontalAutoTickUnit(Graphics2D, Rectangle2D, RectangleEdge) would "guess" a number of ticks that was way too large. The result was too many closely packed tick labels with labels and plotted data overlapping. It seemed to have to do with the TickUnit size being calculated too small (~2.0) as opposed to a value of 5.0. When I hard-coded the gapless chart tick unit to 5.0 it created a nice amount of ticks with margin values above 0.01.
This ticket is to find a way to allow setting top/right/bottom/left margin values with charts rendering OK.
The text was updated successfully, but these errors were encountered:
While investigating issue #32 using the demo app, I first added the ability to set the time-axis lower and upper margin values in
ChartBuilder
. While this worked fine for time-gapped charts that useDateAxis
, this quickly became non-trivial for gapless charts that rely onNumberAxis
. Part of the issue was the gapless chartNumberAxis
not adding tick labels in the margin area of the axis likeDateAxis
does. The other was if the margin value was set near or above 0.01 (1% of the axis range) in gapless charts, then the logic in NumberAxis#selectHorizontalAutoTickUnit(Graphics2D, Rectangle2D, RectangleEdge) would "guess" a number of ticks that was way too large. The result was too many closely packed tick labels with labels and plotted data overlapping. It seemed to have to do with theTickUnit
size being calculated too small (~2.0) as opposed to a value of 5.0. When I hard-coded the gapless chart tick unit to 5.0 it created a nice amount of ticks with margin values above 0.01.This ticket is to find a way to allow setting top/right/bottom/left margin values with charts rendering OK.
The text was updated successfully, but these errors were encountered: