score:8

Accepted answer

Finally I have find a solution, using the method "container":

$(chart.container).width()

This returns the current width of the chart.

score:0

This is an old question so my answer is just to provide more options for those who are checking this later.

If you want full width of chart:

this.chart.chartWidth

If you want the chart xAxis width, without possible labels on the left (check image), you have two options:

this.chart.plotWidth // or
this.chart.xAxis[0].width

enter image description here

score:3

You could use the xAxis extreme.max and translate it to pixels. Something like (not tested):

Chart.xaxis[0].toPixels( chart xaxis[0].getExtremes().max )

It feels like there should be an easier way, but I guess I would have used the containing div width. Maybe you could use chart options to get the containing div I'd and get the width from that.

score:18

In chart object you have access to chartWidth parameter, which keeps width of chart.

http://jsfiddle.net/7xNQL/1/

//callback
    function(chart){

                console.log(chart.chartWidth);

            }

Related Query

More Query from same tag