I am having difficulty having the export feature to work on my server. I have tried searching and there is not much I can get specifically. I have tried both features and the same error shows up each time. This is the error I am getting
./phantomjs highcharts-convert.js -infile test.js -outfile chart.png
ReferenceError: Can't find variable: $
ERROR: the options variable was not available, contains the infile an syntax error? see ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
contents of test.js are :
{ xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] };
I have tried putting it in JSON format but it doesn't seem to be working...
I had the exact same error...
Make sure you have 3 important files in the same folder as highcharts-convert.js
highcharts.js -or- highstock.jshighcharts-more.jsjquery.jsThen, update the file names at the top of highcharts-convert.js to match these file names and save it.
var config = {
/* define locations of mandatory javascript files */
HIGHCHARTS: 'highcharts.js',
HIGHCHARTS_MORE: 'highcharts-more.js',
JQUERY: 'jquery.js',
TIMEOUT: 2000 /* 2 seconds timout for loading images */
},
Now you should have no more errors (or at least a different one, ha)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With