Open fsnightmckngbrd opened 4 years ago
I ran into the same problem trying to set those values. While not a great answer, I worked around this by wrapping the chart in a bootstrap class, ie; <div class="col-lg-6"> <?= ChartJS::widget([]); ?></div>
so that the chart would only be able to fill the container it was in.
While @farleyd response is good, you should also check on chartjs documentation: https://www.chartjs.org/docs/latest/general/responsive.html
This library is simply a wrapper of that library and it renders the js according to the configuration settings you provide.
the width can still be adjusted. but if you limit the height to an external block, the graph goes beyond
Changing the values of height and width on options is not working. The chart always expands to 100%
Please help. Thanks.