Docs Charts Interval & uncertainty

ConfidenceBandChart

React example follows below.
ts
import { useState } from "react";
import { ConfidenceBandChart } from "@grassroot/charts-react";
import { VariantToggle } from "./VariantToggle";
const bands = [
{
id: "apr-01",
x: "1 Apr",
y: 38.4,
low: 36.9,
high: 39.8,
},
{
id: "apr-08",
x: "8 Apr",
y: 39.1,
low: 37.5,
high: 40.6,
},
{
id: "apr-15",
x: "15 Apr",
y: 39.8,
low: 38.1,
high: 41.4,
},
{
id: "apr-22",
x: "22 Apr",
y: 40.2,
low: 38.4,
high: 41.9,
},
{
id: "apr-29",
x: "29 Apr",
y: 40.9,
low: 39,
high: 42.7,
},
{
id: "may-06",
x: "6 May",
y: 41.4,
low: 39.5,
high: 43.2,
},
{
id: "may-13",
x: "13 May",
y: 41.1,
low: 39.2,
high: 43,
},
{
id: "may-20",
x: "20 May",
y: 41.8,
low: 39.8,
high: 43.7,
},
{
id: "may-27",
x: "27 May",
y: 42.6,
low: 40.6,
high: 44.5,
},
{
id: "jun-03",
x: "3 Jun",
y: 42.9,
low: 40.8,
high: 44.9,
},
{
id: "jun-10",
x: "10 Jun",
y: 43.4,
low: 41.3,
high: 45.4,
},
{
id: "jun-17",
x: "17 Jun",
y: 43.8,
low: 41.6,
high: 45.9,
},
{
id: "jun-24",
x: "24 Jun",
y: 43.2,
low: 41,
high: 45.4,
},
{
id: "jul-01",
x: "1 Jul",
y: 44.1,
low: 41.8,
high: 46.3,
},
{
id: "jul-08",
x: "8 Jul",
y: 44.8,
low: 42.4,
high: 47.1,
},
{
id: "jul-15",
x: "15 Jul",
y: 45.3,
low: 42.8,
high: 47.7,
},
{
id: "jul-22",
x: "22 Jul",
y: 45,
low: 42.5,
high: 47.5,
},
{
id: "jul-29",
x: "29 Jul",
y: 46.2,
low: 43.6,
high: 48.7,
},
{
id: "aug-05",
x: "5 Aug",
y: 46.9,
low: 44.1,
high: 49.6,
},
{
id: "aug-12",
x: "12 Aug",
y: 47.6,
low: 44.6,
high: 50.4,
},
];
export default function ConfidenceBandChartDemo() {
const [fit, setFit] = useState<"none" | "linear">("none");
return (
<div>
<VariantToggle
label="Fit"
options={[
{ value: "none" as const, label: "Observed" },
{ value: "linear" as const, label: "Linear" },
]}
value={fit}
onChange={setFit}
/>
<ConfidenceBandChart
data={bands}
fit={fit}
ariaLabel="Weekly fulfilled orders in thousands with a 95% confidence band from 1 April to 12 August 2026" />
</div>
);
}
ts
<script setup lang="ts">
import { ref } from "vue";
import { ConfidenceBandChart } from "@grassroot/charts-vue";
import VariantToggle from "./VariantToggle.vue";
const fit = ref<"none" | "linear">("none");
const fits = [
{ value: "none", label: "Observed" },
{ value: "linear", label: "Linear" },
];
const bands = [
{
id: "apr-01",
x: "1 Apr",
y: 38.4,
low: 36.9,
high: 39.8,
},
{
id: "apr-08",
x: "8 Apr",
y: 39.1,
low: 37.5,
high: 40.6,
},
{
id: "apr-15",
x: "15 Apr",
y: 39.8,
low: 38.1,
high: 41.4,
},
{
id: "apr-22",
x: "22 Apr",
y: 40.2,
low: 38.4,
high: 41.9,
},
{
id: "apr-29",
x: "29 Apr",
y: 40.9,
low: 39,
high: 42.7,
},
{
id: "may-06",
x: "6 May",
y: 41.4,
low: 39.5,
high: 43.2,
},
{
id: "may-13",
x: "13 May",
y: 41.1,
low: 39.2,
high: 43,
},
{
id: "may-20",
x: "20 May",
y: 41.8,
low: 39.8,
high: 43.7,
},
{
id: "may-27",
x: "27 May",
y: 42.6,
low: 40.6,
high: 44.5,
},
{
id: "jun-03",
x: "3 Jun",
y: 42.9,
low: 40.8,
high: 44.9,
},
{
id: "jun-10",
x: "10 Jun",
y: 43.4,
low: 41.3,
high: 45.4,
},
{
id: "jun-17",
x: "17 Jun",
y: 43.8,
low: 41.6,
high: 45.9,
},
{
id: "jun-24",
x: "24 Jun",
y: 43.2,
low: 41,
high: 45.4,
},
{
id: "jul-01",
x: "1 Jul",
y: 44.1,
low: 41.8,
high: 46.3,
},
{
id: "jul-08",
x: "8 Jul",
y: 44.8,
low: 42.4,
high: 47.1,
},
{
id: "jul-15",
x: "15 Jul",
y: 45.3,
low: 42.8,
high: 47.7,
},
{
id: "jul-22",
x: "22 Jul",
y: 45,
low: 42.5,
high: 47.5,
},
{
id: "jul-29",
x: "29 Jul",
y: 46.2,
low: 43.6,
high: 48.7,
},
{
id: "aug-05",
x: "5 Aug",
y: 46.9,
low: 44.1,
high: 49.6,
},
{
id: "aug-12",
x: "12 Aug",
y: 47.6,
low: 44.6,
high: 50.4,
},
];
</script>
<template>
<div>
<VariantToggle v-model="fit" label="Fit" :options="fits" />
<ConfidenceBandChart
:data="bands"
:fit="fit"
aria-label="Weekly fulfilled orders in thousands with a 95% confidence band from 1 April to 12 August 2026" />
</div>
</template>
ts
import { ChangeDetectionStrategy, Component, signal } from "@angular/core";
import { GrassrootConfidenceBandChart } from "@grassroot/charts-angular";
import { VariantToggleComponent } from "./VariantToggle.component";
@Component({
selector: "app-confidence-band-chart-chart-demo",
standalone: true,
imports: [GrassrootConfidenceBandChart, VariantToggleComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `<app-variant-toggle
label="Fit"
[options]="fits"
[value]="fit()"
(valueChange)="setFit($event)"
/><grassroot-confidence-band-chart
[fit]="fit()"
[data]="bands"
ariaLabel="Weekly fulfilled orders in thousands with a 95% confidence band from 1 April to 12 August 2026"
/>`,
})
export class ConfidenceBandChartDemoComponent {
readonly fit = signal<"none" | "linear">("none");
readonly fits = [
{ value: "none", label: "Observed" },
{ value: "linear", label: "Linear" },
] as const;
readonly bands = [
{
id: "apr-01",
x: "1 Apr",
y: 38.4,
low: 36.9,
high: 39.8,
},
{
id: "apr-08",
x: "8 Apr",
y: 39.1,
low: 37.5,
high: 40.6,
},
{
id: "apr-15",
x: "15 Apr",
y: 39.8,
low: 38.1,
high: 41.4,
},
{
id: "apr-22",
x: "22 Apr",
y: 40.2,
low: 38.4,
high: 41.9,
},
{
id: "apr-29",
x: "29 Apr",
y: 40.9,
low: 39,
high: 42.7,
},
{
id: "may-06",
x: "6 May",
y: 41.4,
low: 39.5,
high: 43.2,
},
{
id: "may-13",
x: "13 May",
y: 41.1,
low: 39.2,
high: 43,
},
{
id: "may-20",
x: "20 May",
y: 41.8,
low: 39.8,
high: 43.7,
},
{
id: "may-27",
x: "27 May",
y: 42.6,
low: 40.6,
high: 44.5,
},
{
id: "jun-03",
x: "3 Jun",
y: 42.9,
low: 40.8,
high: 44.9,
},
{
id: "jun-10",
x: "10 Jun",
y: 43.4,
low: 41.3,
high: 45.4,
},
{
id: "jun-17",
x: "17 Jun",
y: 43.8,
low: 41.6,
high: 45.9,
},
{
id: "jun-24",
x: "24 Jun",
y: 43.2,
low: 41,
high: 45.4,
},
{
id: "jul-01",
x: "1 Jul",
y: 44.1,
low: 41.8,
high: 46.3,
},
{
id: "jul-08",
x: "8 Jul",
y: 44.8,
low: 42.4,
high: 47.1,
},
{
id: "jul-15",
x: "15 Jul",
y: 45.3,
low: 42.8,
high: 47.7,
},
{
id: "jul-22",
x: "22 Jul",
y: 45,
low: 42.5,
high: 47.5,
},
{
id: "jul-29",
x: "29 Jul",
y: 46.2,
low: 43.6,
high: 48.7,
},
{
id: "aug-05",
x: "5 Aug",
y: 46.9,
low: 44.1,
high: 49.6,
},
{
id: "aug-12",
x: "12 Aug",
y: 47.6,
low: 44.6,
high: 50.4,
},
];
setFit(value: string): void {
if (value === "none" || value === "linear") this.fit.set(value);
}
}
export default ConfidenceBandChartDemoComponent;
ts
<script lang="ts">
import { ConfidenceBandChart } from "@grassroot/charts-svelte";
import VariantToggle from "./VariantToggle.svelte";
let fit = $state<"none" | "linear">("none");
const fits = [
{ value: "none", label: "Observed" },
{ value: "linear", label: "Linear" },
];
const bands = [
{
id: "apr-01",
x: "1 Apr",
y: 38.4,
low: 36.9,
high: 39.8,
},
{
id: "apr-08",
x: "8 Apr",
y: 39.1,
low: 37.5,
high: 40.6,
},
{
id: "apr-15",
x: "15 Apr",
y: 39.8,
low: 38.1,
high: 41.4,
},
{
id: "apr-22",
x: "22 Apr",
y: 40.2,
low: 38.4,
high: 41.9,
},
{
id: "apr-29",
x: "29 Apr",
y: 40.9,
low: 39,
high: 42.7,
},
{
id: "may-06",
x: "6 May",
y: 41.4,
low: 39.5,
high: 43.2,
},
{
id: "may-13",
x: "13 May",
y: 41.1,
low: 39.2,
high: 43,
},
{
id: "may-20",
x: "20 May",
y: 41.8,
low: 39.8,
high: 43.7,
},
{
id: "may-27",
x: "27 May",
y: 42.6,
low: 40.6,
high: 44.5,
},
{
id: "jun-03",
x: "3 Jun",
y: 42.9,
low: 40.8,
high: 44.9,
},
{
id: "jun-10",
x: "10 Jun",
y: 43.4,
low: 41.3,
high: 45.4,
},
{
id: "jun-17",
x: "17 Jun",
y: 43.8,
low: 41.6,
high: 45.9,
},
{
id: "jun-24",
x: "24 Jun",
y: 43.2,
low: 41,
high: 45.4,
},
{
id: "jul-01",
x: "1 Jul",
y: 44.1,
low: 41.8,
high: 46.3,
},
{
id: "jul-08",
x: "8 Jul",
y: 44.8,
low: 42.4,
high: 47.1,
},
{
id: "jul-15",
x: "15 Jul",
y: 45.3,
low: 42.8,
high: 47.7,
},
{
id: "jul-22",
x: "22 Jul",
y: 45,
low: 42.5,
high: 47.5,
},
{
id: "jul-29",
x: "29 Jul",
y: 46.2,
low: 43.6,
high: 48.7,
},
{
id: "aug-05",
x: "5 Aug",
y: 46.9,
low: 44.1,
high: 49.6,
},
{
id: "aug-12",
x: "12 Aug",
y: 47.6,
low: 44.6,
high: 50.4,
},
];
</script>
<div>
<VariantToggle
label="Fit"
options={fits}
value={fit}
onchange={(value) => (fit = value as typeof fit)}
/>
<ConfidenceBandChart
{fit}
data={bands}
ariaLabel="Weekly fulfilled orders in thousands with a 95% confidence band from 1 April to 12 August 2026" />
</div>
ts
/** @jsxImportSource solid-js */
import { createSignal } from "solid-js";
import { ConfidenceBandChart } from "@grassroot/charts-solid";
import { VariantToggle } from "./VariantToggle";
const bands = [
{
id: "apr-01",
x: "1 Apr",
y: 38.4,
low: 36.9,
high: 39.8,
},
{
id: "apr-08",
x: "8 Apr",
y: 39.1,
low: 37.5,
high: 40.6,
},
{
id: "apr-15",
x: "15 Apr",
y: 39.8,
low: 38.1,
high: 41.4,
},
{
id: "apr-22",
x: "22 Apr",
y: 40.2,
low: 38.4,
high: 41.9,
},
{
id: "apr-29",
x: "29 Apr",
y: 40.9,
low: 39,
high: 42.7,
},
{
id: "may-06",
x: "6 May",
y: 41.4,
low: 39.5,
high: 43.2,
},
{
id: "may-13",
x: "13 May",
y: 41.1,
low: 39.2,
high: 43,
},
{
id: "may-20",
x: "20 May",
y: 41.8,
low: 39.8,
high: 43.7,
},
{
id: "may-27",
x: "27 May",
y: 42.6,
low: 40.6,
high: 44.5,
},
{
id: "jun-03",
x: "3 Jun",
y: 42.9,
low: 40.8,
high: 44.9,
},
{
id: "jun-10",
x: "10 Jun",
y: 43.4,
low: 41.3,
high: 45.4,
},
{
id: "jun-17",
x: "17 Jun",
y: 43.8,
low: 41.6,
high: 45.9,
},
{
id: "jun-24",
x: "24 Jun",
y: 43.2,
low: 41,
high: 45.4,
},
{
id: "jul-01",
x: "1 Jul",
y: 44.1,
low: 41.8,
high: 46.3,
},
{
id: "jul-08",
x: "8 Jul",
y: 44.8,
low: 42.4,
high: 47.1,
},
{
id: "jul-15",
x: "15 Jul",
y: 45.3,
low: 42.8,
high: 47.7,
},
{
id: "jul-22",
x: "22 Jul",
y: 45,
low: 42.5,
high: 47.5,
},
{
id: "jul-29",
x: "29 Jul",
y: 46.2,
low: 43.6,
high: 48.7,
},
{
id: "aug-05",
x: "5 Aug",
y: 46.9,
low: 44.1,
high: 49.6,
},
{
id: "aug-12",
x: "12 Aug",
y: 47.6,
low: 44.6,
high: 50.4,
},
];
export default function ConfidenceBandChartDemo() {
const [fit, setFit] = createSignal<"none" | "linear">("none");
const fits = [
{ value: "none", label: "Observed" },
{ value: "linear", label: "Linear" },
];
return (
<div>
<VariantToggle
label="Fit"
options={fits}
value={fit}
onChange={(value) => setFit(value as "none" | "linear")}
/>
<ConfidenceBandChart
data={bands}
fit={fit()}
ariaLabel="Weekly fulfilled orders in thousands with a 95% confidence band from 1 April to 12 August 2026" />
</div>
);
}

Installation

API Reference

Import

import { useState } from "react";
import { ConfidenceBandChart } from "@grassroot/charts-react";
import { VariantToggle } from "./VariantToggle";

Props

Prop
Type
Default
Requirement
Description
data
readonly BandDatum[]
—
required
—
fit
"none" | "linear" | undefined
—
optional
—
legend
boolean | import("@grassroot/chart-spec").LegendConfig | undefined
—
optional
—
tooltip
boolean | import("./base").ExpandedChartTooltipConfig<unknown> | undefined
—
optional
—
animation
boolean | import("./base").ExpandedChartAnimationConfig | undefined
—
optional
—
onHiddenSeriesChange
((ids: readonly string[]) => void) | undefined
—
optional
—
onActiveDatumChange
((id: string | null) => void) | undefined
—
optional
—
renderer
ChartRenderer | undefined
—
optional
—
className
string | undefined
—
optional
—
theme
import("@grassroot/theme").PartialChartTheme | undefined
—
optional
—
title
string | undefined
—
optional
—
description
string | undefined
—
optional
—
ariaLabel
string | undefined
—
optional
—
keyboardNavigation
boolean | undefined
—
optional
—
Prop
data
Type
readonly BandDatum[]
Default
—
Requirement
required
Description
—
Prop
fit
Type
"none" | "linear" | undefined
Default
—
Requirement
optional
Description
—
Prop
legend
Type
boolean | import("@grassroot/chart-spec").LegendConfig | undefined
Default
—
Requirement
optional
Description
—
Prop
tooltip
Type
boolean | import("./base").ExpandedChartTooltipConfig<unknown> | undefined
Default
—
Requirement
optional
Description
—
Prop
animation
Type
boolean | import("./base").ExpandedChartAnimationConfig | undefined
Default
—
Requirement
optional
Description
—
Prop
onHiddenSeriesChange
Type
((ids: readonly string[]) => void) | undefined
Default
—
Requirement
optional
Description
—
Prop
onActiveDatumChange
Type
((id: string | null) => void) | undefined
Default
—
Requirement
optional
Description
—
Prop
renderer
Type
ChartRenderer | undefined
Default
—
Requirement
optional
Description
—
Prop
className
Type
string | undefined
Default
—
Requirement
optional
Description
—
Prop
theme
Type
import("@grassroot/theme").PartialChartTheme | undefined
Default
—
Requirement
optional
Description
—
Prop
title
Type
string | undefined
Default
—
Requirement
optional
Description
—
Prop
description
Type
string | undefined
Default
—
Requirement
optional
Description
—
Prop
ariaLabel
Type
string | undefined
Default
—
Requirement
optional
Description
—
Prop
keyboardNavigation
Type
boolean | undefined
Default
—
Requirement
optional
Description
—
Prop
width
Type
number | undefined
Default
—
Requirement
optional
Description
—
Prop
height
Type
number | undefined
Default
—
Requirement
optional
Description
—
Prop
gpuBackend
Type
ChartGpuBackend | undefined
Default
—
Requirement
optional
Description
—
Prop
rendererStrategy
Type
Partial<import("@grassroot/core").ChartRendererStrategy> | undefined
Default
—
Requirement
optional
Description
—
Prop
renderPlanMode
Type
"svg" | "host" | undefined
Default
—
Requirement
optional
Description
—
Prop
showGrid
Type
boolean | undefined
Default
—
Requirement
optional
Description
—
Prop
interactive
Type
boolean | undefined
Default
—
Requirement
optional
Description
Gates every pointer/keyboard interaction the shell owns (hit-test on pointer move, focus-to-first, arrow navigation, Escape) and, with `keyboardNavigation`, whether the plot surface is focusable at all.
Prop
hiddenSeries
Type
readonly string[] | undefined
Default
—
Requirement
optional
Description
—
Prop
defaultHiddenSeries
Type
readonly string[] | undefined
Default
—
Requirement
optional
Description
—
Prop
activeDatum
Type
string | null | undefined
Default
—
Requirement
optional
Description
—
Prop
defaultActiveDatum
Type
string | null | undefined
Default
—
Requirement
optional
Description
Uncontrolled initial value for the `activeDatum`/`onActiveDatumChange` pair.
Prop
speed
Type
number | undefined
Default
—
Requirement
optional
Description
Playback-speed multiplier for entrance/ambient motion.
Prop
morphDurationMs
Type
number | undefined
Default
—
Requirement
optional
Description
How long a dataset change tweens, in milliseconds.
Prop
replayToken
Type
string | number | undefined
Default
—
Requirement
optional
Description
Changing this value replays the entrance animation.

Events

EventPayload
onHiddenSeriesChange((ids: readonly string[]) => void) | undefined
onActiveDatumChange((id: string | null) => void) | undefined

Content regions

  • children
  • dataSummary

Native attributes

Standard DOM and ARIA attributes not listed above spread onto the root element.

Import

import { ref } from "vue";
import { ConfidenceBandChart } from "@grassroot/charts-vue";
import VariantToggle from "./VariantToggle.vue";

Props

Prop
Type
Default
Requirement
className
string | undefined
—
optional
gpuBackend
"auto" | "webgpu" | "webgl2" | undefined
—
optional
width
number | undefined
—
optional
height
number | undefined
—
optional
renderer
ChartRenderer | undefined
—
optional
rendererStrategy
Partial<ChartRendererStrategy> | undefined
—
optional
renderPlanMode
"svg" | "host" | undefined
"host"
optional
showGrid
boolean | undefined
—
optional
legend
boolean | LegendConfig | undefined
false
optional
tooltip
boolean | TooltipBehaviorConfig | undefined
true
optional
animation
ChartAnimationInput | undefined
—
optional
interactive
boolean | undefined
true
optional
keyboardNavigation
boolean | undefined
true
optional
hiddenSeries
readonly string[] | undefined
—
optional
Prop
className
Type
string | undefined
Default
—
Requirement
optional
Prop
gpuBackend
Type
"auto" | "webgpu" | "webgl2" | undefined
Default
—
Requirement
optional
Prop
width
Type
number | undefined
Default
—
Requirement
optional
Prop
height
Type
number | undefined
Default
—
Requirement
optional
Prop
renderer
Type
ChartRenderer | undefined
Default
—
Requirement
optional
Prop
rendererStrategy
Type
Partial<ChartRendererStrategy> | undefined
Default
—
Requirement
optional
Prop
renderPlanMode
Type
"svg" | "host" | undefined
Default
"host"
Requirement
optional
Prop
showGrid
Type
boolean | undefined
Default
—
Requirement
optional
Prop
legend
Type
boolean | LegendConfig | undefined
Default
false
Requirement
optional
Prop
tooltip
Type
boolean | TooltipBehaviorConfig | undefined
Default
true
Requirement
optional
Prop
animation
Type
ChartAnimationInput | undefined
Default
—
Requirement
optional
Prop
interactive
Type
boolean | undefined
Default
true
Requirement
optional
Prop
keyboardNavigation
Type
boolean | undefined
Default
true
Requirement
optional
Prop
hiddenSeries
Type
readonly string[] | undefined
Default
—
Requirement
optional
Prop
defaultHiddenSeries
Type
readonly string[] | undefined
Default
() => []
Requirement
optional
Prop
activeDatum
Type
string | null | undefined
Default
—
Requirement
optional
Prop
defaultActiveDatum
Type
string | null | undefined
Default
—
Requirement
optional
Prop
speed
Type
number | undefined
Default
—
Requirement
optional
Prop
morphDurationMs
Type
number | undefined
Default
—
Requirement
optional
Prop
replayToken
Type
string | number | undefined
Default
—
Requirement
optional
Prop
theme
Type
PartialChartTheme | undefined
Default
—
Requirement
optional
Prop
title
Type
string | undefined
Default
—
Requirement
optional
Prop
description
Type
string | undefined
Default
—
Requirement
optional
Prop
ariaLabel
Type
string | undefined
Default
—
Requirement
optional
Prop
data
Type
readonly BandDatum[]
Default
—
Requirement
required
Prop
fit
Type
"none" | "linear" | undefined
Default
—
Requirement
optional

Events

EventPayload
hiddenSeriesChange[ids: readonly string[]]
activeDatumChange[id: string | null]

Content regions

  • dataSummary
  • default

Import

import { ChangeDetectionStrategy, Component, signal } from "@angular/core";
import { GrassrootConfidenceBandChart } from "@grassroot/charts-angular";
import { VariantToggleComponent } from "./VariantToggle.component";

Props

Prop
Type
Default
Requirement
renderer
ChartRenderer
—
optional
gpuBackend
ChartGpuBackend
—
optional
rendererStrategy
Partial<ChartRendererStrategy>
—
optional
renderPlanMode
"svg" | "host"
"host"
optional
ariaLabel
string
—
optional
title
string
—
optional
description
string
—
optional
theme
PartialChartTheme
—
optional
animation
ChartAnimationInput
—
optional
interactive
boolean
true
optional
keyboardNavigation
boolean
true
optional
tooltip
boolean | TooltipBehaviorConfig
true
optional
legend
boolean | LegendConfig
—
optional
hiddenSeries
readonly string[]
—
optional
Prop
renderer
Type
ChartRenderer
Default
—
Requirement
optional
Prop
gpuBackend
Type
ChartGpuBackend
Default
—
Requirement
optional
Prop
rendererStrategy
Type
Partial<ChartRendererStrategy>
Default
—
Requirement
optional
Prop
renderPlanMode
Type
"svg" | "host"
Default
"host"
Requirement
optional
Prop
ariaLabel
Type
string
Default
—
Requirement
optional
Prop
title
Type
string
Default
—
Requirement
optional
Prop
description
Type
string
Default
—
Requirement
optional
Prop
theme
Type
PartialChartTheme
Default
—
Requirement
optional
Prop
animation
Type
ChartAnimationInput
Default
—
Requirement
optional
Prop
interactive
Type
boolean
Default
true
Requirement
optional
Prop
keyboardNavigation
Type
boolean
Default
true
Requirement
optional
Prop
tooltip
Type
boolean | TooltipBehaviorConfig
Default
true
Requirement
optional
Prop
legend
Type
boolean | LegendConfig
Default
—
Requirement
optional
Prop
hiddenSeries
Type
readonly string[]
Default
—
Requirement
optional
Prop
defaultHiddenSeries
Type
readonly string[]
Default
[]
Requirement
optional
Prop
activeDatum
Type
string | null
Default
—
Requirement
optional
Prop
defaultActiveDatum
Type
string | null
Default
null
Requirement
optional
Prop
speed
Type
number
Default
—
Requirement
optional
Prop
morphDurationMs
Type
number
Default
—
Requirement
optional
Prop
replayToken
Type
string | number
Default
—
Requirement
optional
Prop
data
Type
readonly BandDatum[]
Default
—
Requirement
required
Prop
width
Type
number
Default
—
Requirement
optional
Prop
height
Type
number
Default
—
Requirement
optional
Prop
showGrid
Type
boolean
Default
—
Requirement
optional
Prop
className
Type
string
Default
—
Requirement
optional
Prop
fit
Type
ConfidenceBandChartOptions["fit"]
Default
—
Requirement
optional

Events

EventPayload
activeDatumChangestring | null
hiddenSeriesChangereadonly string[]

Content regions

  • dataSummary
  • default

Import

import { ConfidenceBandChart } from "@grassroot/charts-svelte";
import VariantToggle from "./VariantToggle.svelte";

Props

Prop
Type
Default
Requirement
data
readonly BandDatum[]
—
required
fit
ConfidenceBandChartOptions["fit"]
—
optional
onHiddenSeriesChange
(ids: readonly string[]) => void
—
optional
onActiveDatumChange
(id: string | null) => void
—
optional
class
string
—
optional
style
string
—
optional
width
number
—
optional
height
number
—
optional
renderer
ChartRenderer
—
optional
gpuBackend
ChartGpuBackend
—
optional
rendererStrategy
Partial<ChartRendererStrategy>
—
optional
renderPlanMode
"svg" | "host"
"host"
optional
showGrid
boolean
—
optional
legend
boolean | LegendConfig
false
optional
Prop
data
Type
readonly BandDatum[]
Default
—
Requirement
required
Prop
fit
Type
ConfidenceBandChartOptions["fit"]
Default
—
Requirement
optional
Prop
onHiddenSeriesChange
Type
(ids: readonly string[]) => void
Default
—
Requirement
optional
Prop
onActiveDatumChange
Type
(id: string | null) => void
Default
—
Requirement
optional
Prop
class
Type
string
Default
—
Requirement
optional
Prop
style
Type
string
Default
—
Requirement
optional
Prop
width
Type
number
Default
—
Requirement
optional
Prop
height
Type
number
Default
—
Requirement
optional
Prop
renderer
Type
ChartRenderer
Default
—
Requirement
optional
Prop
gpuBackend
Type
ChartGpuBackend
Default
—
Requirement
optional
Prop
rendererStrategy
Type
Partial<ChartRendererStrategy>
Default
—
Requirement
optional
Prop
renderPlanMode
Type
"svg" | "host"
Default
"host"
Requirement
optional
Prop
showGrid
Type
boolean
Default
—
Requirement
optional
Prop
legend
Type
boolean | LegendConfig
Default
false
Requirement
optional
Prop
tooltip
Type
boolean | TooltipBehaviorConfig
Default
true
Requirement
optional
Prop
animation
Type
ChartAnimationInput
Default
—
Requirement
optional
Prop
interactive
Type
boolean
Default
true
Requirement
optional
Prop
keyboardNavigation
Type
boolean
Default
true
Requirement
optional
Prop
hiddenSeries
Type
readonly string[]
Default
—
Requirement
optional
Prop
defaultHiddenSeries
Type
readonly string[]
Default
—
Requirement
optional
Prop
activeDatum
Type
string | null
Default
—
Requirement
optional
Prop
defaultActiveDatum
Type
string | null
Default
—
Requirement
optional
Prop
speed
Type
number
Default
—
Requirement
optional
Prop
morphDurationMs
Type
number
Default
—
Requirement
optional
Prop
replayToken
Type
string | number
Default
—
Requirement
optional
Prop
theme
Type
PartialChartTheme
Default
—
Requirement
optional
Prop
title
Type
string
Default
—
Requirement
optional
Prop
description
Type
string
Default
—
Requirement
optional
Prop
ariaLabel
Type
string
Default
—
Requirement
optional

Events

EventPayload
onHiddenSeriesChange(ids: readonly string[]) => void
onActiveDatumChange(id: string | null) => void

Content regions

  • children
  • dataSummary

Import

import { createSignal } from "solid-js";
import { ConfidenceBandChart } from "@grassroot/charts-solid";
import { VariantToggle } from "./VariantToggle";

Props

Prop
Type
Default
Requirement
data
readonly BandDatum[]
—
required
fit
ConfidenceBandChartOptions["fit"]
—
optional
onActiveDatumChange
(id: string | null) => void
—
optional
onHiddenSeriesChange
(ids: readonly string[]) => void
—
optional
class
string
—
optional
style
JSX.CSSProperties
—
optional
width
number
—
optional
height
number
—
optional
renderer
ChartRenderer
—
optional
gpuBackend
ChartGpuBackend
"auto"
optional
rendererStrategy
Partial<ChartRendererStrategy>
—
optional
renderPlanMode
"svg" | "host"
"host"
optional
showGrid
boolean
false
optional
legend
boolean | LegendConfig
—
optional
Prop
data
Type
readonly BandDatum[]
Default
—
Requirement
required
Prop
fit
Type
ConfidenceBandChartOptions["fit"]
Default
—
Requirement
optional
Prop
onActiveDatumChange
Type
(id: string | null) => void
Default
—
Requirement
optional
Prop
onHiddenSeriesChange
Type
(ids: readonly string[]) => void
Default
—
Requirement
optional
Prop
class
Type
string
Default
—
Requirement
optional
Prop
style
Type
JSX.CSSProperties
Default
—
Requirement
optional
Prop
width
Type
number
Default
—
Requirement
optional
Prop
height
Type
number
Default
—
Requirement
optional
Prop
renderer
Type
ChartRenderer
Default
—
Requirement
optional
Prop
gpuBackend
Type
ChartGpuBackend
Default
"auto"
Requirement
optional
Prop
rendererStrategy
Type
Partial<ChartRendererStrategy>
Default
—
Requirement
optional
Prop
renderPlanMode
Type
"svg" | "host"
Default
"host"
Requirement
optional
Prop
showGrid
Type
boolean
Default
false
Requirement
optional
Prop
legend
Type
boolean | LegendConfig
Default
—
Requirement
optional
Prop
tooltip
Type
boolean | TooltipBehaviorConfig
Default
—
Requirement
optional
Prop
animation
Type
ChartAnimationInput
Default
—
Requirement
optional
Prop
interactive
Type
boolean
Default
—
Requirement
optional
Prop
keyboardNavigation
Type
boolean
Default
—
Requirement
optional
Prop
hiddenSeries
Type
readonly string[]
Default
—
Requirement
optional
Prop
defaultHiddenSeries
Type
readonly string[]
Default
—
Requirement
optional
Prop
activeDatum
Type
string | null
Default
—
Requirement
optional
Prop
defaultActiveDatum
Type
string | null
Default
—
Requirement
optional
Prop
speed
Type
number
Default
—
Requirement
optional
Prop
morphDurationMs
Type
number
Default
—
Requirement
optional
Prop
replayToken
Type
string | number
Default
—
Requirement
optional
Prop
theme
Type
PartialChartTheme
Default
—
Requirement
optional
Prop
title
Type
string
Default
—
Requirement
optional
Prop
description
Type
string
Default
—
Requirement
optional
Prop
ariaLabel
Type
string
Default
—
Requirement
optional

Events

EventPayload
onActiveDatumChange(id: string | null) => void
onHiddenSeriesChange(ids: readonly string[]) => void

Content regions

  • children
  • dataSummary