apnahas
Posts: 23
Joined: Thu Sep 13, 2012 6:48 pm

disable highchart resizing?

I'm using a chart and a size changed event from the browser to determine when to change the size of the chart.

When resizing this way, sometimes the size will change to the previous size of the chart, instead of the new one.. (so I will call setSize, I see the size is set, then some other code internal to highcharts resizes it to its previous size?)

is there a way to disable this behavior? I don't want highcharts to do any resizing in response to the browser changing sizes, I am explicitly setting it anyway
seba
Posts: 4415
Joined: Tue Jul 31, 2012 2:26 pm

Re: disable highchart resizing?

You can set width and height to defined values, then it will not be resizable.

http://jsfiddle.net/YH9vs/1/

Let me know if it solves your problem.
Sebastian Bochan
Highcharts Developer
dehian
Posts: 12
Joined: Wed Oct 31, 2012 10:55 am

Re: disable highchart resizing?

Hi,

it does not the trick for me

http://jsfiddle.net/9adLA/
when you click on the serie Q25 in the legend, the graph is resized (horizontally in chrome and FF, horizontally and vertically in IE)

I'm more concerned about the vertical thing in IE...

Any other suggestion?

Thanks for your help
seba
Posts: 4415
Joined: Tue Jul 31, 2012 2:26 pm

Re: disable highchart resizing?

It is cause by decimal format, but you can use fomratter to change it (like in example http://jsfiddle.net/9adLA/1/). Also you can use http://api.highcharts.com/highcharts#Hi ... mberFormat() to define custom format of large values.

If you would like to have "static" scale in yAxis you should set min/max value
Sebastian Bochan
Highcharts Developer
dehian
Posts: 12
Joined: Wed Oct 31, 2012 10:55 am

Re: disable highchart resizing?

The vertical problem in IE9 is still there in your example.On the first click on "Q25" the height is modified.
and even if i set min and max value for the yaxis (i updated the fiddle with min an max value for yaxis)
dehian
Posts: 12
Joined: Wed Oct 31, 2012 10:55 am

Re: disable highchart resizing?

Also would it be possible that when i turn a hidden serie to visible it animates just like the first serie does when the chart is loaded ?
Fusher
Posts: 7912
Joined: Mon Jan 30, 2012 10:16 am

Re: disable highchart resizing?

You have to set fixed margins, see: http://jsfiddle.net/9adLA/5/
About animations - only by using some workarounds, like removing all data, and setting once again.
Paweł Fus
Highcharts Developer
dehian
Posts: 12
Joined: Wed Oct 31, 2012 10:55 am

Re: disable highchart resizing?

Thanks Fusher this did the trick.

Return to “Highcharts Usage”