Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Option height and width not working #43

Open
fsnightmckngbrd opened this issue Nov 26, 2019 · 3 comments
Open

Option height and width not working #43

fsnightmckngbrd opened this issue Nov 26, 2019 · 3 comments
Labels

Comments

@fsnightmckngbrd
Copy link

Changing the values of height and width on options is not working.
The chart always expands to 100%

Please help. Thanks.

@farley907
Copy link

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.

@tonydspaniard
Copy link
Member

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.

@mindochin
Copy link

the width can still be adjusted. but if you limit the height to an external block, the graph goes beyond

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants