# Scatter/Line Plot Fill Option - Fills Gaps

**URL:** <https://community.plotly.com/t/scatter-line-plot-fill-option-fills-gaps/21264>\
**Category:** plotly.js\
**Created:** [March 22, 2019, 11:57pm UTC](https://community.plotly.com/t/scatter-line-plot-fill-option-fills-gaps/21264 "2019-03-22T23:57:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dashals](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dashals](https://community.plotly.com/u/dashals)\
**Post date:** [March 22, 2019, 11:57pm UTC](https://community.plotly.com/t/scatter-line-plot-fill-option-fills-gaps/21264/1 "2019-03-22T23:57:18Z")

</div>

Hi All,

I’m trying to create line graph which has gaps in it. I would like to fill the area below the graphed area however when there are gaps in the data it fills the gaps as well.

See this example:  
[https://codepen.io/cjgordon/pen/moaaoY](https://codepen.io/cjgordon/pen/moaaoY)

Ideally I would like it to to not fill the gap between x=2 and x=4 with the fill simply just ending in a straight line to y=0 at 2, and restarting at x=4.

I have investigated the various fill options but none of them seem to achieve this.

Thanks 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:** [March 26, 2019, 6:51pm UTC](https://community.plotly.com/t/scatter-line-plot-fill-option-fills-gaps/21264/2 "2019-03-26T18:51:18Z")

</div>

Looks like you stumped upon a very old bug of ours: [https://github.com/plotly/plotly.js/issues/1132](https://github.com/plotly/plotly.js/issues/1132)

Until we find a way to fix that one, you’ll have to resort to adding a few dummy data points in you x/y arrays like in [https://codepen.io/etpinard/pen/YgbwpG](https://codepen.io/etpinard/pen/YgbwpG) I’m afraid.

Sorry for the inconvenience.

---

<div class="post-metadata">

**Author:** ![dashals](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dashals](https://community.plotly.com/u/dashals)\
**Post date:** [March 26, 2019, 10:03pm UTC](https://community.plotly.com/t/scatter-line-plot-fill-option-fills-gaps/21264/3 "2019-03-26T22:03:22Z")

</div>

Thanks for reply. At least I know I’m not crazy now!

Will probably just leave them as line graphs for now then.

Cheers  
Chris
