-
Notifications
You must be signed in to change notification settings - Fork 2
ChartJsDataset
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Helpers\ChartJsDataset represents one dataset definition for ChartJs.
label(string $label): selftype(string $type): selfbackgroundColors(array $colors): selfcolorFunction(callable $callback): self-
borderColor(string $color): self,borderWidth(int $width): self -
fill(bool $fill): self,pointRadius(int $radius): self interpolation(string $mode = 'default', float $tension = 0.4): selflabels(array $labels): selfexport(): array
$dataset = (new \Pair\Helpers\ChartJsDataset([34, 28, 41], 'Sales'))
->type('line')
->borderColor('#1f77b4')
->borderWidth(2)
->fill(false)
->labels(['Jan', 'Feb', 'Mar']);
$configDataset = $dataset->export();- Designed to compose cleanly with
ChartJshelper output.
See also: ChartJs.