Skip to content

Files

Latest commit

Aug 25, 2020
679b2ce · Aug 25, 2020

History

History
34 lines (26 loc) · 645 Bytes

bar.md

File metadata and controls

34 lines (26 loc) · 645 Bytes

Bar Chart

drawing

A bar chart is generated by adding the --bar flag to the artisan command lit:chart {name}.

php artisan lit:chart SalesProductsChart --bar

Configuration

Which data is displayed in your chart is configured in the value method as shown below.

public function value($query)
{
    return $this->count($query);
}

Possible methods:

return $this->count($query);
return $this->average($query, 'price');
return $this->min($query, 'price');
return $this->max($query, 'price');
return $this->sum($query, 'price');