Skip to content

Instantly share code, notes, and snippets.

@kai101
Last active September 7, 2015 07:13
Show Gist options
  • Save kai101/fd792353abcd401a34cc to your computer and use it in GitHub Desktop.
Save kai101/fd792353abcd401a34cc to your computer and use it in GitHub Desktop.
highchart export-module ERROR: the options variable was not available or couldn't be parsed

ERROR: the options variable was not available or couldn't be parsed

starting phantomjs server:

/usr/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs ~/Code/highchart-export/highcharts-convert.js -host 127.0.0.1 -port 3005

testing command:

curl -H "Content-Type: application/json" -X POST -d '{"infile":"{xAxis: {categories: [\"Jan\", \"Feb\", \"Mar\"]},series: [{data: [29.9, 71.5, 106.4]}]}"}' 127.0.0.1:3005

Common Mistakes

Required files fail to include

make sure all these files are in a same directory as highcharts-convert.js

files: {
	highcharts: {
		JQUERY: 'jquery.1.9.1.min.js',
		HIGHCHARTS: 'highcharts.js',
		HIGHCHARTS_MORE: 'highcharts-more.js',
		HIGHCHARTS_DATA: 'data.js',
		HIGHCHARTS_DRILLDOWN: 'drilldown.js',
		HIGHCHARTS_FUNNEL: 'funnel.js',
		HIGHCHARTS_HEATMAP: 'heatmap.js',
		HIGHCHARTS_TREEMAP: 'treemap.js',
		HIGHCHARTS_3D: 'highcharts-3d.js',
		HIGHCHARTS_NODATA: 'no-data-to-display.js',
		// Uncomment below if you have both Highcharts and Highmaps license
		// HIGHCHARTS_MAP: 'map.js',
		HIGHCHARTS_SOLID_GAUGE: 'solid-gauge.js',
		BROKEN_AXIS: 'broken-axis.js'
	},

Required files fail to include

make sure jquery.1.9.1.min.js is same folder as highcharts-convert.js

Required files fail to include

make sure jquery.1.9.1.min.js file name is correct. JQuery site default is jquery-1.9.1.min.js change it to jquery.1.9.1.min.js

Required files fail to include

It is so important that I need to mention it 4 times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment