15
Views
3
Comments
Solved
Column chart is not getting reflow on a button click
Question
Application Type
Reactive

I am using Colum Chart in Reactive App. I have one menu button, when cick on the menu button the side menu bar gets open. On click of this menu button I want to resize the column chart. In Highcharts there is 'reflow' function available. I tried to use the same but it is not getting resized. 

Regards,

Bhagyashree S.

Rank: #70
Solution

Hi Bhagyashree,


You can try this sample JS code that redraws / resizes the first Chart in your page:


Highcharts.charts[0].setSize(<your width>, <your height>, <do animation - True or False>);


An example of this call would be:

 

Highcharts.charts[0].setSize(450, 450, true);


This will only apply the resizing to the first chart in the screen. If you have more than one Chart in the same page, you should get it by id to make sure you resize the right one or you want to do a for each to resize all the charts inside Highcharts element.


You can see more information about the SetSize function here.


Hope it helps.


Regards,
João

Does anyone has any idea or solution of the mentioned issue. I haven't yet got any solution. Please provide me any alternate way if possible for it.


Regards,

Bhagyashree S.

Rank: #70
Solution

Hi Bhagyashree,


You can try this sample JS code that redraws / resizes the first Chart in your page:


Highcharts.charts[0].setSize(<your width>, <your height>, <do animation - True or False>);


An example of this call would be:

 

Highcharts.charts[0].setSize(450, 450, true);


This will only apply the resizing to the first chart in the screen. If you have more than one Chart in the same page, you should get it by id to make sure you resize the right one or you want to do a for each to resize all the charts inside Highcharts element.


You can see more information about the SetSize function here.


Hope it helps.


Regards,
João