Trying to adjust the size of my dc.js charts based on window size led me to some helpful examples in the DC.js knowledgebase, with a focus on resizing canvas elements such as this one.
However, when I attempt implementation, the chart seems to resize vertically by 2 pixels continuously.
https://i.sstatic.net/swdZl.gif
I suspect a React/DOM conflict and tried adding specific styling to the chart like this (which unfortunately did not resolve the issue):
...
.style('position', 'absolute')
.style('left', 0)
.style('top', 0);
...
You can view a working example on stackblitz
P.S. When attempting to implement this in the chartTemplate.tsx
, I encountered a strange typing error:
Property 'height' does not exist on type 'number | PieChart'.
Property 'height' does not exist on type 'number'.(2339)
In conclusion, I aim to find a more concise way to apply this across all chart files, but I'm unsure if it's a typing issue within DC.js or an error in my approach.