Scaling fonts in smaller chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
superfield
Posts: 26
Joined: Thu Jun 07, 2007 10:07 pm

Scaling fonts in smaller chart

Post by superfield » Mon Jul 23, 2007 4:29 pm

Hi, I have a chart with 14 pt fonts on it. When the chart first shows up it is in a screen with 5 other charts, so the charts are kinda small. I have a button that allows the user to enlarge the chart, when the chart is enlarged it looks fine, the problem is that when it's small the fonts don't change size. I'm placing the chart in a chartpanel and placing that chartpanel on a JPanel with 5 other charts. I thought the chartpanel automatically scaled. How do I scale the fonts so that when the chart is small the fonts will be small also.

superfield
Posts: 26
Joined: Thu Jun 07, 2007 10:07 pm

Post by superfield » Mon Jul 23, 2007 9:29 pm

Nevermind I got a solution. I just changed passed the font size in the method, so when it's small it's 8, when it's big it's 14.

Locked