---
title: "init(timeInterval:range:)"
framework: charts
role: symbol
role_heading: Initializer
path: "charts/datebins/init(timeinterval:range:)"
---

# init(timeInterval:range:)

Creates uniform bins covering the given range. The first bin starts at the lower bound of the range.

## Declaration

```swift
nonisolated init(timeInterval: TimeInterval, range: ClosedRange<Date>)
```

## Parameters

- `timeInterval`: The size of the bins.
- `range`: The range of the data the bins cover.

## Return Value

Return Value The bins.
