UNPKG

cux-test

Version:

[SB Admin](http://startbootstrap.com/template-overviews/sb-admin/) is an open source, admin dashboard template for [Bootstrap](http://getbootstrap.com/) created by [Start Bootstrap](http://startbootstrap.com/).

72 lines (54 loc) 1.44 kB
//LIGHT nv.addGraph(function() { var chart = nv.models.lineWithFocusChart(); chart.xAxis .tickFormat(d3.format(',f')); chart.yAxis .tickFormat(d3.format(',.2f')); chart.y2Axis .tickFormat(d3.format(',.2f')); d3.select('#multiBar svg') .datum(testData()) .transition().duration(500) .call(chart); nv.utils.windowResize(chart.update); return chart; }); /************************************** * Simple test data generator */ function testData() { return stream_layers(3,128,.1).map(function(data, i) { return { key: 'Stream' + i, values: data }; }); } // DARK nv.addGraph(function() { var chart = nv.models.lineWithFocusChart(); chart.xAxis .tickFormat(d3.format(',f')); chart.yAxis .tickFormat(d3.format(',.2f')); chart.y2Axis .tickFormat(d3.format(',.2f')); d3.select('#multiBarDark svg') .datum(testData()) .transition().duration(500) .call(chart); nv.utils.windowResize(chart.update); return chart; }); /************************************** * Simple test data generator */ function testData() { return stream_layers(3,128,.1).map(function(data, i) { return { key: 'Stream' + i, values: data }; }); }