Skip to content

Instantly share code, notes, and snippets.

@domitry
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domitry/f215d5ff3bd3f5fec2ad to your computer and use it in GitHub Desktop.
Save domitry/f215d5ff3bd3f5fec2ad to your computer and use it in GitHub Desktop.
A demo for Ecoli.js (Another theme)
<html lang='en'>
<head>
<title>Nyaplotjs example -- Another Theme</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>
var values = d3.range(100).map(function(val){return {val1: d3.random.bates(10)(val)};});
models = {data:{data1: values},panes: [{type:'rectangular', diagrams:[{type: 'histogram', data: 'data1', options: {value:'val1'}}], options:{width:500, height:500, xrange: [0,1], yrange: [0,30], bg_color:'#fff', grid:false, grid_color:'#000'}}]};
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