Reputation: 11012
Given the follow Highcharts.Chart(options)
{
"chart": {
"type": "spline"
},
"title": {
"text": "",
"x": -20
},
"subtitle": {
"text": "",
"x": -20
},
"xAxis": [
"23 Jun",
"24 Jun",
"25 Jun",
"26 Jun",
"27 Jun",
"28 Jun",
"29 Jun"
],
"yAxis": {
"title": {
"text": ""
},
"plotLines": [
{
"value": 0,
"width": 1,
"color": "#808080"
}
]
},
"legend": {
"layout": "vertical",
"align": "right",
"verticalAlign": "middle",
"borderWidth": 0
},
"series": [
{
"name": "exposed",
"data": [
100,
200,
150,
130,
180,
200,
190
],
"dashStyle": "longdash"
},
{
"name": "converted",
"data": [
90,
80,
70,
75,
70,
80,
85
],
"dashStyle": "longdash"
},
{
"name": "engaged",
"data": [
30,
40,
35,
40,
48,
30,
33
],
"dashStyle": "longdash"
}
]
}
When I draw it with - $('#container').highcharts({...})
it prompts the error -
Uncaught Highcharts error #18: www.highcharts.com/errors/18
http://www.highcharts.com/errors/18
You can see it in - jsFiddle
What is wrong with that options
format ?
Upvotes: 0
Views: 13309
Reputation: 151
Define a container in the jsFiddle
there is a problème with the x axis. You have to define an object not only an array. Ex
"xAxis": {categories: [
'23 Jun',
'24 Jun',
'25 Jun',
'26 Jun',
'27 Jun',
'28 Jun',
'29 Jun'
]}
do you expect somethink like this http://jsfiddle.net/x4YbZ/ ?
Upvotes: 5