protected function prepareChartData(StatsTable $stats)
    {
        $totals = $stats->totals()->all();

        return json_encode([
            'labels'   => Arr::pluck($totals, 'label'),
            'datasets' => [
                [
                    'data'                 => Arr::pluck($totals, 'value'),
                    'backgroundColor'      => Arr::pluck($totals, 'color'),
                    'hoverBackgroundColor' => Arr::pluck($totals, 'highlight'),
                ],
            ],
        ]);
    }
protected function prepareChartData(StatsTable $stats)
    {
        $totals = $stats->totals()->all();

        return json_encode([
            'labels'   => Arr::pluck($totals, 'label'),
            'datasets' => [
                [
                    'data'                 => Arr::pluck($totals, 'value'),
                    'backgroundColor'      => Arr::pluck($totals, 'color'),
                    'hoverBackgroundColor' => Arr::pluck($totals, 'highlight'),
                ],
            ],
        ]);
    }
protected function prepareChartData ( StatsTable $ stats ) { $ totals = $ stats -> totals ( ) -> all ( ) ; return json_encode ( [ 'labels' => Arr :: pluck ( $ totals , 'label' ) , 'datasets' => [ [ 'data' => Arr :: pluck ( $ totals , 'value' ) , 'backgroundColor' => Arr :: pluck ( $ totals , 'color' ) , 'hoverBackgroundColor' => Arr :: pluck ( $ totals , 'highlight' ) , ] , ] , ] ) ; }
Prepare chart data.

@param  \Arcanedev\LogViewer\Tables\StatsTable  $stats

@return string
Prepare chart data .