# How to plot a line chart pointing to zero instead of smoothing out till end

**URL:** https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979
**Category:** Kibana
**Created:** [November 2, 2022, 11:40am UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979 "2022-11-02T11:40:03Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Tukaram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tukaram/32/118944_2.png) [@Tukaram](https://discuss.elastic.co/u/Tukaram)
#### Post date: [November 2, 2022, 11:40am UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979/1 "2022-11-02T11:40:03Z")

</div>

![line chart](https://us1.discourse-cdn.com/elastic/original/3X/e/b/eb14116ddfdd0402a589ded1f467588a35024d52.jpeg)

As per attached graph, I am expecting that line graph should show some round circle if values after 5 on x axis are missing or just drop to zero on x axis.

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [November 2, 2022, 2:12pm UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979/2 "2022-11-02T14:12:13Z")

</div>

Hi @Tukaram

welcome to the Kibana community.  
May I ask what version of the stack are you running?  
Also, are you using Lens or the previous aggregation based editor to make the chart?

In the Lens editor there's the ability to choose which strategy to use for the presentation in case of missing values:

 ![Screenshot 2022-11-02 at 15.11.30](https://us1.discourse-cdn.com/elastic/original/3X/4/6/467da0fa3f64cce1672430f001045e684d476731.png)

---

<div class="post-metadata">

### Author: ![Tukaram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tukaram/32/118944_2.png) [@Tukaram](https://discuss.elastic.co/u/Tukaram)
#### Post date: [November 2, 2022, 3:25pm UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979/3 "2022-11-02T15:25:55Z")

</div>

Thanks for reply. I am using 7.16.2  
I tried all options available there for fill gaps.  
I am using sum aggregation to plot that line.  
Is there any way to cut the line if my field is not there for future business hours?

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [November 2, 2022, 4:11pm UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979/4 "2022-11-02T16:11:03Z")

</div>

But it looks like there's data, it's not just interpolating there.  
I've tried to reproduce a similar chart, and is it visible the areas with missing values as the line is dotted and not solid:

 ![Screenshot 2022-11-02 at 16.58.49](https://us1.discourse-cdn.com/elastic/original/3X/2/1/21812b9c229675078812f1be9a77bae464415cdb.jpeg)

With the `Zero` interpolation configuration the dotted lines goes down between 0 (with 1 data point) to 3 (where there's another data point). Same for the end of the series.

---

<div class="post-metadata">

### Author: ![Tukaram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tukaram/32/118944_2.png) [@Tukaram](https://discuss.elastic.co/u/Tukaram)
#### Post date: [November 2, 2022, 5:37pm UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979/5 "2022-11-02T17:37:33Z")

</div>

Thanks, I dont see last 2 options from 'Visual Options' section. any different settings?

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [November 3, 2022, 9:34am UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979/6 "2022-11-03T09:34:21Z")

</div>

Those options have been added to recent versions, but the values set were the default anyway before.

---

<div class="post-metadata">

### Author: ![Tukaram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tukaram/32/118944_2.png) [@Tukaram](https://discuss.elastic.co/u/Tukaram)
#### Post date: [November 8, 2022, 4:58pm UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979/7 "2022-11-08T16:58:22Z")

</div>

Is there any option to break the line instead of sloping it down to zero?

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [November 8, 2022, 5:03pm UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979/8 "2022-11-08T17:03:06Z")

</div>

You mean not drawing anything where there's no data in between?  
That is the default gap handling strategy in Lens.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 6, 2022, 5:03pm UTC](https://discuss.elastic.co/t/how-to-plot-a-line-chart-pointing-to-zero-instead-of-smoothing-out-till-end/317979/9 "2022-12-06T17:03:52Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
