areski / django-nvd3

Django wrapper for nvd3 - It's time for beautiful charts
Other
416 stars 124 forks source link

Responsive design #11

Closed chrissmejia closed 10 years ago

chrissmejia commented 10 years ago

Hi, the wraper have a problem with responsive design, nvd3 work fine apparently...

chrissmejia commented 10 years ago

This line is missing:

nv.utils.windowResize(chart.update);

like:

1 nv.addGraph(function() { 2 var chart = nv.models.discreteBarChart() 3 .x(function(d) { return d.label }) 4 .y(function(d) { return d.value }) 5 .staggerLabels(true) 6 .tooltips(false) 7 .showValues(true) 8 9 d3.select('#chart svg') 10 .datum(exampleData()) 11 .transition().duration(500) 12 .call(chart); 13 14 nv.utils.windowResize(chart.update); 15 16 return chart; 17 });

chrissmejia commented 10 years ago

This fix the problem... https://github.com/areski/python-nvd3/pull/12

areski commented 10 years ago

Thanks for the report, solved with https://github.com/areski/django-nvd3/commit/41917ca9ba6ac8c4b7048074b65f88301ac05c81