Bar Outline issues in v1.0.13

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
mpassell
Posts: 5
Joined: Wed Oct 07, 2009 7:15 pm
antibot: No, of course not.
Location: Waltham, MA USA
Contact:

Bar Outline issues in v1.0.13

Post by mpassell » Mon Jun 07, 2010 8:52 pm

The product I work on for a client recently upgraded from a much earlier version of JFreeChart (1.0.0, I believe) to version 1.0.13. In general, it's been a fairly smooth transition, but we've noticed a few problems. We managed to work around most of them, but this one's tougher. If you have an XYBarRenderer with drawBarOutline set to true, there used to be logic in place that would cease to draw the outline when the bar width dropped below a certain threshold. This no longer happens. Looking at StandardXYBarPainter, the following line of paintBar() is commented out:

Code: Select all

// && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
Is there any way to restore the old behavior without modifying the source of JFreeChart? If I do have to modify the source, any suggestions? My thought was to look at the width of the RectangularShape passed into paintBar() and make the decision based on that. Sound reasonable?

Thanks,
Matt

Locked