# How to plot missing values in graph

**URL:** https://discuss.elastic.co/t/how-to-plot-missing-values-in-graph/297582
**Category:** Kibana
**Created:** [February 18, 2022, 9:34am UTC](https://discuss.elastic.co/t/how-to-plot-missing-values-in-graph/297582 "2022-02-18T09:34:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)
#### Post date: [February 18, 2022, 9:34am UTC](https://discuss.elastic.co/t/how-to-plot-missing-values-in-graph/297582/1 "2022-02-18T09:34:09Z")

</div>

Version 7.9

I have certain numbers plotted in the xaxis from 1 to 54 , But the index does not have continuous value.So xaxis only plots numbers that are available like 7,15,10,22. My requirement is to show all the numbers in xaxis even if data is not there. Can I plot xaxis in such a way that the numbers are shown continuously and the graph shows zero value for data not prsent.

I found the interval concept in Lens , but its plotting only from 7,8,9,10,.  
0 to 7 is missing in xaxis an only bar works for this .

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/d/dd77cbb938b64fcbee01b0a7ba742b2d96e0c9dc.png)

Line graph only plots available data

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/c/6c6bf42e23308d5b15a15488bdeccaf2fc63a521.png)

---

<div class="post-metadata">

### Author: ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)
#### Post date: [February 20, 2022, 3:25pm UTC](https://discuss.elastic.co/t/how-to-plot-missing-values-in-graph/297582/2 "2022-02-20T15:25:31Z")

</div>

If you use aggregation based visualization, you can use `extended_bounds` option.

```auto
{
    "extended_bounds":{
        "min":0
    },
    "min_doc_count":0
}

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/d/3d1a00fb9c56f3e64930d5597192e05de8f0daa1.png)

---

<div class="post-metadata">

### Author: ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)
#### Post date: [February 21, 2022, 8:22am UTC](https://discuss.elastic.co/t/how-to-plot-missing-values-in-graph/297582/3 "2022-02-21T08:22:16Z")

</div>

Also is there any way we can show the month data chronologically ..Currently its string field and I am sorting it based on a time field associated with it.  
Also Is there any option we can plot the missing values here also in case of months coming in as string

---

<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: [March 21, 2022, 8:22am UTC](https://discuss.elastic.co/t/how-to-plot-missing-values-in-graph/297582/4 "2022-03-21T08:22:54Z")

</div>

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