Skip to main content

I just found the vega-lite block today and am trying to get a stacked bar graph using 2 fields. I stumbled onto the fold example (Fold | Vega-Lite) and was able to convert it to stacked instead of columns… and it looks like exactly what I want inside the vega-lite editor. But inside airtable, it seems that it doesn’t like the return “key” and “value” from the fold command. Gives the error:


value is not a valid transform name, inline data name, or field name from the Table1 table:


Anyone know if I’m doing something wrong, if this is missing functionality in airtable, or a bug?


{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"title": "Table1",
"width": "container",
"height": "container",

"transform": {"fold": m"Field1","Field2"]}],
"mark": "bar",
"encoding": {
"x": {
"field": "NAME",
"type": "nominal"
},
"y": {
"type": "quantitative",
"field": "value"
},
"color": {
"field": "key",
"type": "nominal",
"scale": {"range": e"#c49712", "#999"]
}
}
}
}

Edit- Add link to fold example

Support got back. Correct line should be



“transform”: {“fold”: o“Field1”,“Field2”], “as”:i“key”, “value”]}]



Reply