Nothing appears on chart zone vega-lite

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

{
  "$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"}
    }
  }
}


Can you follow the steps outline here: 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.

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

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)

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/..."

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