Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript Resource Planning Component / Gantt Chart with Editing Capabilities

I'm looking for a JS-based Resource Planning Component, where i have the available resources on the left and the resource load on the right.

enter image description here

So far i only found a few gantt chart implementation, which lack add, move and editing capabilitys. I wounder whether such a component exists.

like image 261
worenga Avatar asked Mar 29 '13 20:03

worenga


People also ask

How do I create a Gantt chart in Javascript?

Creating a JS Gantt chart in 4 stepsStep 1: Preparing the data. Step 2: Getting dependencies. Step 3: Declaring the chart container. Step 4: Rendering the Gantt chart.

What is Dhtmlx Gantt?

DHTMLX Gantt is a full-featured Gantt chart for cross-browser and cross-platform applications. The most complete library to cover all the needs of a project management app.


2 Answers

I don't know of any out of the box solutions, but this is something that could probably be implemented somewhat easily. If you create several divs for rows, and then sub-divs for resources, you could build something like the spec.

  1. First, keep track of all the resources, and the durations, in some kind of a datastructure.

    • I'd probably use backbone JS's models, since that's what I use for most everything.
  2. Create a render function, that places an array of resources on the page, and lays them out, etc.

  3. Create add/remove functions that add/remove elements, then call the render function to relayout the elements

  4. To add dragging, I'd use jQuery UI Draggable, this makes it fairly easy to drag elements, and includes places for attaching callbacks when elements are dragged, dropped, etc.

    • This may take some doing, as dragging the duration of the events/resources may not be perfectly straightforward.
like image 162
Jeremy Blalock Avatar answered Nov 01 '22 05:11

Jeremy Blalock


There is a quite nice library called DHTMLX Scheduler which also includes a timeline view: http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml You can get the free GNU GPL version or a commercial one. A running example can be found here: http://booking.javaplanner.com/

like image 29
ddawg Avatar answered Nov 01 '22 05:11

ddawg