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


# Basis

The size of the time buckets that resource load is measured in. Set it in [`LevelingOptions.Basis`](<https://docs.dhtmlx.com/planning-engine/net/api/core/resources/leveling-options.md>) and [`ProfileQuery.Basis`](<https://docs.dhtmlx.com/planning-engine/net/api/core/resources/profile-query.md>); [`LoadProfile.Basis`](<https://docs.dhtmlx.com/planning-engine/net/api/core/resources/load-profile.md>) reports the basis a profile used.

## Declaration

```csharp
namespace Plen;

public enum Basis
{
    Hour,
    Day,
}
```

## Variants

| Variant | Description |
|---|---|
| `Hour` | One-hour buckets, each starting on the hour. |
| `Day` | One-day buckets, each starting at midnight. |

When an options property of type `Basis?` is `null`, the basis comes from [`SchedulingConfig.DurationUnit`](<https://docs.dhtmlx.com/planning-engine/net/api/core/data/scheduling-config.md>): `Day` for [`TimeUnit.Day`](<https://docs.dhtmlx.com/planning-engine/net/api/core/data/time-unit.md>), `Hour` for `TimeUnit.Hour` and `TimeUnit.Minute`.

`Basis` is a plain enum with no parse or spelling helpers. The `Plen.Wire` package handles the JSON spellings `"hour"` and `"day"`.

## Example

```csharp
using Plen;

var from = Moment.FromYmdHm(2026, 4, 6, 0, 0) ?? throw new InvalidOperationException("invalid date");
var to = Moment.FromYmdHm(2026, 4, 7, 0, 0) ?? throw new InvalidOperationException("invalid date");

// Level on daily buckets, whatever the project's duration unit.
var leveling = new LevelingOptions { Basis = Basis.Day };

// Read one day of load in hourly buckets.
var query = new ProfileQuery(from, to) { Basis = Basis.Hour };
```

## Related

- [`LevelingOptions`](<https://docs.dhtmlx.com/planning-engine/net/api/core/resources/leveling-options.md>) - sets the leveling basis
- [`ProfileQuery`](<https://docs.dhtmlx.com/planning-engine/net/api/core/resources/profile-query.md>) - sets the load profile basis
- [`LoadProfile`](<https://docs.dhtmlx.com/planning-engine/net/api/core/resources/load-profile.md>) - reports the basis used
- [Resource load](<https://docs.dhtmlx.com/planning-engine/net/resources-and-assignment/resource-load.md>) - measuring load in buckets
- [Leveling resources](<https://docs.dhtmlx.com/planning-engine/net/resources-and-assignment/leveling-resources.md>) - removing overallocation
