Страницы · Laravilt
Line Chart
Line and area charts for trends over time.
Basic usage
php
Datasets use the Chart.js dataset format.
Styling
php
Multiple datasets
php
Chart.js options and polling
php
options() replaces the whole options array, including anything set by curved(), fill(), showPoints() or showGrid(). Call it first, then the helpers.
Methods
| Method | Description |
|---|---|
make(array $labels = [], array $datasets = []) | Create the chart (static) |
curved(bool $condition = true) | Smooth lines |
fill(bool $condition = true) | Fill the area under the line |
showPoints(bool $condition = true) | Show data points |
showGrid(bool $condition = true) | Show grid lines |
data(array $data) | Set labels and datasets directly |
options(array $options) | Chart.js options |
height(int $height) | Height in pixels |
plus heading(), description(), polling() ... | See shared methods |