Change Legend Ring Plot

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
avakado
Posts: 8
Joined: Tue Dec 06, 2016 5:55 pm
antibot: No, of course not.

Change Legend Ring Plot

Post by avakado » Mon Dec 26, 2016 1:26 pm

I have 2 questions about Legend here is my chart screen : http://imgur.com/BXAggeo
1) How can i put blue small rectangle after 10 in legend ? so how can i change position of small blue rectangle in legend area?
2) Is it possible to put legend area inside plot area. Currently it's in chart area.

avakado
Posts: 8
Joined: Tue Dec 06, 2016 5:55 pm
antibot: No, of course not.

Re: Change Legend Ring Plot

Post by avakado » Fri Dec 30, 2016 10:13 am

up

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Change Legend Ring Plot

Post by paradoxoff » Fri Dec 30, 2016 2:14 pm

Do you want to interrupt the legend string "10 - 20 (30)" with the blue rectangle, or just want to change the order of the legend string and symbol?

avakado
Posts: 8
Joined: Tue Dec 06, 2016 5:55 pm
antibot: No, of course not.

Re: Change Legend Ring Plot

Post by avakado » Tue Jan 03, 2017 10:18 am

/
Last edited by avakado on Tue Jan 03, 2017 10:19 am, edited 1 time in total.

avakado
Posts: 8
Joined: Tue Dec 06, 2016 5:55 pm
antibot: No, of course not.

Re: Change Legend Ring Plot

Post by avakado » Tue Jan 03, 2017 10:18 am

paradoxoff wrote:Do you want to interrupt the legend string "10 - 20 (30)" with the blue rectangle, or just want to change the order of the legend string and symbol?
I want to interrupt the legend string "10 - 20 (30)" with the blue rectangle

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Change Legend Ring Plot

Post by paradoxoff » Tue Jan 03, 2017 6:00 pm

So you want to have 2 strings per legend item, with a symbol in between? if the strings a symbols of different legend items need to be horizontally aligned, this can easily become a signifcant amount of work involving the generation of a nested BlockContainer or maybe a new Arrangement class. Is this a must-have or a nice-to-have? And for what purpose do you need it?

John Matthews
Posts: 513
Joined: Wed Sep 12, 2007 3:18 pm

Re: Change Legend Ring Plot

Post by John Matthews » Wed Jan 04, 2017 9:55 am

Alternatively, if you're using Swing, consider the approach shown here, which uses getLegendItems() to create a GridLayout of Icon instances.

Image

Locked