# fitTo

function in `@dioramajs/data/graph`

```ts
import { fitTo } from '@dioramajs/data/graph'
```

Layout positions stretched into `plot`, element px; a flat axis stays in the middle.

```ts
function fitTo(raw: Float64Array, plot: Rect): Float32Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `raw` | `Float64Array` |  |
| `plot` | `Rect` |  |

Defined in [packages/data/src/graph.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/data/src/graph.ts#L387).
