From 60e30ed9656783227937cf92e95e3f0efbfe7396 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Tue, 27 May 2025 15:27:42 +0100 Subject: [PATCH] Update 03-charts.md --- packages/widgets/docs/03-charts.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/widgets/docs/03-charts.md b/packages/widgets/docs/03-charts.md index 95043133fa..c0f24c0435 100644 --- a/packages/widgets/docs/03-charts.md +++ b/packages/widgets/docs/03-charts.md @@ -182,14 +182,6 @@ You may place a maximum height on the chart to ensure that it doesn't get too bi protected ?string $maxHeight = '300px'; ``` -## Making the chart collapsible - -You may enable the chart to be collapsible by setting the `$isCollapsible` property: - -```php -protected ?bool $isCollapsible = true; -``` - ## Setting chart configuration options You may specify an `$options` variable on the chart class to control the many configuration options that the Chart.js library provides. For instance, you could turn off the [legend](https://www.chartjs.org/docs/latest/configuration/legend.html) for a line chart: @@ -261,6 +253,14 @@ To disable this behavior, you may override the `$isLazy` property on the widget protected static bool $isLazy = true; ``` +## Making the chart collapsible + +You may allow the chart to be collapsible by setting the `$isCollapsible` property on the widget class to be `true`: + +```php +protected bool $isCollapsible = true; +``` + ## Using custom Chart.js plugins Chart.js offers a powerful plugin system that allows you to extend its functionality and create custom chart behaviors. This guide details how to use them in a chart widget.