Resource Chart


JavaScript Resources Gantt Chart is one of two types of Gantt Charts. It is intended for showing the resources you have and spreading these resources along the timeline (into periods). Resources can be servers, equipment, vacancies of employees, expendable materials, or anything else.


The JS Resource Gantt Chart creation is the same as JS Project Chart except you should define the resource chat type using the ganttResource() method:

// create resource gantt chart
chart = anychart.ganttResource();

Here is a sample demonstrates how to create a simple Project Chart.



Also there is an ability to expand resources using parent property.

Method Description
expandAll() Allows to expand all tasks.
collapseAll() Used to collapse all tasks.
expandTask(taskID) Expands one task.
collapseTask(taskID) Collapses one task.



As shown above every resource has a set of its own properties:

"id": "1",
"name": "main server",
"periods": [..]

Each period has the id, name, start and end time.

"periods": [
      {"id": "1_1", "start": "2013-01-20", "end": "2013-03-02"}},
      {"id": "1_2", "start": "2013-03-20", "end": "2013-04-05")}}

Also you can define the appearance of the given period: