# Plot that makes no sense

**URL:** <https://talk.observablehq.com/t/plot-that-makes-no-sense/7597>\
**Category:** Help\
**Created:** [February 5, 2023, 10:49am UTC](https://talk.observablehq.com/t/plot-that-makes-no-sense/7597 "2023-02-05T10:49:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abitrolly](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/abitrolly/32/7214_2.png) [@abitrolly](https://talk.observablehq.com/u/abitrolly)\
**Post date:** [February 5, 2023, 10:49am UTC](https://talk.observablehq.com/t/plot-that-makes-no-sense/7597/1 "2023-02-05T10:49:02Z")

</div>

I am trying to paint this dataset.

```auto
csv = `date,count
2022-12-08,600
2022-12-14,634
2023-01-01,698
2023-01-03,701
2023-01-04,704
2023-01-06,717
2023-01-16,1751
2023-01-23,815
2023-01-26,839
2023-02-01,862
2023-02-04,883
2023-02-05,892
`

```

And the graph that I get makes no sense.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/6/6253d3c4043448af08d25b263664aba77ec0fbbc.png)

My past experience tells me that the problem is with type conversion, but even if Observable just draws strings here, why the sudden spike at 1751 mark? Why 1751 \> 600 while 815 \< 600 here?

There is a small yellow warning sign next to the graph. However, it doesn’t have any message attached to explain what should I do.

> **[Reading inline CSV with Observable](https://observablehq.com/d/b93957f994f96541)**
>
> Hint: Use built-in \`d3.csvParse()\` to edit your dataset directly in Observable. Let's plot something out of the inline data Using Plot.

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [February 5, 2023, 12:03pm UTC](https://talk.observablehq.com/t/plot-that-makes-no-sense/7597/2 "2023-02-05T12:03:22Z")

</div>

To fix the types, you could use:

> d3.csvParse(csv, d3.autoType)

When the values are strings, they are ordered in alpha-numerical ascending order, meaning “1751” comes before “600”.

There should be a title on the small yellow warning, suggesting to look at the browser’s console for more information. The console has the following warnings:

 ![Capture d’écran 2023-02-05 à 13.04.22](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/5/5a16d6931ee7d59179f8894c76376cba99f7e379.png)

---

<div class="post-metadata">

**Author:** ![abitrolly](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/abitrolly/32/7214_2.png) [@abitrolly](https://talk.observablehq.com/u/abitrolly)\
**Post date:** [February 5, 2023, 1:06pm UTC](https://talk.observablehq.com/t/plot-that-makes-no-sense/7597/3 "2023-02-05T13:06:16Z")

</div>

> [@Fil](#):
>
> When the values are strings, they are ordered in alpha-numerical ascending order, meaning “1751” comes before “600”.

So it sorts the strings, and then maps line at X to the position of the string on the Y axis.

> [@Fil](#):
>
> There should be a title on the small yellow warning, suggesting to look at the browser’s console for more information.

I believe there is a CSS problem with that thing.

![image](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/2/210095c498cbd09dc82636e2d4e1b1e2f720f171.png)

If the cursor is in this shape, no message is shown.

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [February 5, 2023, 1:22pm UTC](https://talk.observablehq.com/t/plot-that-makes-no-sense/7597/4 "2023-02-05T13:22:57Z")

</div>

> [@abitrolly](#):
>
> If the cursor is in this shape, no message is shown.

The window or tab needs to have focus:

---

<div class="post-metadata">

**Author:** ![abitrolly](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/abitrolly/32/7214_2.png) [@abitrolly](https://talk.observablehq.com/u/abitrolly)\
**Post date:** [February 5, 2023, 2:23pm UTC](https://talk.observablehq.com/t/plot-that-makes-no-sense/7597/5 "2023-02-05T14:23:29Z")

</div>

That’s not it. Cursor can take this shape even if the tab is focused. Also the reaction time is too slow.
