Generating a png file from config-
phantomjs-1.8.1/bin/phantomjs highcharts-convert.js -infile config.json -outfile out1.png -width 300 -scale 2.5 -constr Chart -callback callback.js
Error-
Things to check-
1. The following 3 files should be there in same folder or you have to set the paths to these here-
var config = {
/* define locations of mandatory javascript files */
HIGHCHARTS: 'highstock.js',
HIGHCHARTS_MORE: 'highcharts-more',
JQUERY: 'jquery-1.8.2.min.js'
},
2. The 'infile' parameter should have an extension of .json, because that is what it uses to decide between svg input and a configuration json.
phantomjs-1.8.1/bin/phantomjs highcharts-convert.js -infile config.json -outfile out1.png -width 300 -scale 2.5 -constr Chart -callback callback.js
Error-
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeError: 'undefined' is not an object (evaluating 'svgElem.getAttribute') | |
phantomjs://webpage.evaluate():20 | |
phantomjs://webpage.evaluate():23 | |
phantomjs://webpage.evaluate():23 | |
TypeError: 'null' is not an object (evaluating 'svg.width') | |
highcharts-convert.js:89 | |
highcharts-convert.js:322 | |
:/modules/webpage.js:277 |
Things to check-
1. The following 3 files should be there in same folder or you have to set the paths to these here-
var config = {
/* define locations of mandatory javascript files */
HIGHCHARTS: 'highstock.js',
HIGHCHARTS_MORE: 'highcharts-more',
JQUERY: 'jquery-1.8.2.min.js'
},
2. The 'infile' parameter should have an extension of .json, because that is what it uses to decide between svg input and a configuration json.
No comments:
Post a Comment