Vega Lite Table Output Option

Is there a table output option for vega lite (there is like 10 "mark" options but none of them are data table / grid or something similar.

Seems so simple - any help would be appreciated.



Vega is not meant to use pure text output like a table. So you won't find any table mark. Though you could of course hack that together if you want to, by placing text output at specific positions, but that won't be fun.

Might I ask, why you are looking into Vega for visualizing a table, instead of using the table visualization?


There is an example of how to create a table with Vega Lite - -- this is somewhat close to a table, but it is not the same as a true spreadsheet, because it won't resize cells if the content gets too big.

Hey Tim,

I have nested documents in elastic (if you are interest you can see how I am modelling the data in elastic you can look here --> Anyways using vega, for the first time, I can query nested documents in Kibana and produce visualisations on a dashboard (this is a massive step forward - great work guys). Previously we had to run our nested aggregations then push the results into elastic for visualisations in Kibana. Below is a sanitised example of a simple vega-lite visualisation I am using.

  "$schema": "",
  "title": "Identification Type Used",
  "data": {
    "url": {
      "%context%": true,
      "%timefield%": "saleDate",
      "index": "real-estate-sales",
      "body": {
        "aggs": {
          "a": {
            "nested": {"path": ""},
            "aggs": {
              "b": {
                "terms": {
                  "field": "",
                  "size": 10
        "size": 0
    "format": {"type": "json", "property": "aggregations.a.b.buckets"}
  "mark": "bar",
  "encoding": {
    "x": {"field": "key", "type": "ordinal"},
    "y": {"field": "doc_count", "type": "quantitative"}

I'm guessing the plan is to add nested aggregations to the standard visualisations eventually, however if there was a way to push the results of a vega-lite query into a table before then - that would be cool.

1 Like

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