[Canonical page](<https://docs.dhtmlx.com/planning-engine/js/api/types/project-data/>)
[Full documentation index](<https://docs.dhtmlx.com/planning-engine/llms.txt>)


# ProjectData

A whole plan as one plain object: its tasks, plus optional config, calendars, links, resources and assignments. Input only: build it and pass it to [`Project#solve`](<https://docs.dhtmlx.com/planning-engine/js/api/project-solve.md>), [`Project#analyze`](<https://docs.dhtmlx.com/planning-engine/js/api/project-analyze.md>) or [`schedule`](<https://docs.dhtmlx.com/planning-engine/js/api/schedule.md>). No call returns it.

## Fields

| Field | Type | Default | Description |
|---|---|---|---|
| `tasks` | [`TaskData`](<https://docs.dhtmlx.com/planning-engine/js/api/types/task-data.md>)`[]` | required | The tasks of the plan. |
| `config` | [`SchedulingConfig`](<https://docs.dhtmlx.com/planning-engine/js/api/types/scheduling-config.md>) | every field at its default | Scheduling switches for the whole plan. `null` reads as omitted. |
| `calendars` | [`CalendarData`](<https://docs.dhtmlx.com/planning-engine/js/api/types/calendar-data.md>)`[]` | `[]` | Working-time calendars that tasks and resources reference by id. |
| `links` | [`LinkData`](<https://docs.dhtmlx.com/planning-engine/js/api/types/link-data.md>)`[]` | `[]` | Dependencies between tasks. |
| `resources` | [`ResourceData`](<https://docs.dhtmlx.com/planning-engine/js/api/types/common.md#resourcedata>)`[]` | `[]` | Resources that assignments book. |
| `assignments` | [`AssignmentData`](<https://docs.dhtmlx.com/planning-engine/js/api/types/assignment-data.md>)`[]` | `[]` | Resource bookings on tasks. |

An optional array can be left out or set to `undefined`. `null` in place of an array is a parse error. Unknown fields are ignored, both on `ProjectData` and in the records inside it, so objects with extra UI fields can be passed as they are.

Date fields take a [`DateValue`](<https://docs.dhtmlx.com/planning-engine/js/api/types/common.md#datevalue>): a string or a local `Date`.

## Used by

- [`Project#solve`](<https://docs.dhtmlx.com/planning-engine/js/api/project-solve.md>): `data` loads the plan into the project and schedules it
- [`Project#analyze`](<https://docs.dhtmlx.com/planning-engine/js/api/project-analyze.md>): `data` supplies the dates to analyze without loading them
- [`schedule`](<https://docs.dhtmlx.com/planning-engine/js/api/schedule.md>): `data` is the plan to schedule once

## Example

```js
const data = {
  config: { duration_unit: "day" },
  calendars: [{ id: "global", worktime: { hours: ["8:00-12:00", "13:00-17:00"] } }],
  tasks: [
    { id: 1, start_date: "2026-03-02 08:00", duration: 3 },
    { id: 2, start_date: "2026-03-02 08:00", duration: 2 },
  ],
  links: [{ id: 1, source: 1, target: 2, type: "fs" }],
  resources: [{ id: "ann" }],
  assignments: [{ task: 1, resource: "ann", value: 1 }],
};
```

## Related

- [`Project#solve`](<https://docs.dhtmlx.com/planning-engine/js/api/project-solve.md>) - loading and scheduling a plan
- [`TaskData`](<https://docs.dhtmlx.com/planning-engine/js/api/types/task-data.md>) - one task of the plan
- [`SchedulingConfig`](<https://docs.dhtmlx.com/planning-engine/js/api/types/scheduling-config.md>) - the `config` switches
- [Project data](<https://docs.dhtmlx.com/planning-engine/js/scheduling/project-data.md>) - describing tasks, links, dates and config
