runmael
Posts: 7
Joined: Tue Jun 16, 2015 8:29 am

Expanding / collapsing chart

Thu Jan 25, 2018 6:46 pm

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!

ppotaczek
Posts: 743
Joined: Mon Oct 02, 2017 3:12 pm

Re: Expanding / collapsing chart

Fri Jan 26, 2018 11:15 am

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!
Paweł Potaczek,
Highcharts Developer

runmael
Posts: 7
Joined: Tue Jun 16, 2015 8:29 am

Re: Expanding / collapsing chart

Sat Jan 27, 2018 5:51 pm

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!

ppotaczek
Posts: 743
Joined: Mon Oct 02, 2017 3:12 pm

Re: Expanding / collapsing chart

Mon Jan 29, 2018 9:07 am

Hi runmael,

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

Best regards!
Paweł Potaczek,
Highcharts Developer

Return to “Highcharts Cloud”