View as Markdown

API reference: @salmonui/charts/chart/bullet

BulletChartPropsinterface

import type { BulletChartProps } from '@salmonui/charts/chart/bullet';
interface BulletChartProps extends Pick<ChartProps, 'title' | 'subtitle' | 'description' | 'locale' | 'timeZone' | 'width' | 'height' | 'className' | 'style' | 'accessibleTable' | 'showDataTable' | 'animated' | 'onPointClick' | 'exportWriters'> {
    readonly data: readonly ChartDatum[];
    readonly valueField: string;
    readonly targetField?: string | readonly string[] | undefined;
    readonly categoryField?: string | undefined;
    readonly bands?: readonly BulletBand[] | undefined;
    readonly targetShapes?: readonly ('line' | 'circle' | 'cross')[] | undefined;
    readonly valueShape?: 'bar' | 'dot' | undefined;
    readonly orientation?: 'horizontal' | 'vertical' | undefined;
    readonly axisPosition?: 'start' | 'end' | undefined;
    readonly min?: number | undefined;
    readonly max?: number | undefined;
    readonly interval?: number | undefined;
    readonly minorTicks?: number | undefined;
    readonly format?: ChartFormat | undefined;
    readonly labelPosition?: 'inside' | 'outside' | undefined;
    readonly tickPosition?: 'inside' | 'outside' | undefined;
    readonly labels?: boolean | {
        readonly format?: ChartFormat | undefined;
    } | undefined;
    readonly tooltip?: ChartProps['tooltip'];
    readonly legend?: boolean | BulletLegendOptions | undefined;
    readonly valueColor?: string | undefined;
    readonly targetColor?: string | undefined;
    readonly name?: string | undefined;
    readonly onItemClick?: ChartProps['onPointClick'];
    readonly text?: Partial<BulletChartText> | undefined;
    readonly ref?: ChartProps['ref'];
}
BulletChartProps members (39, 14 inherited)
NameSignatureDescription
datareadonly data: readonly ChartDatum[];
valueFieldreadonly valueField: string;
targetFieldoptionalreadonly targetField?: string | readonly string[] | undefined;
categoryFieldoptionalreadonly categoryField?: string | undefined;
bandsoptionalreadonly bands?: readonly BulletBand[] | undefined;
targetShapesoptionalreadonly targetShapes?: readonly ('line' | 'circle' | 'cross')[] | undefined;
valueShapeoptionalreadonly valueShape?: 'bar' | 'dot' | undefined;

Feature glyph: a bar from zero, or a dot at the value.

orientationoptionalreadonly orientation?: 'horizontal' | 'vertical' | undefined;
axisPositionoptionalreadonly axisPosition?: 'start' | 'end' | undefined;
minoptionalreadonly min?: number | undefined;
maxoptionalreadonly max?: number | undefined;
intervaloptionalreadonly interval?: number | undefined;
minorTicksoptionalreadonly minorTicks?: number | undefined;
formatoptionalreadonly format?: ChartFormat | undefined;
labelPositionoptionalreadonly labelPosition?: 'inside' | 'outside' | undefined;
tickPositionoptionalreadonly tickPosition?: 'inside' | 'outside' | undefined;

Tick marks inside or outside the plot; default follows labelPosition.

labelsoptionalreadonly labels?: boolean | { readonly format?: ChartFormat | undefined; } | undefined;
tooltipoptionalreadonly tooltip?: ChartProps['tooltip'];
legendoptionalreadonly legend?: boolean | BulletLegendOptions | undefined;

Legend of the value, the targets and the bands. Default off.

valueColoroptionalreadonly valueColor?: string | undefined;
targetColoroptionalreadonly targetColor?: string | undefined;
nameoptionalreadonly name?: string | undefined;
onItemClickoptionalreadonly onItemClick?: ChartProps['onPointClick'];
textoptionalreadonly text?: Partial<BulletChartText> | undefined;
refoptionalreadonly ref?: ChartProps['ref'];
titleoptionalinheritedtitle?: string;
subtitleoptionalinheritedsubtitle?: string;
descriptionoptionalinheriteddescription?: string;
onPointClickoptionalinheritedonPointClick?: ((ctx: ChartPointContext, event: MouseEvent<Element, MouseEvent>) => void);
accessibleTableoptionalinheritedaccessibleTable?: boolean;
showDataTableoptionalinheritedshowDataTable?: boolean;
animatedoptionalinheritedanimated?: boolean;
localeoptionalinheritedlocale?: string;
timeZoneoptionalinheritedtimeZone?: string;
widthoptionalinheritedwidth?: number;
heightoptionalinheritedheight?: number;

Drawing height in px (default 300).

classNameoptionalinheritedclassName?: string;
styleoptionalinheritedstyle?: CSSProperties;
exportWritersoptionalinheritedexportWriters?: VizExportWriters;

Loaders of the PDF and XLSX writers: dynamic imports of

@salmonui

/export graphics and xlsx subpaths.