Get started with vega CDN
BSD-3-Clause licensed
Vega is a library for creating interactive data visualizations in the browser.
Tags:- vega
- vega.js
Stable version
Copied!
How to start using vega CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with vega CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/vega/5.28.0/vega.min.js"></script>
<script src="https://cdn.cdnhub.io/vega-lite/5.28.0/vega-lite.min.js"></script>
<style>
.vega-graph {
width: 100%;
height: 400px;
}
</style>
</head>
<body>
<div class="vega-graph"></div>
<script type="application/json">
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{ "x": 10, "y": 20 },
{ "x": 20, "y": 30 },
{ "x": 30, "y": 40 },
{ "x": 40, "y": 50 },
{ "x": 50, "y": 60 }
]
},
"mark": {
"type": "circle",
"size": 5
},
"encoding": {
"x": { "field": "x", "type": "quantitative" },
"y": { "field": "y", "type": "quantitative" }
}
}
</script>
<script>
const spec = document.querySelector('script:last-child').textContent;
const chart = vega.parse(spec);
vega.render(chart, document.querySelector('.vega-graph'));
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
All versions
1.0.0
1.1.0
1.2.0
1.3.0
1.3.1
1.3.2
1.3.3
1.3.4
1.4.0
1.4.1
1.4.2
1.4.3
1.5.0
1.5.3
1.5.4
2.0.1
2.0.2
2.0.3
2.0.4
2.0.5
2.0.6
2.1.0
2.1.1
2.1.2
2.2.0
2.2.1
2.2.2
2.2.3
2.2.4
2.2.5
2.2.6
2.3.0
2.3.1
2.4.0
2.4.1
2.4.2
2.5.0
2.5.1
2.5.2
2.6.0
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
3.0.0
3.0.0-beta.0
3.0.0-beta.1
3.0.0-beta.10
3.0.0-beta.11
3.0.0-beta.12
3.0.0-beta.13
3.0.0-beta.14
3.0.0-beta.15
3.0.0-beta.16
3.0.0-beta.17
3.0.0-beta.18
3.0.0-beta.19
3.0.0-beta.2
3.0.0-beta.20
3.0.0-beta.21
3.0.0-beta.22
3.0.0-beta.23
3.0.0-beta.24
3.0.0-beta.25
3.0.0-beta.26
3.0.0-beta.27
3.0.0-beta.28
3.0.0-beta.29
3.0.0-beta.3
3.0.0-beta.30
3.0.0-beta.31
3.0.0-beta.32
3.0.0-beta.33
3.0.0-beta.34
3.0.0-beta.35
3.0.0-beta.36
3.0.0-beta.37
3.0.0-beta.38
3.0.0-beta.39
3.0.0-beta.4
3.0.0-beta.5
3.0.0-beta.6
3.0.0-beta.7
3.0.0-beta.8
3.0.0-beta.9
3.0.0-rc1
3.0.0-rc2
3.0.0-rc3
3.0.0-rc4
3.0.0-rc5
3.0.0-rc6
3.0.0-rc7
3.0.1
3.0.10
3.0.2
3.0.3
3.0.4
3.0.5
3.0.6
3.0.7
3.0.8
3.0.9
3.1.0
3.2.0
3.2.1
3.3.0
3.3.1
4.0.0
4.0.0-rc.1
4.0.0-rc.2
4.0.0-rc.3
4.1.0
4.2.0
4.3.0
4.4.0
5.0.0
5.0.0-rc1
5.0.0-rc2
5.0.0-rc3
5.0.0-rc4
5.0.0-rc5
5.1.0
5.10.0
5.10.1
5.11.0
5.11.1
5.12.0
5.12.1
5.12.2
5.12.3
5.13.0
5.14.0
5.15.0
5.16.0
5.16.1
5.17.0
5.17.1
5.17.2
5.17.3
5.18.0
5.19.0
5.19.1
5.2.0
5.20.0
5.20.1
5.20.2
5.21.0
5.22.0
5.22.1
5.23.0
5.24.0
5.25.0
5.26.0
5.26.1
5.27.0
5.28.0
5.29.0
5.3.0
5.3.1
5.3.2
5.3.3
5.3.4
5.3.5
*** 5.30.0
5.4.0
5.5.0
5.5.1
5.5.2
5.5.3
5.6.0
5.7.0
5.7.1
5.7.2
5.7.3
5.8.0
5.8.1
5.9.0
5.9.1
5.9.2