A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
amusarra
- Posts: 2
- Joined: Wed Sep 12, 2012 9:26 am
- antibot: No, of course not.
Post
by amusarra » Wed Sep 12, 2012 9:33 am
Make the edges on the series is simple, but on how to make the graph shown in Figure 2 I did not find any example. The code shown to follow generates the graph shown in Figure 1. I would like to find a way to get the one shown in Figure 2.
Some of you has ever happened to this need? Is there an easy way to get the result?
Figura 1
Figura 2
Thank you very much.
-
remiohead
- Posts: 201
- Joined: Fri Oct 02, 2009 3:53 pm
- antibot: No, of course not.
Post
by remiohead » Wed Sep 12, 2012 5:08 pm
Someone correct me if I'm wrong but I don't think that's possible out of the box.
-
John Matthews
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm
Post
by John Matthews » Thu Sep 13, 2012 6:20 pm
Cross-posted
here. There's a suggestion to override
getItemOutlinePaint() and
getItemOutlineStroke(), as suggested in the
StackedBarRenderer API, but I haven't tried it.
-
remiohead
- Posts: 201
- Joined: Fri Oct 02, 2009 3:53 pm
- antibot: No, of course not.
Post
by remiohead » Thu Sep 13, 2012 7:24 pm
That draws the outline around the entire item.
Easiest way to get what you want is to extend StandardBarPainter and override paintBar(). Where it does the outline stuff in the original you just need to draw the left and right border for all items, and for the first row you also draw the bottom border and for the last row you also draw the top border.
-
John Matthews
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm
Post
by John Matthews » Fri Sep 14, 2012 9:42 pm
Given a suggestion to override getItemOutlinePaint() and getItemOutlineStroke()
That draws the outline around the entire item.
D'oh! Thanks for clarifying, remiohead, and for pointing to the BarPainter.
-
amusarra
- Posts: 2
- Joined: Wed Sep 12, 2012 9:26 am
- antibot: No, of course not.
Post
by amusarra » Mon Sep 17, 2012 10:16 pm
Thank you all for your suggestions, I will try to do a short test. I will keep you informed.
Bye,
Antonio.