---
title: "init(range:count:)"
framework: charts
role: symbol
role_heading: Initializer
path: "charts/numberbins/init(range:count:)-7975l"
---

# init(range:count:)

Creates the given number of bins for the range.

## Declaration

```swift
nonisolated init(range: ClosedRange<Value>, count: Int) where Value : BinaryFloatingPoint
```

## Parameters

- `range`: The range of the bins. The first bin starts at the lower bound of the range, and the last bin ends at the upper bound of the range.
- `count`: The exact number of bins.
