# Scatterplot lines+markers automatic sorting for linear values as done for dates

**URL:** <https://community.plotly.com/t/scatterplot-lines-markers-automatic-sorting-for-linear-values-as-done-for-dates/10180>\
**Category:** plotly.js\
**Created:** [May 9, 2018, 8:01am UTC](https://community.plotly.com/t/scatterplot-lines-markers-automatic-sorting-for-linear-values-as-done-for-dates/10180 "2018-05-09T08:01:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schorry92](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@Schorry92](https://community.plotly.com/u/Schorry92)\
**Post date:** [May 9, 2018, 8:01am UTC](https://community.plotly.com/t/scatterplot-lines-markers-automatic-sorting-for-linear-values-as-done-for-dates/10180/1 "2018-05-09T08:01:03Z")

</div>

Hey! I have a time series with dates represented by numbers, since we had to standardize our data.  
I’d like to have the points conntected along the x-axis without jumping back and forth.  
Is the only possibility to sort the data before plotting?  
Thanks in advance,  
Verena

---

<div class="post-metadata">

**Author:** ![Schorry92](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@Schorry92](https://community.plotly.com/u/Schorry92)\
**Post date:** [May 9, 2018, 8:10am UTC](https://community.plotly.com/t/scatterplot-lines-markers-automatic-sorting-for-linear-values-as-done-for-dates/10180/2 "2018-05-09T08:10:33Z")

</div>

I’m sorry, asked that before 😃

---

<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:** [May 11, 2018, 1:58pm UTC](https://community.plotly.com/t/scatterplot-lines-markers-automatic-sorting-for-linear-values-as-done-for-dates/10180/3 "2018-05-11T13:58:47Z")

</div>

Here’s what I would do: [https://codepen.io/etpinard/pen/pVVerm?editors=0010](https://codepen.io/etpinard/pen/pVVerm?editors=0010)
