Running the Highcharts server script
So far, our script example is lacking in features and error checking functionality, and is far from perfect. Nonetheless, we can see how easy it is to create our own server-side Highcharts process to produce images. In this section, you will learn how to use the official server-side script by Highcharts, which has more features and can be used in different scenarios.
Server script usage
Since version 3, Highcharts is packaged with server-side script, highcharts_convert.js
, which is located in the exporting-server/phantomjs
directory. The script can be run as either a command line or as a listening server.
Tip
For a full description of usage and parameters, refer to https://github.com/highslide-software/highcharts.com/tree/master/exporting-server/phantomjs.
Running the script as a standalone command
Here is a typical command-line format for highcharts_convert.js
:
phantomjs highcharts-convert.js -infile file -outfile chart1.png | -type ( png | jpg | pdf |...