# Line with markers for big datasets (Plotly.js)

**URL:** <https://community.plotly.com/t/line-with-markers-for-big-datasets-plotly-js/8649>\
**Category:** plotly.js\
**Created:** [February 27, 2018, 1:32pm UTC](https://community.plotly.com/t/line-with-markers-for-big-datasets-plotly-js/8649 "2018-02-27T13:32:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deymas](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/deymas/32/2660_2.png) [@Deymas](https://community.plotly.com/u/Deymas)\
**Post date:** [February 27, 2018, 1:32pm UTC](https://community.plotly.com/t/line-with-markers-for-big-datasets-plotly-js/8649/1 "2018-02-27T13:32:02Z")

</div>

Hello guys,

In my example ([https://codepen.io/Deymas/pen/vdQJpG](https://codepen.io/Deymas/pen/vdQJpG)) I try to plot dataset (10000 points) in the default mode “lines”.  
Works great, fast rendering, zoom+pan work perfectly.  
If I change the mode into “lines+markers” I obtain slow down of rendering. Also Zoom+pan are too slow to use.

Can the Plotly.js handle big datasets (up to million points) with mode “lines+markers” without losing interactivity?  
And what about Basic Bar Chart (type: “bar”) for the same big dataset?

Perhaps, there is something I’m doing wrong in the code?

Thank you in advance

---

<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:** [February 27, 2018, 4:21pm UTC](https://community.plotly.com/t/line-with-markers-for-big-datasets-plotly-js/8649/2 "2018-02-27T16:21:47Z")

</div>

Using `scattergl` instead of `scatter` should be more than enough for your use-case:

> **[aqQrZO](https://codepen.io/etpinard/pen/aqQrZO?editors=0010)**
>
> ...

---

<div class="post-metadata">

**Author:** ![Deymas](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/deymas/32/2660_2.png) [@Deymas](https://community.plotly.com/u/Deymas)\
**Post date:** [February 28, 2018, 2:38pm UTC](https://community.plotly.com/t/line-with-markers-for-big-datasets-plotly-js/8649/3 "2018-02-28T14:38:35Z")

</div>

> [@Deymas](#):
>
> Thanks a lot!

Is there any way to improve the performance for bars (type: ‘bar’)?

---

<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:** [February 28, 2018, 2:39pm UTC](https://community.plotly.com/t/line-with-markers-for-big-datasets-plotly-js/8649/4 "2018-02-28T14:39:42Z")

</div>

> [@Deymas](#):
>
> Is there any way to improve the performance for bars (type: ‘bar’)?

Not at the moment unfortunately.

I’m curious though, in what context do you want to plot a million bars?

---

<div class="post-metadata">

**Author:** ![Deymas](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/deymas/32/2660_2.png) [@Deymas](https://community.plotly.com/u/Deymas)\
**Post date:** [February 28, 2018, 3:38pm UTC](https://community.plotly.com/t/line-with-markers-for-big-datasets-plotly-js/8649/5 "2018-02-28T15:38:30Z")

</div>

for example, for stock exchange data visualisation. Bar chart that contains volume of trade operations
