Closed schmunk42 closed 9 years ago
@schmunk42 Use the options
, is the one that sets the canvas width: https://github.com/2amigos/yii2-chartjs-widget/blob/master/Chart.php#L79
Tried it with
'options' => [
'height' => 400,
'width' => "100%"
],
but does not work at least on Safari. Width is only about 50px.
Will have a look
I know this is pretty old, but it seems the library doesn't yet support it: https://github.com/nnnick/Chart.js/issues/882
How can I apply a 100% width to the chart, eg. to take the width from a surrounding bootstrap container?