CityofToronto / bdit_volumes

Traffic Volumes Modelling Project
7 stars 6 forks source link

Make graph responsive #60

Closed radumas closed 6 years ago

radumas commented 6 years ago

Graph should resize on window resize. Probably CSS

rcyyu commented 6 years ago

I made all graphs responsive using a built in function of Plotly.

window.onresize = function() {
        Plotly.Plots.resize(frame); // frame is the container the graph is in
};

Adding this chunk of code to the function createVolGraph() allows the graphs it creates to resize on window resize.