Remove ( or reduce) gaps between gantt bars

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
itstudent
Posts: 2
Joined: Mon Jul 07, 2014 1:33 pm
antibot: No, of course not.

Remove ( or reduce) gaps between gantt bars

Post by itstudent » Mon Jul 07, 2014 2:06 pm

Hello,

I want to reduce the gap between two Bars of two series. There is too much space between it. GridBagLayout is used

Code: Select all

gbc.ipady=500
...
setItemMargin(0.0)
setLowerMargin(0.1)
setUpperMargin(0.1)
setCategoryMargin(0.0) 
does not solve the problem.
These gap(s) are getting smaller when more bars are drawn.

Regards,

Oliver

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

Re: Remove ( or reduce) gaps between gantt bars

Post by david.gilbert » Tue Jul 08, 2014 6:07 am

setItemMargin(0) and setCategoryMargin(0) is what I would have suggested.
David Gilbert
JFreeChart Project Leader

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

itstudent
Posts: 2
Joined: Mon Jul 07, 2014 1:33 pm
antibot: No, of course not.

Re: Remove ( or reduce) gaps between gantt bars

Post by itstudent » Tue Jul 08, 2014 1:24 pm

Thanks for your reply and for the ganttchart application. 8)

I´ve changed the code, but the result is same as before.
I hope you have another joker to remove the gap completely.
I can change the Layout Manager, if you want.
The code is executed as an applet.

Locked