#293 Item label position of zero values in StackedBars

closed-invalid
nobody
None
5
2012-02-13
2012-01-13
Andrea Riege
No

If rendering a StackedBarChart with stacked bars and positive values and an upper bar's value is zero, the item label should be displayed on the top of
the lower bar, not at the base of the axis. StackedBarRenderer handels the zero value as a negative value. It is an uncommon behaviour.

To do this you only have to add in StackedbarRenderer.java at line 332 an "="
--> boolean positive = (value > 0.0);

Version: jfreechart-1.0.13

Discussion

  • Andrea Riege
    Andrea Riege
    2012-01-13

    Fix for the StackedBarRenderer

     
  • Martin Höller
    Martin Höller
    2012-02-13

    You can use renderer.setPositiveItemLabelPositionFallback() to configure the behaviour you want.
    I can't see an obvious mistake in the code.
    If you still feel this is a bug, please provide more information and a small demo programm.

     
  • Martin Höller
    Martin Höller
    2012-02-13

    • status: open --> closed-invalid