score:1

you have given fixed min-height to the canvas div which restricts the chart to further change it's dimensions. so, the following code has auto height and width automates to 100% which gives flexible chart.

#chartcontainer {
  position:relative;
  min-height:auto;
  width:100%;
  display: flex;
  flex-grow:1;
}

Related Query

More Query from same tag