mirror of
https://github.com/TBEDP/datavjs.git
synced 2025-12-08 19:45:52 +00:00
34 lines
1.3 KiB
HTML
34 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
|
<title>Bubble Graph</title>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="chart"></div>
|
|
<script type="text/javascript" src="../../deps/d3.js"></script>
|
|
<script type="text/javascript" src="../../deps/raphael.min.js"></script>
|
|
<script type="text/javascript" src="../../deps/jquery-1.7.1.min.js"></script>
|
|
<script type="text/javascript" src="../../deps/seajs/sea.js"></script>
|
|
<script type="text/javascript">
|
|
seajs.config({
|
|
alias: {
|
|
'datav': '/datav.js',
|
|
'bubble': '/libs/bubble.js'
|
|
}
|
|
});
|
|
|
|
seajs.use(["bubble", "datav"], function (Bubble, DataV) {
|
|
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> |