Adjusting Width of jQuery.Gantt chart

804 views
Skip to first unread message

Leoa

unread,
Oct 19, 2012, 7:17:32 AM10/19/12
to jquer...@googlegroups.com

I am using the jQuery plugin from this site http://mbielanczuk.com/2011/06/jquery-gantt-chart/.

I was able to implement it except I am having problems with the width and height. Example: http://www.txtease.com/android/push/login/schedule/mbielan/index.htm

From the link, you can see the chart does not fill up the screen.

  1. I have set the 'itemsperpage' parameter to 17.
  2. From what I have investigated, it looks like the width of the chart is based on the height. That number is divided for paginating.

  3. I put a width and height style around the chart in css. Only the height adjusted to 800px. The width remains the same

Andre

unread,
Oct 19, 2012, 11:00:37 AM10/19/12
to jquer...@googlegroups.com
Leoa,
I am not certain, but I believe if you had items that spanned a long enough date range, the chart would be wider.
I have only been using the plugin for about a week now. Also, you may want to check out: https://github.com/taitems/jQuery.Gantt
Good luck,
Andre

Tom W

unread,
Oct 19, 2012, 5:02:35 PM10/19/12
to jquer...@googlegroups.com
Is the width not controlled in the CSS by:
.fn-gantt .rightPanel {
float: left;
width: 1300px;
overflow: hidden;

Andre

unread,
Oct 19, 2012, 6:26:14 PM10/19/12
to jquer...@googlegroups.com
You are probably correct. I was speaking from a past experience where I had the chart's width controlled by it's "container". If I had a set of data whose results only ranged a small span of days, the grid part would not extend to the end of the width in the container. I do think the gantt chart's border was the correct width. Based on the example provided at the time of the post, it looked like the same problem I had in my experience. After reading the posts on this group that helped me understand the plugin, I felt I had to post my findings. I'm no JS/CSS master, but I thought I might post just in case they had the same issue.
Reply all
Reply to author
Forward
0 new messages