# Heatmap with time spans calculated out of documents

**URL:** <https://discuss.elastic.co/t/heatmap-with-time-spans-calculated-out-of-documents/266669>\
**Category:** Kibana\
**Created:** [March 9, 2021, 10:18am UTC](https://discuss.elastic.co/t/heatmap-with-time-spans-calculated-out-of-documents/266669 "2021-03-09T10:18:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cop077](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@cop077](https://discuss.elastic.co/u/cop077)\
**Post date:** [March 9, 2021, 10:18am UTC](https://discuss.elastic.co/t/heatmap-with-time-spans-calculated-out-of-documents/266669/1 "2021-03-09T10:18:39Z")

</div>

Hi everyone.

I have documents that look like this:

```auto
{
 "resource":"xyz",
 "started_at":"2020-01-01T10:00:00Z",
 "finished_at":"2020-01-01T14:23:54Z"
}

```

What I want to do is creating a heatmap which uses the resource for the y-axis and date range on the x-axis. The heatmap should show if a resource was in use or not at the point of time. Is there a way to do this?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [March 22, 2021, 10:32am UTC](https://discuss.elastic.co/t/heatmap-with-time-spans-calculated-out-of-documents/266669/2 "2021-03-22T10:32:35Z")

</div>

Hi, the described chart looks like a gantt chart, you can use Vega for that. Here an example of how to build that chart : [Gantt Chart (Ranged Bar Marks) | Vega-Lite](https://vega.github.io/vega-lite/examples/bar_gantt.html)  
Follow this guide for an understanding on how Vega works within Kibana [Vega | Kibana Guide [7.11] | Elastic](https://www.elastic.co/guide/en/kibana/current/vega.html)

---

<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:** [April 19, 2021, 10:32am UTC](https://discuss.elastic.co/t/heatmap-with-time-spans-calculated-out-of-documents/266669/3 "2021-04-19T10:32:46Z")

</div>

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