View as Markdown

API reference: @salmonui/charts/pie-chart

FunnelChartPropsinterface

import type { FunnelChartProps } from '@salmonui/charts/pie-chart';
interface FunnelChartProps extends AccumulationBaseProps {
    readonly text?: Partial<FunnelChartText> | undefined;
    readonly shape?: 'funnel' | 'pyramid' | undefined;
    readonly neckWidth?: number | string | undefined;
    readonly neckHeight?: number | string | undefined;
    readonly gap?: number | undefined;
    readonly variant?: 'standard' | 'trapezoidal' | undefined;
    readonly mode?: 'linear' | 'area' | undefined;
    readonly labels?: boolean | {
        readonly position?: 'inside' | 'outside' | undefined;
    } | undefined;
}
FunnelChartProps members (46, 38 inherited)
NameSignatureDescription
textoptionalreadonly text?: Partial<FunnelChartText> | undefined;

Built-in text (over the nearest LocaleProvider's funnelChart entry).

shapeoptionalreadonly shape?: 'funnel' | 'pyramid' | undefined;
neckWidthoptionalreadonly neckWidth?: number | string | undefined;

Funnel neck size, px or a percent of the width / height. Defaults '20%'.

neckHeightoptionalreadonly neckHeight?: number | string | undefined;
gapoptionalreadonly gap?: number | undefined;

Gap between segments, px. Default 2 (10 with variant="trapezoidal").

variantoptionalreadonly variant?: 'standard' | 'trapezoidal' | undefined;

Funnel drawing: standard (default) is a cone with a neck; trapezoidal draws equal-height bars as wide as value / max, joined by translucent trapezoids, and ignores the neck. Funnel only.

modeoptionalreadonly mode?: 'linear' | 'area' | undefined;

Pyramid linear (height by value) or area (area by value).

labelsoptionalreadonly labels?: boolean | { readonly position?: 'inside' | 'outside' | undefined; } | undefined;

Segment labels: inside (default) or outside to the end side, or none.

dataoptionalinheriteddata?: readonly unknown[];

Records, or numbers (labels then default to "1", "2", ...).

valueFieldoptionalinheritedvalueField?: string;
labelFieldoptionalinheritedlabelField?: string;
colorFieldoptionalinheritedcolorField?: string;

Record field holding a data color (pointColorMapping).

paletteoptionalinheritedpalette?: readonly string[];

Data colors by point index; default the derived --salmon-chart-* palette.

patternsoptionalinheritedpatterns?: boolean;

Overlay one system fill pattern per palette slot (non-color encoding).

emptyPointsoptionalinheritedemptyPoints?: "average" | "drop" | "zero";
widthoptionalinheritedwidth?: number;
heightoptionalinheritedheight?: number;
titleoptionalinheritedtitle?: string;
subtitleoptionalinheritedsubtitle?: string;
descriptionoptionalinheriteddescription?: string;

Accessible description; default the automatic summary.

localeoptionalinheritedlocale?: string;
formatoptionalinheritedformat?: NumberFormatOptions | ((value: number) => string);
legendoptionalinheritedlegend?: boolean | AccumulationLegendOptions;
tooltipoptionalinheritedtooltip?: boolean | AccumulationTooltipOptions;
highlightoptionalinheritedhighlight?: boolean;

Dim the other points while one is hovered or focused. Default true.

selectionoptionalinheritedselection?: boolean | { readonly multiple?: boolean | undefined; };

Click and Enter select points.

hiddenPointsoptionalinheritedhiddenPoints?: readonly number[];
defaultHiddenPointsoptionalinheriteddefaultHiddenPoints?: readonly number[];
onHiddenPointsChangeoptionalinheritedonHiddenPointsChange?: ((hidden: readonly number[], event: AccumulationChangeEvent) => void);
selectedPointsoptionalinheritedselectedPoints?: readonly AccumulationPointRef[];
defaultSelectedPointsoptionalinheriteddefaultSelectedPoints?: readonly AccumulationPointRef[];
onSelectedPointsChangeoptionalinheritedonSelectedPointsChange?: ((selected: readonly AccumulationPointRef[], event: AccumulationChangeEvent) => void);
annotationsoptionalinheritedannotations?: readonly AccumulationAnnotation[];
getPointStyleoptionalinheritedgetPointStyle?: ((point: AccumulationPoint) => AccumulationPointStyle | undefined);
formatLabeloptionalinheritedformatLabel?: ((point: AccumulationPoint) => string);
onPointClickoptionalinheritedonPointClick?: ((point: AccumulationPoint, event: AccumulationChangeEvent) => void);
onPointHoveroptionalinheritedonPointHover?: ((point: AccumulationPoint | null) => void);
showDataTableoptionalinheritedshowDataTable?: boolean;

Visible accessible data table (showDataTable).

accessibleTableoptionalinheritedaccessibleTable?: boolean;

false leaves the visually hidden data table out.

renderEmptyoptionalinheritedrenderEmpty?: (() => ReactNode);
classNameoptionalinheritedclassName?: string;
styleoptionalinheritedstyle?: CSSProperties;
idoptionalinheritedid?: string;
refoptionalinheritedref?: Ref<VizInstance>;
onResizeoptionalinheritedonResize?: ((size: { readonly width: number; readonly height: number; }) => void);
animatedoptionalinheritedanimated?: boolean;

Entrance and update transitions, default true: client only (never in server markup), off under prefers-reduced-motion. The CSS is the opt-in @salmonui/charts/viz-animations.css.