michaeldrennen/highcharts

A PHP library to easily make Highcharts for your site.

v0.04 2021-11-14 19:58 UTC

This package is auto-updated.

Last update: 2024-11-20 14:47:30 UTC


README

Latest Stable Version Total Downloads License composer.lock available

A PHP library that helps produce Highcharts graphs.

This library is functional, but needs some work before I release a v1.0

Breaking Change - 2019-05-15

The latest release includes a breaking change to the library that now allows users to include "global" Highcharts options.

// These will be applied to every chart on this page.
$globalOptions = [
            'lang' => [
                'thousandsSep' => ",",
            ],
        ];
        
$localOptions = [
    'title'    => ['text' => "My First Chart"],
    'subtitle' => ['text' => "It needs data"],
    'yAxis'    => [ 
        [
            'title' => [ 
                           'text' => "Scores" 
                       ],
            'type'            => 'linear',
            'floor'           => 0,
            'startOnTick'     => TRUE,
        ]
    ]
];
$chart = Highchart::make( 'highstock', 400, '100%' )
                  ->setGlobalOptions($globalOptions)
                  ->setLocalOptions( $localOptions );