coshx / portfolio_optimizer

Visualize your optimal stock portfolio
MIT License
1 stars 3 forks source link

Make d3 chart resize based on browser changes. #6

Open mwytock0812 opened 8 years ago

mwytock0812 commented 8 years ago

Use something like the following to make the d3 chart responsive to changes in browser height and width.

var panel_width = d3.selectAll('div-panel-body').clientWidth;
var panel_height = d3.selectAll('div.panel-body').clientHeight;