Chartjs-CSS/JSX: Fixing two HTML canvas within a div with relative width as 60% and 40%

1👍

There are many solution you can apply to achieve what you want.

Here is one example =>

basically, your wrapper use

  display: inline-flex;
  box-sizing: border-box;

your canvas fill the space available, and are contained by 2 div that do the sizing

width: "60%"
position: "relative"

https://codesandbox.io/s/muddy-river-dh3xu

Leave a comment