2amigos/yii2-chartjs-widget

100% width

Closed this issue · 4 comments

How can I apply a 100% width to the chart, eg. to take the width from a surrounding bootstrap container?

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: chartjs/Chart.js#882