View as Markdown

API reference: @salmonui/charts/gauge

GaugeAxiscomponent

import { GaugeAxis } from '@salmonui/charts/gauge';
function GaugeAxis(_props: GaugeAxis): null;

interface GaugeAxis {
    readonly id?: string | undefined;
    readonly min?: number | undefined;
    readonly max?: number | undefined;
    readonly startAngle?: number | undefined;
    readonly endAngle?: number | undefined;
    readonly direction?: GaugeDirection | undefined;
    readonly radius?: number | undefined;
    readonly reversed?: boolean | undefined;
    readonly position?: 'start' | 'end' | undefined;
    readonly edgeLabels?: 'shift' | 'hide' | undefined;
    readonly ticks?: GaugeTicks | undefined;
    readonly labels?: GaugeLabels | undefined;
    readonly ranges?: readonly GaugeRange[] | undefined;
    readonly annotations?: readonly GaugeAnnotation[] | undefined;
    readonly line?: boolean | undefined;
    readonly formatLabel?: ((value: number) => string) | undefined;
}

The JSX forms of axes and pointers (same fields as an entry). They render nothing: Gauge reads the props of its direct children, in order, so axis indexes count GaugeAxis children.