Make XYBubbleRenderer draw rectangles instead of ellipses

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
NRMarkham
Posts: 1
Joined: Thu Jun 28, 2018 8:09 pm
antibot: No, of course not.

Make XYBubbleRenderer draw rectangles instead of ellipses

Post by NRMarkham » Thu Jun 28, 2018 8:16 pm

I'm looking to use an XYBubbleRenderer, but have each "bubble" rendered as a square/rectangle rather than a circle/ellipse. I've accomplished this by overriding drawItem() and changing Ellipse2D to Rectangle2D, but that leaves an awful lot of code repeated.

Is there a better way to do this? If not, would the author be interested in a patch?

A related question is whether I can turn off the stroke+fill of the bubble's outline. XYBlockRenderer and XYShapeRenderer have the drawOutlines option, but not XYBubbleRenderer. Again, is there a way to do this, or could I submit a patch to enable it?

Locked