Adam Magaluk
Adam Magaluk

Reputation: 1726

Highcharts lines not being drawn until browser is resized

I'm running into issues while testing Highcharts javascript charting library on one of my pages.

The issue i'm seeing is none of the data is visible until I slightly adjust the browsers size. Before resizing the tooltip does show the points.

First I thought the issue was due to jquery tabs, but that was not the case. I added the fix from Highcharts recommendations. http://www.highcharts.com/studies/jquery-ui-tabs.htm

I tried calling the charts setSize() method after initialization to see if manually resizing would cause the lines to be viable.

Any ideas?

Here how i'm initializing the chart.

$(div).ready(function(){
    var chart = new Highcharts.Chart({
        chart: {renderTo: 'some-div', type: 'line'},
        title: {text: 'Title'},
        xAxis: {type: 'text',title: {text: null}},
        yAxis: {title: {text: 'Usage'}},
        series: [{name:"Series 1", data : [1,2,3,4,5,6,6,7,2,7] }],
        legend: {enabled: true}
    });
})

Upvotes: 2

Views: 1064

Answers (1)

Adam Magaluk
Adam Magaluk

Reputation: 1726

Figured it out, well I didn't exactly find the problem but found a solution.

Upgrading from version v2.1.6 to the latest (v2.3.5) solved it.

Looking through the changelog there were a few references to bug fixes with Jquery 1.7/1.8 compatibility issues possibly the reason.

Upvotes: 2

Related Questions