PHP code example of sirgalas / yii2-morrisjs

1. Go to this page and download the library: Download sirgalas/yii2-morrisjs 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/ */

    

sirgalas / yii2-morrisjs example snippets


use sirgalas\Morris;


echo Morris\Donut::widget([
    'resize' => true,
    'element' => 'donutChart',
    'data' => [
        [ 'label'=>'Download Sales', 'value'=>12 ],
        [ 'label'=> 'In-Store Sales', 'value'=> 30 ],
        ['label'=>'Mail-Order Sales', 'value'=> 20 ]
    ],
    'donutColor' => ['#3c8dbc', '#f56954', '#00a65a'],
]);