Click here to Skip to main content
16,013,642 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using Highcharts. I need to send highcharts as attachment in email. I can generate highcharts on server using PhantomJS.
http://www.highcharts.com/docs/export-module/render-charts-serverside[^]
I changed the config parameters in highcharts-convert.js. I am able to generate chart using following on command prompt:

phantomjs highcharts-convert.js -infile options.js -outfile chart.png

& the contents of options.js file is

{infile:{xAxis:{categories:["Jan","Feb","Mar"]},
series:[{data:[29.9,71.5,106.4]}]},
constr:"Chart",
outfile:"//chart.png"}

The problem is that the generated chart is blank with Title as "Chart Title". I tried with changing the extension of js to json, that didn't work too.
I found a solution on stackoverflow
http://stackoverflow.com/questions/17467331/i-cant-make-highcharts-phantomjs-export-server-work?rq=1[^]
But, still it's not working.

Any help would be highly appreciated.
Posted
Updated 8-Dec-16 6:18am

 
Share this answer
 
Hi! If you using Azure it's impossible to generate charts via phantomjs (proof). I recommend you to use standalone highcharts server. Details you can read here.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900