# Messed up lines

**URL:** <https://community.plotly.com/t/messed-up-lines/9730>\
**Category:** plotly.js\
**Created:** [April 17, 2018, 7:07am UTC](https://community.plotly.com/t/messed-up-lines/9730 "2018-04-17T07:07:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayh](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jayh](https://community.plotly.com/u/jayh)\
**Post date:** [April 17, 2018, 7:07am UTC](https://community.plotly.com/t/messed-up-lines/9730/1 "2018-04-17T07:07:00Z")

</div>

Hello - Awesome tool, thanks to all contributors!

I’m trying to plot of few traces all together. Some of the trace lines are getting a bit confused with lines going all the way to the end of the x-axis. I narrowed this down to some issue in the order of the traces. traceA, traceB plots nicely, but traceB, traceA jumbles up the lines. Please see the attached image.  
Working:

 ![plot-working](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/4/40fd665f6845efe852ed4bb79a25e2355f9b6ccd.png)

Buggy:

 ![plot-buggy](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/3/3996b8313386c0fac8b29619394fb15ad359a2c5.png)

---

<div class="post-metadata">

**Author:** ![jayh](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jayh](https://community.plotly.com/u/jayh)\
**Post date:** [April 17, 2018, 7:17am UTC](https://community.plotly.com/t/messed-up-lines/9730/2 "2018-04-17T07:17:21Z")

</div>

Unable to paste the traces, as there is a message limit. You can download from here:

[https://drive.google.com/file/d/1hIZzEl6I0tiqKMnd5xaxiLp4lsVhRKHd/view?usp=sharing](https://drive.google.com/file/d/1hIZzEl6I0tiqKMnd5xaxiLp4lsVhRKHd/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [April 17, 2018, 2:31pm UTC](https://community.plotly.com/t/messed-up-lines/9730/3 "2018-04-17T14:31:04Z")

</div>

Inputting your `x` coordinates as valid plotly.js time string should fix this issue. See [https://help.plot.ly/date-format-and-time-series/](https://help.plot.ly/date-format-and-time-series/)

In your graph above, plotly think you’re trying to plot categories not dates.

---

<div class="post-metadata">

**Author:** ![jayh](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jayh](https://community.plotly.com/u/jayh)\
**Post date:** [April 17, 2018, 3:41pm UTC](https://community.plotly.com/t/messed-up-lines/9730/4 "2018-04-17T15:41:15Z")

</div>

Cool, that worked! Thank you so much.
