Looking to hire Laravel developers? Try LaraJobs

laravel-highcharts maintained by ngocnh

Description
This is a package for generating a Highchart JSON config.
Author
Last update
2017/04/12 05:06 (dev-master)
License
Links
Downloads
1 402

Comments
comments powered by Disqus

laravel-highcharts

This is a package for generating a Highchart JSON config.

Based in PHP Highcharts.

Installation

Run the following command and provide the latest stable version (e.g v2.4.15) :

composer require ngocnh/laravel-highcharts

or add the following to your composer.json file :

"ngocnh/laravel-highcharts": "dev-master"

Then register this service provider with Laravel :

'Ngocnh\Highchart\HighchartServiceProvider',

Usage

Create a chart:

$chart = App::make('highchart')
    ->setTitle('Scatter plot with regression line')
    ->addSeries(
        array(
            ScatterSeries::factory()
                ->setName('Observations')
                ->addData(array(1, 1.5, 2.8, 3.5, 3.9, 4.2)),
            LineSeries::factory()
                ->setName('Regression line')
                ->addDataPoint(DataPoint::factory(0, 1.11))
                ->addDataPoint(DataPoint::factory(5, 4.51))
                ->getMarker()->setEnabled(false)->getSeries()
                ->setEnableMouseTracking(false),
        )
    )
;
$chart->render();