Book Image

Learning Highcharts 4

By : Joe Kuan
Book Image

Learning Highcharts 4

By: Joe Kuan

Overview of this book

Table of Contents (23 chapters)
Learning Highcharts 4
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

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 |...