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


# LoadProfile

Per-bucket load and capacity of resources over a date range. [`Project#loadProfile`](<https://docs.dhtmlx.com/planning-engine/js/api/project-load-profile.md>) returns one for the solved baseline. [`Project#preview`](<https://docs.dhtmlx.com/planning-engine/js/api/project-preview.md>) with the `profile` option returns one for the previewed dates in `result.profile`. It's a fresh plain object that shares nothing with the project.

## Fields

| Field | Type | Description |
|---|---|---|
| `basis` | `"hour" \| "day"` | Bucket size used: the requested `basis`, or the one derived from [`config.duration_unit`](<https://docs.dhtmlx.com/planning-engine/js/api/types/scheduling-config.md>) when none was requested. |
| `resources` | [`ResourceLoad`](<https://docs.dhtmlx.com/planning-engine/js/api/types/load-profile.md#resourceload>)`[]` | One entry per requested resource, in the order of the query's `resources`, or of the project's resources when the query lists none. |

### ResourceLoad

The buckets of one resource.

| Field | Type | Description |
|---|---|---|
| `resource` | [`Id`](<https://docs.dhtmlx.com/planning-engine/js/api/types/common.md#id>) | The resource id. |
| `capacityMode` | `"calendar" \| "flat"` | How `capacity` is filled. `"calendar"`: the resource's capacity in buckets with working time on its own calendar, `0` elsewhere. `"flat"`: the resource's capacity in every bucket; used when the resource has no calendar, with a task `calendar_mode`, or with `use_calendars: false`. |
| `buckets` | [`LoadBucket`](<https://docs.dhtmlx.com/planning-engine/js/api/types/load-profile.md#loadbucket>)`[]` | Every bucket whose start lies in the query's `[from, to)`, in time order, with no gaps. |

### LoadBucket

Load and capacity of one resource in one bucket. Both are in assignment `value` units: `1` = 100 %.

| Field | Type | Description |
|---|---|---|
| `start` | [`DateValue`](<https://docs.dhtmlx.com/planning-engine/js/api/types/common.md#datevalue>) | Bucket start. A `"YYYY-MM-DD HH:MM"` string, or a local `Date` on a project created with [`dates: "date"`](<https://docs.dhtmlx.com/planning-engine/js/api/project.md#projectoptions>). |
| `load` | `number` | Sum of the `value` of every assignment of the resource that works in this bucket. An assignment counts its full `value` even when it works only part of the bucket. |
| `capacity` | `number` | The resource's capacity in this bucket; see `capacityMode`. The bucket is overallocated when `load > capacity`. |
| `tasks` | [`Id`](<https://docs.dhtmlx.com/planning-engine/js/api/types/common.md#id>)`[]` | Ids of the tasks booked in this bucket, in input order. Absent with the query's `tasks: "none"` (the default). With `"all"`, present in every bucket. With `"overallocated"`, filled in overallocated buckets and `[]` elsewhere. |

## Used by

- [`Project#loadProfile`](<https://docs.dhtmlx.com/planning-engine/js/api/project-load-profile.md>): returns it for the solved baseline
- [`Project#preview`](<https://docs.dhtmlx.com/planning-engine/js/api/project-preview.md>): returns it as [`ScheduleResult`](<https://docs.dhtmlx.com/planning-engine/js/api/types/schedule-result.md>) `profile` when the `profile` option is set

## Example

Two day buckets of one resource booked on two tasks at once, queried with `tasks: "overallocated"`:

```js
const profile = {
  basis: "day",
  resources: [
    {
      resource: "dev",
      capacityMode: "flat",
      buckets: [
        { start: "2026-01-01 00:00", load: 1, capacity: 1, tasks: [] },
        { start: "2026-01-02 00:00", load: 2, capacity: 1, tasks: ["a", "b"] },
      ],
    },
  ],
};
```

## Related

- [`Project#loadProfile`](<https://docs.dhtmlx.com/planning-engine/js/api/project-load-profile.md>) - the call that returns it
- [`ProfileQuery`](<https://docs.dhtmlx.com/planning-engine/js/api/types/common.md#profilequery>) - the range, resources and basis of a profile
- [`Overallocation`](<https://docs.dhtmlx.com/planning-engine/js/api/types/overallocation.md>) - overallocated windows in a schedule result
- [Resource Load](<https://docs.dhtmlx.com/planning-engine/js/resources-and-assignment/resource-load.md>) - querying profiles for a histogram
