Skip to content

Instantly share code, notes, and snippets.

@domitry

domitry/index.html

Last active Aug 29, 2015
Embed
What would you like to do?
A demo for Ecoli.js (Bar chart)
<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