Autosize image size of a Gantt Chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
zebios
Posts: 1
Joined: Mon Oct 17, 2016 8:47 pm
antibot: No, of course not.
Contact:

Autosize image size of a Gantt Chart

Post by zebios » Mon Oct 17, 2016 8:48 pm

Hi everyone,
I'm using the JFreeChart library in order to create a Gantt Chart of a set of activities.
I used this syntax:

Code: Select all

BufferedImage objBufferedImage=objJFreechart.createBufferedImage(1200,800);
in order to create the image on which the chart will be deployed, but I would like to know if there is a way to let the program automatically set the image dimensions in relation of the bars that the dyagram will have.
Thank you

Gadget Shop - Cool Gadgets - Kitchen Gadget - Travel Gadgets - Pet Gadgets - Car Gadgets - Camping gear - Smartwatch on sale - Smart home gadgets
Last edited by zebios on Thu Jun 20, 2019 2:30 am, edited 5 times in total.

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

Re: Autosize image size of a Gantt Chart

Post by paradoxoff » Tue Oct 18, 2016 11:49 am

Unfortunately, there is no such way.
If you are willing to experiment, you can look at this patch. With a small extension to CategoryPlot, you should be able to achieve the desired effect.

Locked