I'm trying to resize a couple dc.js charts based on the window size, and I found there are some examples in the DC.js knowledgebase, where one in particular deals with resizing canvas elements.
When I implement, the chart resizes vertically by (debugging suggests) 2 pixels, infinitely.
My guess is this React/DOM collision, and I can squelch the issue by adding the following to the chart styling (unfortunately not a solution in my case):
...
.style('position', 'absolute')
.style('left', 0)
.style('top', 0);
...
Here's a working stackblitz
P.S. I tried to implement in this in the chartTemplate.tsx but I get a strange typing error:
Property 'height' does not exist on type 'number | PieChart'.
Property 'height' does not exist on type 'number'.(2339)
Ultimately, for brevity, I'd like to implement in the template once (rather than each chart file), but I'm unsure whether this is a typing issue for DC.js (as I've run into a few definition errors) or an error in my implementation
