# Cannot see data with VEGA

**URL:** <https://discuss.elastic.co/t/cannot-see-data-with-vega/171736>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [March 11, 2019, 11:19am UTC](https://discuss.elastic.co/t/cannot-see-data-with-vega/171736 "2019-03-11T11:19:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorenzo\_De\_Francesco](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lorenzo_de_francesco/32/41766_2.png) [@Lorenzo\_De\_Francesco](https://discuss.elastic.co/u/Lorenzo_De_Francesco)\
**Post date:** [March 11, 2019, 11:19am UTC](https://discuss.elastic.co/t/cannot-see-data-with-vega/171736/1 "2019-03-11T11:19:55Z")

</div>

Hi!  
I want visualize data as a Gantt chart, i found some examples online with vega but i don't know why my piece of code does not work:

```auto
    {
  "$schema": "https://vega.github.io/schema/vega-lite/v3.json",
  "description": "Gantt chart",
  "data": {
    "name": "data",
    "url": {
      %context%: true
      %timefield%: @timestamp
      "index": "logstash-nemo.apps.webui-*",
      "body": {
        size:3000
        _source:[
          "@timestamp",
          "fields"
        ]
      }
    }
  }
  "transform": [
    {
      "type": "project",
      "fields": ["fields.Method"],
      "as": ["Method"]
    },
    {
      "type": "project",
      "fields": ["fields.startDate"],
      "as": ["startDate"]
    },
    {
      "type": "project",
      "fields": ["fields.endDate"],
      "as": ["endDate"]
    },
  ]
  "mark": "bar",
  "encoding": {
    "y": {"field": "_source.Method", "type": "ordinal"},
    "x": {"field": "_source.startDate", "type": "temporal"},
    "x2": {"field": "_source.endDate", "type": "temporal"}
  }
}

```

the error is:  
`Cannot read property 'startDate' of undefined`

in addiction kibana rejects my transformations ☹  
`WARN Ignoring an invalid transform: {"as":["endDate"],"fields":["fields.endDate"],"type":"project"}.`

Can you help me?

---

<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:** [March 15, 2019, 1:18pm UTC](https://discuss.elastic.co/t/cannot-see-data-with-vega/171736/2 "2019-03-15T13:18:11Z")

</div>

Hey, a good place to start is to check whether the data returned from Elasticsearch actually looks like expected as outlined here: [https://www.elastic.co/guide/en/kibana/current/vega-debugging.html#vega-data](https://www.elastic.co/guide/en/kibana/current/vega-debugging.html#vega-data) Maybe the startDate field simply isn't there?

About the second error: Your spec seems to use a version of vega-lite which doesn't have a stable release yet - Kibana currently only supports vega-lite 2.4, so maybe you are using language features which are not availble. Have you tried skipping the transformations and going to the field directly? `"y": {"field": "_source.fields.Method", "type": "ordinal"},` (assuming it is there)?

---

<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 12, 2019, 1:18pm UTC](https://discuss.elastic.co/t/cannot-see-data-with-vega/171736/3 "2019-04-12T13:18:11Z")

</div>

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