# Chart = Error Invalid position

**URL:** <https://talk.observablehq.com/t/chart-error-invalid-position/7673>\
**Category:** Help\
**Created:** [March 1, 2023, 5:24am UTC](https://talk.observablehq.com/t/chart-error-invalid-position/7673 "2023-03-01T05:24:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephan](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@Stephan](https://talk.observablehq.com/u/Stephan)\
**Post date:** [March 1, 2023, 5:24am UTC](https://talk.observablehq.com/t/chart-error-invalid-position/7673/1 "2023-03-01T05:24:53Z")

</div>

Just started to learn Observable and need help explaining the following error:

chart = Error: invalid position

Notebook: [Interactive Slope Chart / Stephan Haycock | Observable](https://observablehq.com/d/4cf16630d00a7ffb)

Any explanation or advice would be appreciated.

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [March 1, 2023, 5:43am UTC](https://talk.observablehq.com/t/chart-error-invalid-position/7673/2 "2023-03-01T05:43:39Z")

</div>

As noted by the red caret, the error comes from the `dodge` function here:

```js
  if (!positions.every(isFinite)) throw new Error("invalid position");

```

Using the debugger, it looks like you are passing an array of undefined values to the dodge function:

```js
[undefined, undefined, undefined, undefined, undefined, undefined]

```

My guess from the code is that you are calling `dodge` three times, once for each of the `data.columns` which is `["Name", "Race1", "Race2"]`. But, the `values` array in your data only has two elements (presumably for Race1 and Race2). So the third time you are passing undefineds, and hence the `dodge` function is throwing an error.
