I created an NVIDIA multiBarChart and placed it in jQuery resizable container. When changing the size of the chart, each render takes the same delay as the first time the chart was drawn: step-by-step delayed drawing of strips from left to right. This looks great when the chart is first drawn, but it is a nuisance when resizing the chart. I experimented with nv.d3.css, reducing each delay to 0 ms to no avail. We haven't tested the NVD3 JS yet and hope you don't need it.
Violin: http://jsfiddle.net/a5Fnj/10/
var container = $("#mycontainer"); $(container[0]).resizable(); var svg = d3.select(container[0]).append("svg"); nv.addGraph(function () { var chart = nv.models.multiBarChart(); chart.xAxis.tickFormat(d3.format(',f')); chart.yAxis.tickFormat(d3.format(',.1f')); d3.select(container[0]).select("svg") .datum(exampleData()) .transition().duration(0).call(chart); nv.utils.windowResize(chart.update); this.stackedbar = chart; }); function exampleData() { return stream_layers(3, 10 + Math.random() * 100, .1).map(function (data, i) { return { key: 'Stream' + i, values: data }; }); }
pmont
source share