API reference: @salmonui/charts/range-selector
RangeSelectorPropsinterface
import type { RangeSelectorProps } from '@salmonui/charts/range-selector';interface RangeSelectorProps extends Omit<RangeModelInput, 'min' | 'max'> {
readonly data?: readonly ChartDatum[] | undefined;
readonly series?: readonly RangeSeries[] | undefined;
readonly min?: number | Date | undefined;
readonly max?: number | Date | undefined;
readonly value?: RangeValue | undefined;
readonly defaultValue?: RangeValue | undefined;
readonly onValueChange?: ((value: RangeValue, event: RangeChangeEvent) => void) | undefined;
readonly onValueCommit?: ((value: RangeValue, event: RangeChangeEvent) => void) | undefined;
readonly snap?: boolean | 'interval' | undefined;
readonly tooltip?: boolean | 'always' | {
readonly format?: ChartFormat | ((value: number) => string);
} | undefined;
readonly periods?: readonly Period[] | undefined;
readonly periodSelector?: boolean | {
readonly position?: 'top' | 'bottom';
} | undefined;
readonly gridLines?: boolean | undefined;
readonly ticks?: boolean | undefined;
readonly name?: string | undefined;
readonly disabled?: boolean | undefined;
readonly 'aria-label'?: string | undefined;
readonly text?: Partial<{
readonly start: string;
readonly end: string;
readonly band: string;
readonly range: (from: string, to: string) => string;
}> | undefined;
readonly width?: number | undefined;
readonly height?: number | undefined;
readonly onResize?: ((size: {
readonly width: number;
readonly height: number;
}) => void) | undefined;
readonly animated?: boolean | undefined;
readonly className?: string | undefined;
readonly style?: CSSProperties | undefined;
readonly ref?: Ref<RangeSelectorApi> | undefined;
}
| Name | Signature | Description |
|---|---|---|
dataoptional | readonly data?: readonly ChartDatum[] | undefined; | |
seriesoptional | readonly series?: readonly RangeSeries[] | undefined; | |
minoptional | readonly min?: number | Date | undefined; | |
maxoptional | readonly max?: number | Date | undefined; | |
valueoptional | readonly value?: RangeValue | undefined; | |
defaultValueoptional | readonly defaultValue?: RangeValue | undefined; | |
onValueChangeoptional | readonly onValueChange?: ((value: RangeValue, event: RangeChangeEvent) => void) | undefined; | During a drag, once per frame; also after keyboard and period changes. |
onValueCommitoptional | readonly onValueCommit?: ((value: RangeValue, event: RangeChangeEvent) => void) | undefined; | On release (and after every keyboard step). |
snapoptional | readonly snap?: boolean | 'interval' | undefined; | |
tooltipoptional | readonly tooltip?: boolean | 'always' | {
readonly format?: ChartFormat | ((value: number) => string);
} | undefined; | |
periodsoptional | readonly periods?: readonly Period[] | undefined; | |
periodSelectoroptional | readonly periodSelector?: boolean | {
readonly position?: 'top' | 'bottom';
} | undefined; | |
gridLinesoptional | readonly gridLines?: boolean | undefined; | |
ticksoptional | readonly ticks?: boolean | undefined; | |
nameoptional | readonly name?: string | undefined; | |
disabledoptional | readonly disabled?: boolean | undefined; | |
aria-labeloptional | readonly 'aria-label'?: string | undefined; | |
textoptional | readonly text?: Partial<{
readonly start: string;
readonly end: string;
readonly band: string;
readonly range: (from: string, to: string) => string;
}> | undefined; | |
widthoptional | readonly width?: number | undefined; | |
heightoptional | readonly height?: number | undefined; | Drawing height in px. Without it the height comes from CSS: the surface fills a root whose height CSS fixes, else 80 px. |
onResizeoptional | readonly onResize?: ((size: {
readonly width: number;
readonly height: number;
}) => void) | undefined; | Called after a measured size change. |
animatedoptional | readonly animated?: boolean | undefined; | Entrance and update transitions ( |
classNameoptional | readonly className?: string | undefined; | |
styleoptional | readonly style?: CSSProperties | undefined; | |
refoptional | readonly ref?: Ref<RangeSelectorApi> | undefined; | |
xFieldoptionalinherited | xField?: string; | |
yFieldoptionalinherited | yField?: string; | |
scaleoptionalinherited | scale?: "linear" | "log" | "time"; | |
intervaloptionalinherited | interval?: number | TimeInterval; | |
baseoptionalinherited | base?: number; | |
formatoptionalinherited | format?: ChartFormat; | |
formatLabeloptionalinherited | formatLabel?: ((value: number) => string); | |
labelPositionoptionalinherited | labelPosition?: "inside" | "outside"; | |
labelOverlapoptionalinherited | labelOverlap?: "hide" | "none" | "rotate45" | "rotate90" | "stagger" | "trim" | "wrap"; | |
groupLabelsoptionalinherited | groupLabels?: { readonly unit: TimeUnit; readonly align?: "center" | "start" | undefined; readonly format?: ChartFormat | undefined; }; | |
localeoptionalinherited | locale?: string; | |
timeZoneoptionalinherited | timeZone?: string; |