Page 1 of 1

Expanding / collapsing chart

Posted: Thu Jan 25, 2018 6:46 pm
by runmael
Hi!

I am trying to expand / collapse a graph, but unfortunately, without luck - the graph box does expand but the graph does not gets redrawn and properly positioned based on the new size.

Click invokes

Code: Select all

chart.setSize
function and then I have used both

Code: Select all

reflow and redraw
methods to try to properly render graph - but it seems it doesn't have any effect. Also, setting graph to be responsive doesn't do anything...

What am I missing? Note: I am using ng-highcharts wrapper for angular.

Thank you!

Re: Expanding / collapsing chart

Posted: Fri Jan 26, 2018 11:15 am
by ppotaczek
Hi runmael,

Please provide me with a fully working example where this problem occurs.

Here is an example of using reflow method:
http://jsfiddle.net/gh/get/library/pure ... rt-reflow/

API Reference: https://api.highcharts.com/class-refere ... art#reflow

Best regards!

Re: Expanding / collapsing chart

Posted: Sat Jan 27, 2018 5:51 pm
by runmael
Hi, thank you for the answer. In the meantime I figured out that the reflow is working when I change the width of container, but when I change the height it doesn't. Does this makes any sense? Where should I put the working example?

Thank you!

Re: Expanding / collapsing chart

Posted: Mon Jan 29, 2018 9:07 am
by ppotaczek
Hi runmael,

It will be best if you put your working example on: https://jsfiddle.net/

Best regards!