# Nothing appears on chart zone vega-lite

**URL:** <https://discuss.elastic.co/t/nothing-appears-on-chart-zone-vega-lite/226414>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [April 3, 2020, 2:32pm UTC](https://discuss.elastic.co/t/nothing-appears-on-chart-zone-vega-lite/226414 "2020-04-03T14:32:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oula\_oula](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oula_oula/32/63182_2.png) [@oula\_oula](https://discuss.elastic.co/u/oula_oula)\
**Post date:** [April 3, 2020, 2:32pm UTC](https://discuss.elastic.co/t/nothing-appears-on-chart-zone-vega-lite/226414/1 "2020-04-03T14:32:05Z")

</div>

Hi,  
I'm just beginer with vega. I would like to make a histogram =\> [X: loglevel, Y: doc\_count]  
But nothing is diplayed after playing my script (below), not even a message error...

Could someone have look on it ?

Thank you

```auto
{
  "$schema":"https://vega.github.io/schema/vega/v3.json",
  "autosize": {
    "type": "none",
    "contains": "content"
  }
  "width": 400, "height": 100,
  "data": {
    url: {
      index: "test_inds",
      body: {
        "aggs" : {
          "loglvls" : {
            "terms" : { "field" : "loglvl.keyword"}
          }
        }
      }
    },
    "format": { "property": "aggregations.loglvls.buckets" }
  },
  "mark": "bar",
  "encoding": {
    "update": {
      "x": {"field": "key", "type": "nominal"},
      "y": {"field": "doc_count", "type": "quantitative"}
    }
  }
}

```

---

<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:** [April 3, 2020, 3:15pm UTC](https://discuss.elastic.co/t/nothing-appears-on-chart-zone-vega-lite/226414/2 "2020-04-03T15:15:42Z")

</div>

Can you follow the steps outline here: [https://gist.github.com/nyurik/736c34970ba3c32f3fe3d45d66719b3e](https://gist.github.com/nyurik/736c34970ba3c32f3fe3d45d66719b3e)

And post the result? This will inline the Elasticsearch response in the spec, which will make it easier to see what's happening there. In the current state it's hard to reproduce.

---

<div class="post-metadata">

**Author:** ![oula\_oula](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oula_oula/32/63182_2.png) [@oula\_oula](https://discuss.elastic.co/u/oula_oula)\
**Post date:** [April 6, 2020, 10:59am UTC](https://discuss.elastic.co/t/nothing-appears-on-chart-zone-vega-lite/226414/3 "2020-04-06T10:59:44Z")

</div>

This is what the Chrome's console replies to me :

```auto
1. 0: {key: "INFO", doc_count: 18, Symbol(vega_id): 1305}
2. 1: {key: "ERROR", doc_count: 2, Symbol(vega_id): 1306}
3. length: 2
4. __proto__ : Array(0)

```

---

<div class="post-metadata">

**Author:** ![oula\_oula](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oula_oula/32/63182_2.png) [@oula\_oula](https://discuss.elastic.co/u/oula_oula)\
**Post date:** [April 6, 2020, 1:06pm UTC](https://discuss.elastic.co/t/nothing-appears-on-chart-zone-vega-lite/226414/4 "2020-04-06T13:06:11Z")

</div>

Solved it !

The script gets along with "vega-lite" where the structure is : "data+mark+encoding"  
and not "vega" where the structure is : "data+scales+axes+marks".

So, in my schema declaration at the beginning I had to replace ".../vega/..." by ".../vega-lite/..."

---

<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:** [May 4, 2020, 1:06pm UTC](https://discuss.elastic.co/t/nothing-appears-on-chart-zone-vega-lite/226414/5 "2020-05-04T13:06:41Z")

</div>

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