Seiten · Laravilt
Pie Chart
Pie and doughnut charts for proportions.
A pie chart takes one series of values. You pass a plain data array instead of Chart.js datasets.
Basic usage
php
Doughnut, legend and percentages
php
Dynamic data
php
Methods
| Method | Description |
|---|---|
make(array $labels = [], array $data = []) | Create the chart (static) |
doughnut(bool $condition = true) | Render as a doughnut |
showLegend(bool $condition = true) | Show the legend |
showPercentage(bool $condition = true) | Show percentages |
data(array $data) | Set labels and datasets directly |
options(array $options) | Chart.js options (replaces options set by the helpers) |
height(int $height) | Height in pixels |
plus heading(), description(), polling() ... | See shared methods |