Open andrewgoz opened 9 months ago
I've found in some cases window.getComputedStyle() is returning empty strings for styles.paddingLeft/Right. The following line:
https://github.com/frappe/charts/blob/8f69be05c10635d5726a1aa8843bcfed3c91a786/src/js/utils/dom.js#L85
should probably be changed to something like:
parseFloat(styles.paddingLeft || '0') + parseFloat(styles.paddingRight || '0')
Hey! Should get fixed with the following PR #418. Hope its usefull.
I also added some element type checking.
I've found in some cases window.getComputedStyle() is returning empty strings for styles.paddingLeft/Right. The following line:
https://github.com/frappe/charts/blob/8f69be05c10635d5726a1aa8843bcfed3c91a786/src/js/utils/dom.js#L85
should probably be changed to something like: