From e3c055124b56372dab055056f508eb3c48694818 Mon Sep 17 00:00:00 2001 From: kashif shamaz Date: Sun, 21 Feb 2021 20:26:36 +0530 Subject: [PATCH] Added 'hidden: boolean' to ControllerDatasetOptions type and documented the field's usage in Dataset configuration section --- docs/docs/general/data-structures.md | 1 + types/index.esm.d.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/docs/general/data-structures.md b/docs/docs/general/data-structures.md index 17913bcbf0c..8bc65bf1801 100644 --- a/docs/docs/general/data-structures.md +++ b/docs/docs/general/data-structures.md @@ -71,6 +71,7 @@ In this mode, property name is used for `index` scale and value for `value` scal | `order` | `number` | The drawing order of dataset. Also affects order for stacking, tooltip and legend. | `stack` | `string` | The ID of the group to which this dataset belongs to (when stacked, each group will be a separate stack). | `parsing` | `boolean`\|`object` | How to parse the dataset. The parsing can be disabled by specifying parsing: false at chart options or dataset. If parsing is disabled, data must be sorted and in the formats the associated chart type and scales use internally. +| `hidden` | `boolean` | Configure the visibility of the dataset. Using `hidden: true` will hide the dataset from being rendered in the Chart. ### parsing diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 5a4802179c3..64449af8f93 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -87,6 +87,11 @@ export interface ControllerDatasetOptions extends ParsingOptions { * The ID of the group to which this dataset belongs to (when stacked, each group will be a separate stack). */ stack: string; + /** + * Configures the visibility state of the dataset. Set it to true, to hide the dataset from the chart. + * @default false + */ + hidden: boolean; } export interface BarControllerDatasetOptions