Wednesday, 7 August 2013

Highcharts phantomjs export server can't parse json string

Highcharts phantomjs export server can't parse json string

I can't get the highcharts export server to work when running phantomjs as
a server.
I am able to get the Highcharts export server working when I use the first
method they suggest:
phantomjs highcharts-convert.js -infile options1.json -outfile chart1.png
-scale 2.5 -width 300 -constr Chart -callback callback.js
But when I try to use phantomjs as a server I always get:
Failed rendering: SyntaxError: Unable to parse JSON string
I have tried using the sample string Highcharts provided and the one found
here
my post request looks like this:
curl -X POST -H "Content-Type: application/json" -d
'{infile:{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,176,135.6,148.5,21​6.4,194.1,95.6,54.4]}]},constr:"Chart",outfile:"//tmp//chart.png"}'
localhost:3003

No comments:

Post a Comment