'Problems with fill cell in grid: Amcharts + React Grid Layout
I have complicated problem. I am trying to build customizable dashboard. On one page will be view with charts (I am using amcharts 5). Charts should be resizeable - for this purpose I am using React-Grid-Layout. I want to achieve resizeable charts - should fill container, doesn't matter how big will be. But I can't. I can change size of cell, but charts still has sam size (or change only width). I tried with some custom hooks, forward ref passed to Graph element, width.clientHeight and much more. I tried flows:
- resize child -> change parent size -resize parent -> change child size I used different css properties in material ui - inherit, fit-content. Charts is render as a canvas - it can be a problem. My another idea was pass numer as a prop to ReactGridLayout - to rowHeight. I have no idea what I can do more. Please take a look on my code in sandbox. https://codesandbox.io/s/sparkling-smoke-fcjt8?file=/src/Layout.js
Thanks in advance guys. Cheers.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
