Is it possible to visualize with Vega/Vega-lite by using saved searches instead of indices?

I'm getting undefined for my X axis that is supposed to be nominal and I think it's because some docs don't contain that field I'm using for that axis.

    {
      "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
      "mark": "rect",
      "title": "Category",
      "data": {
        "url": {
          "%context%": true,
          "%timefield%": "@timestamp",
          "index": "test*",
          "body": {
            "size": 10000,
            "_source": [
              "@timestamp",
              "category"
            ]
          }
        },
        "format": {"property": "hits.hits"},
        "min_doc_count": 0
      },
      "encoding": {
        "x": {
          "field": "category",
          "type": "nominal",
          "axis": {"title": "Category"}
        },
        "y": {
          "aggregate": "count",
          "field": "category",
          "type": "quantitative",
          "axis": {"title": "Count"}
        }
      }
    }

@nyuriks - can you help here please ?

Thanks
Rashmi

Hi @gyau, to help, I would need your data (you could change it a bit for privacy/obfuscation reasons). See instructions . Thanks!

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