-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chart not responsive - width stuck at 600px no matter what I do #262
Comments
solved it - CSS chart{ |
this seems to work if your chart isnt in a dynamic container. I have a sidebar that toggles open but the chart always remains the same size whether or not the sidenav is open or closed. the documentation doesnt give a thorough example of accessing the chart.reflow function so I've been unable to figure that out. anyone experience something similar with dynamic containers? i just need the chart to stretch and shrink as the sidenav toggles open and closed. |
@snekkysnek did u find any solutions for the same actually i also looking for the same requirement |
@as88425 no not yet but i believe calling chart.reflow() is the only solution. that being said, I haven't been able to successfully do this but will update if i figure it out. |
@snekkysnek i achieved the same using chart.ref.setSize(some dynamic width, some dynamic height, false) for angular 5. i thought it's also work for angular 2 |
@as88425 can you show me the context where you used chart.ref.setSize. that might work for me too i just dont know where/how to use it. |
@snekkysnek Please see the below example
so here i defined chartMonthly as a variable
|
I'm stuck with a fixed width and height of 600px and 400px respectively no matter what the browser is narrowed to. The demos all seem to be responsive, but for some reason mine is stuck at 600px.
This is the resulting div for the chart after rendering:
This is my chart definition/options:
chart: {
backgroundColor: 'transparent',
marginTop: 10,
marginBottom: 50,
animation: false,
type: 'column'
},
title: { text: null },
scrollbar: {
enabled: true
},
reflow: true,
Anyone??
The text was updated successfully, but these errors were encountered: