In past recipes, we've explored how to generate a chart from the command line, or more correctly, on the server side. In this recipe, we'll be leveraging Yii's command-line capabilities to create a chart from the command line.
To set up the basic Yii project, refer to the Setting up a simple Yii Project recipe from this chapter.
We will also need to install PhantomJS. As the bower installation does not include some important scripts, we'll also need to download Highcharts normally using the following steps:
Visit the Highcharts website and download Highcharts (http://www.highcharts.com/download).
Extract the contents of the downloaded ZIP file, and copy the
exporting-server/phantomjs
folder toyii-highcharts/example_app/js/highcharts-phantomjs
.Install PhantomJS following the instructions found on the PhantomJS website (http://phantomjs.org).