# Gannt chart in Kibana using Vega

**URL:** <https://discuss.elastic.co/t/gannt-chart-in-kibana-using-vega/279241>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [July 21, 2021, 8:30am UTC](https://discuss.elastic.co/t/gannt-chart-in-kibana-using-vega/279241 "2021-07-21T08:30:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![qttv](https://avatars.discourse-cdn.com/v4/letter/q/ee59a6/32.png) [@qttv](https://discuss.elastic.co/u/qttv)\
**Post date:** [July 21, 2021, 8:30am UTC](https://discuss.elastic.co/t/gannt-chart-in-kibana-using-vega/279241/1 "2021-07-21T08:30:44Z")

</div>

Goog Morning.

I need to create a Gannt chart using Kibana. I know the first way to do that is using the Visualization section, introducing a Vega code. I need to visualize these fields from an Elastic Search Index: RoboId, StartTime, EndTime. I'm trying using the following code, but I'm getting a message about:

" Infinite extent for field "starttime": [Infinity, -Infinity] "  
" Infinite extent for field "endtime": [Infinity, -Infinity] "

```auto
{
  $schema: https://vega.github.io/schema/vega-lite/v4.json
  title: Gannt
  data: {
    url: {
      %context%: true
      %timefield%: starttime
      index: cs_gannt
      body: { }
    }
    format: {
      property: hits.hits
    }
}
mark: bar
// At this point the search values are exposed from the _source object
  encoding: {
    y: {
      field: robotid
      type: ordinal
    }
    x: {
      field: starttime
      type: temporal
    }
    x2: {
      field: endtime
      type: temporal
    }
  }
}

```

Can someone help me to undestrand where i'm doing wrong, providing a correct code?

Thanks so much...

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [July 21, 2021, 3:27pm UTC](https://discuss.elastic.co/t/gannt-chart-in-kibana-using-vega/279241/2 "2021-07-21T15:27:53Z")

</div>

In general, the `Infinite extent for field` issue is because the path does not match one of the paths in your `data` array. You'll need to follow the [Vega debugging steps](https://www.elastic.co/guide/en/kibana/7.13/vega.html#vega-inspector) yourself, unless you [follow the steps for asking for help with a Vega spec](https://www.elastic.co/guide/en/kibana/7.13/vega.html#asking-for-help-with-a-vega-spec).

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [July 21, 2021, 3:56pm UTC](https://discuss.elastic.co/t/gannt-chart-in-kibana-using-vega/279241/3 "2021-07-21T15:56:54Z")

</div>

Also I would check your timefilter since you are using `%timefield%: starttime` and ensure there are results in that range.

---

<div class="post-metadata">

**Author:** ![qttv](https://avatars.discourse-cdn.com/v4/letter/q/ee59a6/32.png) [@qttv](https://discuss.elastic.co/u/qttv)\
**Post date:** [July 22, 2021, 7:24am UTC](https://discuss.elastic.co/t/gannt-chart-in-kibana-using-vega/279241/4 "2021-07-22T07:24:38Z")

</div>

Hi, wich path are you referring to? My data are coming from an index named cs\_gannt...

---

<div class="post-metadata">

**Author:** ![qttv](https://avatars.discourse-cdn.com/v4/letter/q/ee59a6/32.png) [@qttv](https://discuss.elastic.co/u/qttv)\
**Post date:** [July 22, 2021, 7:27am UTC](https://discuss.elastic.co/t/gannt-chart-in-kibana-using-vega/279241/5 "2021-07-22T07:27:24Z")

</div>

Hi, the time range is right....

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [July 22, 2021, 2:23pm UTC](https://discuss.elastic.co/t/gannt-chart-in-kibana-using-vega/279241/6 "2021-07-22T14:23:20Z")

</div>

In Vega, your `field` must match one of the paths in the JSON from your data.

---

<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:** [August 19, 2021, 2:24pm UTC](https://discuss.elastic.co/t/gannt-chart-in-kibana-using-vega/279241/7 "2021-08-19T14:24:20Z")

</div>

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