Gantt Chart Task Label Font Size

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tomcheng
Posts: 1
Joined: Wed Dec 31, 2014 7:29 am
antibot: No, of course not.

Gantt Chart Task Label Font Size

Post by tomcheng » Wed Dec 31, 2014 8:52 am

I put my Gantt Chart (ChartPanel) in a JScrollPane,and create a button named [zoom in].
The function for the button [zoom in] is:
When I click [zoom in] button, the width of chart panel will be doubled.

newSize = originalChartWidth * 2

Code: Select all

chartPanel.setPreferredSize(new java.awt.Dimension(newSize, 1000));
After click [zoom in] button, the scroll bar of JScrollPane will be appeared. Then the user can scroll to watch the whole chart after zoom in.

But there is a problem, When I double the chart panel width, The Task Label Font will be enlarged too.

Before zoom in
[img][IMG]http://i15.photobucket.com/albums/a365/ ... gantt1.jpg[/img][/img]

After zoom in (The font will be deformed and hard to read)
[img][IMG]http://i15.photobucket.com/albums/a365/ ... gantt2.jpg[/img][/img]

Is there any way to keep the original font after I double the chart panel width?

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

Re: Gantt Chart Task Label Font Size

Post by paradoxoff » Mon Jan 05, 2015 11:30 am


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

Re: Gantt Chart Task Label Font Size

Post by John Matthews » Tue Jan 06, 2015 11:37 am

Cross-posted here.

Locked