mirror of
https://github.com/TBEDP/datavjs.git
synced 2025-12-08 19:45:52 +00:00
43 lines
884 B
HTML
43 lines
884 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>tree</title>
|
|
<script src="../../build/deps.js"></script>
|
|
<script src="../../deps/seajs/sea.js"></script>
|
|
<style type="text/css">
|
|
#chart {
|
|
border-top: 1px dashed #F00;
|
|
border-bottom: 1px dashed #F00;
|
|
}
|
|
.textArea {
|
|
border: 2px solid black;
|
|
color: black;
|
|
font-family: monospace;
|
|
height: 3in;
|
|
overflow: auto;
|
|
padding: 0.5em;
|
|
width: 750px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="chart"></div>
|
|
<script>
|
|
seajs.config({
|
|
alias: {
|
|
'DataV': '/lib/datav.js',
|
|
'Tree': '/lib/charts/tree.js'
|
|
}
|
|
});
|
|
seajs.use(["Tree", "DataV"], function (Tree, DataV) {
|
|
var tree = new Tree("chart", {width:960});
|
|
DataV.csv("DataExample.csv", function(source){
|
|
tree.setSource(source);
|
|
tree.render();
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|