Giovanni Bitliner
Giovanni Bitliner

Reputation: 2072

HighCharts: strange error from creation of stock chart

I'm trying to create a simple Stock Chart, like this but it throws this error in console:

Uncaught TypeError: Cannot read property 'width' of undefined
Tick.getLabelSideshighstock.src.js:5338
Tick.handleOverflowhighstock.src.js:5360
Tick.renderhighstock.src.js:5573
(anonymous function)highstock.src.js:7491
eachhighstock.src.js:1021
Axis.renderhighstock.src.js:7473
Chart.render.chart.seriesGroup.renderer.g.attr.zIndexhighstock.src.js:10529
eachhighstock.src.js:1021
Chart.renderhighstock.src.js:10528
Chart.firstRenderhighstock.src.js:10729
Chart.inithighstock.src.js:10813
Charthighstock.src.js:9399
Highcharts.StockChart

Why? I was thinking that the problem is from incorrect data (or bad conversions of date in timestamp), but the data seems to be correct. Here's the data I'm using:

[[1343833881,1],[1343833879,-1],[1343833876,0],[1343833007,0],[1343833003,0],
 [1343833000,-1],[1343832993,-1],[1343832993,1],[1343497396,0],[1343497340,0.5],
 [1343497330,-1],[1343497316,-0.5]]

If you try this data in the JSFiddle example of high stock linked above you will see that it doesn't work.

Upvotes: 0

Views: 3290

Answers (2)

Oscar Calderón
Oscar Calderón

Reputation: 41

i have the same problem, but in mi case I have a file named jquery.resize.js, this was the error, because it search the property for your purpose, i remove the link to the file and it works nice.

I hope it helps!

Kind regards.

Upvotes: 3

Jugal Thakkar
Jugal Thakkar

Reputation: 13472

Your time values are in descending order, whereas they need to be strictly in ascending order, find here chart with same data, just ordered correctly, http://jsfiddle.net/jugal/Swj3E/

Upvotes: 2

Related Questions