# Time series spot line with specific value

**URL:** <https://discuss.elastic.co/t/time-series-spot-line-with-specific-value/221266>\
**Category:** Kibana\
**Created:** [February 27, 2020, 3:40pm UTC](https://discuss.elastic.co/t/time-series-spot-line-with-specific-value/221266 "2020-02-27T15:40:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MLaure19](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@MLaure19](https://discuss.elastic.co/u/MLaure19)\
**Post date:** [February 27, 2020, 3:40pm UTC](https://discuss.elastic.co/t/time-series-spot-line-with-specific-value/221266/1 "2020-02-27T15:40:34Z")

</div>

Dear all,

I am struggling a lot to represent a simple time-series graph with Kibana.  
I don’t want my data to be aggregated.

I basically just would like to plot my carbon monoxide concentrations on a time-series graph.

- Y-axis : carbon monoxide concentrations
- X-axis : dates (hours)

My index looks like this:

```
    "dates": [
  "2020-02-26T14:00:00+00:00",
  "2020-02-26T15:00:00+00:00",
  "2020-02-26T16:00:00+00:00",
  "2020-02-26T17:00:00+00:00", 
],
"pollutants": {
  "CO": {
    "description": "Carbon monoxide",
    "concentration": {
      "mugm3": {
        "values": [
          232.3519125804305,
          235.12185376733538,
          241.92035404741765,
          248.6359430372715,

```

Do you know how to create such a visualization ?

Thank you very much for you help !

Best regards,

Marie-Laure

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [February 27, 2020, 3:52pm UTC](https://discuss.elastic.co/t/time-series-spot-line-with-specific-value/221266/2 "2020-02-27T15:52:08Z")

</div>

Can you elaborate on that? Is the JSON you are showing here a single document and there will be multiple ones like this (one per day or something like this)?

---

<div class="post-metadata">

**Author:** ![MLaure19](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@MLaure19](https://discuss.elastic.co/u/MLaure19)\
**Post date:** [February 28, 2020, 7:49am UTC](https://discuss.elastic.co/t/time-series-spot-line-with-specific-value/221266/3 "2020-02-28T07:49:39Z")

</div>

Hi Flash,

Many thanks for your reply. So basically I am ingesting 24h pollution data, meaning one concentration value per hour, so 24 values in total. My goal would be to place those values on a graph (Y-axis) and place the 24 hours on the X-axis in order to see how pollution is evolving during the day.

Please find a printscreen attached. I don't know if this can help you.

Thanks again.

 ![picture](https://us1.discourse-cdn.com/elastic/original/3X/4/5/454c836a7119f03e4b0562eb29e926e5b0a204a0.png)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [February 28, 2020, 8:03am UTC](https://discuss.elastic.co/t/time-series-spot-line-with-specific-value/221266/4 "2020-02-28T08:03:31Z")

</div>

Thanks for you answer.

In this form the data is very hard to visualize in Kibana. Consider changing the shape of your documents to one document per measurement.

`{ dates: 'Feb 26, 2020 @ 14:00:00.000', coConcentration: 232.352 }`  
`{ dates: 'Feb 26, 2020 @ 15:00:00.000', coConcentration: 231.92 }`

and so on.

With the two separate arrays Kibana can't infer the association between date and value.

You can do this for example with Logstash and the `split` plugin: [https://www.elastic.co/guide/en/logstash/current/plugins-filters-split.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-split.html)

With the separate document per measurement datastructure you can visualize them using the regular line chart by using a date histogram and the x axis an average of co concentration on the y axis.

---

<div class="post-metadata">

**Author:** ![MLaure19](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@MLaure19](https://discuss.elastic.co/u/MLaure19)\
**Post date:** [February 28, 2020, 8:08am UTC](https://discuss.elastic.co/t/time-series-spot-line-with-specific-value/221266/5 "2020-02-28T08:08:02Z")

</div>

Hi Joe,

This helps tremendously, many thanks !  
I am not using Logstash (it does not work on my computer) but I am going to try to split by using my Python program.

Let's see...

---

<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 27, 2020, 8:08am UTC](https://discuss.elastic.co/t/time-series-spot-line-with-specific-value/221266/6 "2020-03-27T08:08:06Z")

</div>

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