You can go to the blockbuilder and to fork this block and create your own visualizations. Check out the Vega-Lite website for more information, tutorials, and documentation. Happy hacking!
forked from domoritz's block: Vega-Lite Bl.ocks example
license: bsd-3-clause |
You can go to the blockbuilder and to fork this block and create your own visualizations. Check out the Vega-Lite website for more information, tutorials, and documentation. Happy hacking!
forked from domoritz's block: Vega-Lite Bl.ocks example
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v2.json", | |
"description": "A simple bar chart with embedded data.", | |
"width": 360, | |
"data": { | |
"values": [ | |
{"name":"John", "age":23, "height":1.93}, | |
{"name":"Mafe", "age":22, "height":1.70}, | |
{"name":"Sonia", "age":27, "height":1.60}, | |
{"name":"Vicente", "age":73, "height":0.32} | |
] | |
}, | |
"mark": "bar", | |
"encoding": { | |
"x": {"field": "name", "type": "nominal"}, | |
"y": {"field": "age", "type": "quantitative"}, | |
"tooltip": {"field": "name", "type": "nominal"} | |
} | |
} |
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdn.jsdelivr.net/npm/vega@4"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | |
<script src="https://cdn.jsdelivr.net/npm/vega-embed@3"></script> | |
</head> | |
<body> | |
<div id="vis"></div> | |
<script> | |
const spec = "bar.vl.json"; | |
vegaEmbed('#vis', spec, {defaultStyle: true}).catch(console.warn); | |
</script> | |
</body> |