fxcosta / laravel-chartjs

Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bar background color not showing for all rows

EskindirA opened this issue · comments

$chartjs = app()->chartjs
         ->name('Transactions')
         ->type('horizontalBar')
         ->labels($types)
         ->datasets([
             [
                 "label" => "Applications",
                 'backgroundColor' => ['rgba(63, 127, 191, 0.2)', 'rgba(63, 127, 191, 0.2)', 'rgba(63, 127, 191, 0.2)', 'rgba(63, 127, 191, 0.2)'],
                 'data' => $applications
             ],
             [
                 "label" => "Completed",
                 'backgroundColor' => ['rgba(63, 191, 127, 0.2)', 'rgba(63, 191, 127, 0.2)', 'rgba(63, 191, 127, 0.2)', 'rgba(63, 191, 127, 0.2)'],
                 'data' => $completed
             ],
             [
                 "label" => "In Process",
                 'backgroundColor' => ['rgba(191, 191, 63, 0.2)', 'rgba(191, 191, 63, 0.2)', 'rgba(191, 191, 63, 0.2)', 'rgba(191, 191, 63, 0.2)'],
                 'data' => $process
             ],
             [
                 "label" => "Rejected",
                 'backgroundColor' => ['rgba(191, 63, 63, 0.2)', 'rgba(191, 63, 63, 0.2)', 'rgba(191, 63, 63, 0.2)', 'rgba(191, 63, 63, 0.2)'],
                 'data' => $rejected
             ]
         ])
         ->options([

         ]);

trn