Legend size problem

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
flipper203
Posts: 2
Joined: Wed Jun 17, 2009 12:07 pm

Legend size problem

Post by flipper203 » Thu Jun 18, 2009 9:49 am

Hello,
I am generating a Stacked bar graph and I put it in an excel file via apache POI. I use the ChartUtilities.writeChartAsPNG method, but as the result has not a good quality, I generate a bug chart and resize it to put it in the excel file. So I changed the size of the fonts of th graph, but I still have a problem with the legend.
I changed the size of the fonts of the legend, this point is ok, but the squares which show the colo of the series are too small to be visible and I don't find the way to resize it.
Can anyone help me on this.

Thanks

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Legend size problem

Post by david.gilbert » Thu Jun 18, 2009 2:37 pm

I didn't try, but you should be able to call setBaseLegendShape() in the renderer and set the displayed shape to something larger.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

flipper203
Posts: 2
Joined: Wed Jun 17, 2009 12:07 pm

Re: Legend size problem

Post by flipper203 » Fri Jun 19, 2009 8:27 am

Thanks, it worked.
I just have another question, about the quality of the images generated by the ChartUtilities.writeChartAsPNG. Is there a way to get better image quality than with this method. I ve seen the method getHiResChartImage on the forum but I don't find the way to make it work as expected. Does someone have any clue on this?

thanks

skalluraya
Posts: 15
Joined: Fri Jan 23, 2009 5:36 am

Re: Legend size problem

Post by skalluraya » Thu Jul 30, 2009 12:06 pm

Hi flipper203,

Can u tell me how did you put an image in Excel using poi. some brief method.

Locked