lydiachoi / test-percentage-visualizer

Visualizer to show percentage of test code through time
2 stars 0 forks source link

Make graph sizes responsive #26

Closed jregchiu closed 4 years ago

jregchiu commented 4 years ago

Right now the width and height are hardcoded. For the UAT I just did a quick hack and used window.innerWidth and window.innerHeight to resize them responsively.

@cbolton97 or @shannonjanehogan just wondering if there's a better way to programmatically get the width and height of the area the graph can inhabit?

jregchiu commented 4 years ago

@xavierdelacruz pointed me in this direction: https://stackoverflow.com/questions/16265123/resize-svg-when-window-is-resized-in-d3-js