PHP code example of mikepsinn / php-highcharts-exporter

1. Go to this page and download the library: Download mikepsinn/php-highcharts-exporter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mikepsinn / php-highcharts-exporter example snippets

 bash
$ composer 

  "scripts": {
    "post-install-cmd": [
      "chmod +x vendor/mikepsinn/php-highcharts-exporter/phantomjs"
    ]
  }
 php
$export = new HighchartsExport(HighchartsExport::getConfigContents('test-basic-line'));
$export->setOutputFileName("test-chart.png"); // optional
$export->setImageType("png"); // optional
$path = $export->getFilePath(); // Absolute output file path on server
$data = $export->getImageData(); // Raw image data can be saved to file
$html = $export->getHtml(); // Inline this in any html file