# Visualizing boolean values associated with timestamps

**URL:** <https://discuss.elastic.co/t/visualizing-boolean-values-associated-with-timestamps/133132>\
**Category:** Kibana\
**Created:** [May 24, 2018, 11:39am UTC](https://discuss.elastic.co/t/visualizing-boolean-values-associated-with-timestamps/133132 "2018-05-24T11:39:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![magida](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magida/32/31503_2.png) [@magida](https://discuss.elastic.co/u/magida)\
**Post date:** [May 24, 2018, 11:39am UTC](https://discuss.elastic.co/t/visualizing-boolean-values-associated-with-timestamps/133132/1 "2018-05-24T11:39:18Z")

</div>

Hello,

I've indexed some data into elasticsearch and want to try and display some of it through kibana, now i've read a bunch of materials and tried tutorials etc. however none of them seem to be able to help me display the data i want. I have a field named "IsOnline" consisting of booleans indicating wether or not something was online, each of these values is associated with a timestamp (@timestamp). I want to show a graph where one can see at which point something was online or not.

Hope someone can help.

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [May 24, 2018, 2:20pm UTC](https://discuss.elastic.co/t/visualizing-boolean-values-associated-with-timestamps/133132/2 "2018-05-24T14:20:29Z")

</div>

hi @magida,

Do I have this right that for each document you have 3 fields `(timestamp, isOnline, deviceId)` and that for each `deviceId` you want to show, at any given time, if it was online?

You could try a top-hits metric aggregation ([https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html)), and show the latest `isOnline` state, by sorting by descending timestamp. You could display those results in a table.

---

<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:** [June 21, 2018, 2:20pm UTC](https://discuss.elastic.co/t/visualizing-boolean-values-associated-with-timestamps/133132/3 "2018-06-21T14:20:35Z")

</div>

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