mirror of
https://github.com/TBEDP/datavjs.git
synced 2025-12-08 19:45:52 +00:00
25 lines
826 B
HTML
25 lines
826 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title>Bubble Graph</title>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="chart"></div>
|
|
<script src="../../build/datav.js"></script>
|
|
<script src="../../lib/charts/axis.js"></script>
|
|
<script src="../../lib/charts/bubble.js"></script>
|
|
<script>
|
|
var bubble = new Bubble("chart", {"width": 1200, "height": 800});
|
|
DataV.csv("nations2.csv", function(dataSource) {
|
|
bubble.setSource(dataSource);
|
|
// the dimension order is time, key, xaxis,yaxis,size,color dimension
|
|
// if you don't input next line, your source dimensions's order should be like above order
|
|
// bubble.chooseDimensions(["year", "country", "survival", "children", "population", "region"]);
|
|
bubble.render();
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|