# Help on plotly.newPlot Error for redrawing plot

**URL:** <https://community.plotly.com/t/help-on-plotly-newplot-error-for-redrawing-plot/1278>\
**Category:** plotly.js\
**Created:** [June 12, 2016, 11:59pm UTC](https://community.plotly.com/t/help-on-plotly-newplot-error-for-redrawing-plot/1278 "2016-06-12T23:59:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bikramkawan](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@bikramkawan](https://community.plotly.com/u/bikramkawan)\
**Post date:** [June 12, 2016, 11:59pm UTC](https://community.plotly.com/t/help-on-plotly-newplot-error-for-redrawing-plot/1278/1 "2016-06-12T23:59:56Z")

</div>

Hi I am using plotly.newPlot for redrawing the plot without refreshing the page. It works fine but there is small error. It is able to get new data. When it draw line with new data set the ending coordinates is also connected I do not know why. I have attached the screen dump here in imgur.  
This is the first plot (left pic). The data is obtained using dropdown menu. The second plot is below where you can see the blue circle. The end point is alos connected which should not be like that.  
 ![](https://us1.discourse-cdn.com/flex024/uploads/plot/original/1X/dda987ad1ae4391a1c5ae650be551bbf450391b3.png)

How can i fix this. Please help me.

---

<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:** [June 14, 2016, 3:23pm UTC](https://community.plotly.com/t/help-on-plotly-newplot-error-for-redrawing-plot/1278/2 "2016-06-14T15:23:56Z")

</div>

Strange.

Could you share a code snippet to help us debug?

---

<div class="post-metadata">

**Author:** ![bikramkawan](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@bikramkawan](https://community.plotly.com/u/bikramkawan)\
**Post date:** [June 14, 2016, 10:28pm UTC](https://community.plotly.com/t/help-on-plotly-newplot-error-for-redrawing-plot/1278/3 "2016-06-14T22:28:50Z")

</div>

Hi Etienne,  
I have attached the js and html file here.  
You can access data , html and js from url

> **[Dropbox - Link not found](https://www.dropbox.com/sh/3i00rcjwwgbjbxq/AABt_dh5IceI3V93Z_hz-pqKa?dl=0)**
>
> Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!

Bikram

---

<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:** [June 16, 2016, 2:28pm UTC](https://community.plotly.com/t/help-on-plotly-newplot-error-for-redrawing-plot/1278/4 "2016-06-16T14:28:07Z")

</div>

Hmm. I doubt this is a bug on our side.

Looks like your data has several items with `x` equal to `'1990-9-30'`

 ![](https://us1.discourse-cdn.com/flex024/uploads/plot/original/1X/31cbc7b15309f40a14c6714c4af7b860139b8439.png)

explaining why the line connects with the start.
