Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
A demo for Ecoli.js (Bar chart)
<html lang='en'>
<title>Nyaplotjs example -- Bar chart</title>
<script src=''></script>
<script src=''></script>
<div id='vis'></div>
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');};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment