onAddClicked
event handler, and added onEmptyCell
, so dev can bind on any (or multiple) events.onclick
event handler, use onItem
instead.
When including jQuery.resizable, it is possible to subscribe to the resize
event of an itemrender
was called twicedom.append()
, reworked using a stringbuffer
approachdivs
for individual cells, used a background image for the grid.offset()
and/or position()
when drawing cached positions of individual cells in header (e.g instead of calculating the position for a bar, using the cached numbers)repositionLabels()
completely, instead doing positioning via CSS - huge performance gain when scrolling$(".selector").gantt({ source: "ajax/data.json", scale: "weeks", minScale: "weeks", maxScale: "months" });
Parameter | Default | Accepts Type |
---|---|---|
source
|
null | Array, String (url) |
itemsPerPage
|
7 | Number |
months
|
["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] | Array |
days
|
["S", "M", "T", "W", "T", "F", "S"] | Array |
navigate
|
"buttons" | String ("buttons","scroll") |
scale
|
"days" | String |
maxScale
|
"months" | String |
minScale
|
"hours" | String |
waitText
|
"Please Wait..." | String |
onItem:
|
[] |
an Array containing the events for the empty aera of the datapanel. You can bind
multiple events, e.g mouseOver ond click, each binding to a different function.. Syntax: In case of using resize jQuery.resizable must be included.The parameter passed to the function is the event, the dataobject for the item, and a object containing the new value after resize (startDate or endDate). Only the changed value is supplied - e.g. resize on the right: endDate |
onEmptyCell |
[] |
an Array containing the events for the empty aera of the datapanel. You can bind
multiple events, e.g mouseOver ond click, each binding to a different function.. Syntax: JS Function that gets called when clicking on a Gantt-Item. The parameter passed to the function is the DateTime in ms for the clicked Cell, and the ID if the source object (row) |
resizeable |
false |
boolean Indicated wether the items can be resized. jQuery.UI.resizable must be included for this to work. |
onResize |
function (data, newValues){return} |
a JS Function that gets called when resizable is true and an items got resized.The parameter passed to the function is the dataobject for the item, and a object containing the new value after resize (startDate or endDate). Only the changed value is supplied - e.g. resize on the right: endDate |
useCookie |
true |
boolean indicates if cookies should be used to track the chart's state (scale, scrollposition) between postpacks jquery.cookie.js needs to be referenced for this to work |
scrollToToday |
true |
boolean indicates if the chart should scroll to today's date on loading. |
source: [{ name: "Example", desc: "Lorem ipsum dolor sit amet.", values: [ ... ] }]
Parameter | Default | Accepts Type | Meaning |
---|---|---|---|
name
|
null | String | Bold value in the left-most column of the gantt row. |
desc
|
null | String | Secondary value in the gantt row. |
values
|
null | Array | Collection of date ranges for gantt items. See next table. |
values: [{ to: "/Date(1328832000000)/", from: "/Date(1333411200000)/", desc: "Something", label: "Example Value", customClass: "ganttRed", dataObj: foo.bar[i] }]
Parameter | Accepts Type | Meaning |
---|---|---|
to
|
String (Date) | - |
from
|
String (Date) | - |
desc
|
String | Text that appears on hover, I think? |
label
|
String | Appears on the gantt item. |
customClass
|
String | Custom class to be applied to the gantt item. |
dataObj
|
All | A data object that is applied directly to the gantt item. |