Last active
August 29, 2015 14:02
-
-
Save domitry/2f53781449025f772676 to your computer and use it in GitHub Desktop.
A demo for Ecoli.js (Bar chart)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang='en'> | |
<head> | |
<title>Nyaplotjs example -- Bar chart</title> | |
<script src='http://d3js.org/d3.v3.min.js'></script> | |
<script src='https://rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js'></script> | |
</head> | |
<body> | |
<div id='vis'></div> | |
<script> | |
models = {data:{data1: [{name:'type1',val1:48,val2:13}, {name:'type2',val1:20,val2:25}, {name:'type3',val1:4,val2:11}, {name:'type4',val1:12,val2:34}, {name:'type5',val1:22,val2:34}]},panes: [{type:'rectangular', diagrams:[{type: 'bar', data: 'data1', options: {x:'name', y:'val1'}}],options:{width:500, height:500, xrange: ['type1','type2','type3','type4','type5'], yrange: [0,50]}}]}; | |
window.onload = function(){Nyaplot.core.parse(models, '#vis');}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment