# Kibana Vega Gantt chart

**URL:** <https://discuss.elastic.co/t/kibana-vega-gantt-chart/319351>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [November 20, 2022, 2:29am UTC](https://discuss.elastic.co/t/kibana-vega-gantt-chart/319351 "2022-11-20T02:29:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![liorh](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@liorh](https://discuss.elastic.co/u/liorh)\
**Post date:** [November 20, 2022, 2:29am UTC](https://discuss.elastic.co/t/kibana-vega-gantt-chart/319351/1 "2022-11-20T02:29:43Z")

</div>

Hi guys  
I got this very simple example of Gantt chart with Vega:

```auto
{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "description": "A simple bar chart with ranged data (aka Gantt Chart).",
  "data": {
    "values": [
      {"task": "A", "start": 1, "end": 3},
      {"task": "B", "start": 3, "end": 8},
      {"task": "C", "start": 8, "end": 10}
    ]
  },
  "mark": "bar",
  "encoding": {
    "y": {"field": "task", "type": "ordinal"},
    "x": {"field": "start", "type": "quantitative"},
    "x2": {"field": "end"}
  }
}

```

Could someone please tell what it should like in order to handle my index:  
index name: **rpa**  
each doc has **event.startDateTime** and **event.endDateTime** fields.  
I want Y-Axis to show me separate bar for each **event.userName** value.

Thank you very much  
Lior

---

<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:** [November 21, 2022, 2:51pm UTC](https://discuss.elastic.co/t/kibana-vega-gantt-chart/319351/2 "2022-11-21T14:51:43Z")

</div>

Hi @liorh

I think this thread can be useful as reference to build one with a similar setup: [Gantt chart on Kibana using version 7.11 - #3 by bab](https://discuss.elastic.co/t/gantt-chart-on-kibana-using-version-7-11/265917/3)

---

<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:** [December 19, 2022, 2:52pm UTC](https://discuss.elastic.co/t/kibana-vega-gantt-chart/319351/3 "2022-12-19T14:52:32Z")

</div>

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