# Kibana not connecting points in line

**URL:** <https://discuss.elastic.co/t/kibana-not-connecting-points-in-line/321821>\
**Category:** Kibana\
**Created:** [December 22, 2022, 8:42am UTC](https://discuss.elastic.co/t/kibana-not-connecting-points-in-line/321821 "2022-12-22T08:42:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tinrik](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tinrik](https://discuss.elastic.co/u/tinrik)\
**Post date:** [December 22, 2022, 8:42am UTC](https://discuss.elastic.co/t/kibana-not-connecting-points-in-line/321821/1 "2022-12-22T08:42:53Z")

</div>

Hi!

I'm running on Kibana 7.16.1. I'm trying to display a simple Lens Line chart. My dataset is a set of documents like:

```auto
{
  timestamp: <ISO time>,
  violations: 123,
  file: "path/to/foo.cpp",
  owner: "Foo",
}

```

My goal is to visualize the number of violations per file and per owner over time.

I upload a new dataset to Kibana every 24 hours, all datapoints with the same timestamp (since they belong to the same day).

Just to try it out, I've tried pushing 2 times in the last 24 hours to see how it would look like. I can see Kibana does show 2 datapoints for the 2 different timestamps I've used, but it doesn't connect the lines (breakdown by "file"):

![Screenshot from 2022-12-22 09-37-29](https://us1.discourse-cdn.com/elastic/original/3X/2/0/20acbc3c5a34df45391fe3a3f0fd8a9ef66a56e4.png)

Or it connects them wrongly (breakdown by "owner", currently there's only one owner):

 ![Screenshot from 2022-12-22 09-37-36](https://us1.discourse-cdn.com/elastic/original/3X/8/6/863114433a216096e4612acec673cf6c32072755.png)

The number of violations is identical at both timestamps, so my expectation is to see a horizontal line connecting the data from T and T+1.

Do I need to configure something in particular to make that happen? Why does Kibana have different connecting behavior depending on the breakdown?

Thanks!

---

<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:** [December 22, 2022, 10:48am UTC](https://discuss.elastic.co/t/kibana-not-connecting-points-in-line/321821/2 "2022-12-22T10:48:01Z")

</div>

Hi @tinrik

the problem of dots not connected depends on the bucketing returned by Elasticsearch, where between each dots there are gaps in the data, so non-adjacent dots are non connected.  
I can reproduce the same thing here with a breakdown:

 ![Screenshot 2022-12-22 at 11.45.07](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d69f2219dceb749facf7ab9e972ef5ef3dfb6232.png)

It is possible to do some gap handling in Lens like in here:

 ![Screenshot 2022-12-22 at 11.45.21](https://us1.discourse-cdn.com/elastic/original/3X/0/9/0941de69ef3f608014fadb7814bb0ac602b87809.png)

By default the gap handling is set to `None`, but it is possible to set a different strategy for it.

---

<div class="post-metadata">

**Author:** ![tinrik](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tinrik](https://discuss.elastic.co/u/tinrik)\
**Post date:** [December 23, 2022, 7:46am UTC](https://discuss.elastic.co/t/kibana-not-connecting-points-in-line/321821/3 "2022-12-23T07:46:29Z")

</div>

Thanks for the reply @Marco_Liberati . I have indeed tried different options for "Missing values", but it still doesn't work. It's especially bad when my metric is e.g. `sum(violations)`. In between datapoints, Kibana thinks that the violations have a value 0 and so it displays a line that goes to 0 all the time:

 ![Screenshot from 2022-12-23 08-45-07](https://us1.discourse-cdn.com/elastic/original/3X/b/9/b9168d52092165e2b7b1b0f6f033ad47820aef98.png)

It doesn't matter if I change it to "Last value", Kibana will always fill the gaps which 0's, which is incorrect. This sounds like a pretty basic use case that should be covered? How do people display lines over time then?

---

<div class="post-metadata">

**Author:** ![tinrik](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tinrik](https://discuss.elastic.co/u/tinrik)\
**Post date:** [December 23, 2022, 8:41am UTC](https://discuss.elastic.co/t/kibana-not-connecting-points-in-line/321821/4 "2022-12-23T08:41:32Z")

</div>

Found the problem! The default time interval seems to be 3 hours, so Kibana expects data every 3 hours. Not sure why it fills with zeros if data is missing there though, despite selecting "Last Value" as filling option.

Anyhow, changing the time interval to 1 day solves the problem and the dots are correctly connected!

![Screenshot from 2022-12-23 09-38-48](https://us1.discourse-cdn.com/elastic/original/3X/d/7/d77574d288a37fa3a5d7a02907a018575d723775.png)

---

<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:** [January 20, 2023, 8:41am UTC](https://discuss.elastic.co/t/kibana-not-connecting-points-in-line/321821/5 "2023-01-20T08:41:48Z")

</div>

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