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