Skip to main content

racing-bars

Modules

Interfaces

Type Aliases

Options

Ƭ Options: Partial<Options>

Defined in

index.ts:5


Props

Ƭ Props: Partial<Options & { callback: (racer: Race, data: Data[] | WideData[]) => void ; className: string ; data: Data[] | WideData[] ; dataType: "json" | "csv" | "tsv" | "xml" ; dataUrl: string ; elementId: string ; style: Record<string, string> }>

Type for component props. Extends [[Options]] Defines props passed to components (react/vue). See options documentations for the rest of props.

Defined in

shared/index.ts:39

Variables

defaultOptions

Const defaultOptions: Options

Defined in

lib/options/options.reducer.ts:6

Functions

generateId

generateId(prefix?, n?): string

Parameters

NameTypeDefault value
prefixstring'racingbars'
nnumber8

Returns

string

Defined in

lib/utils/utils.ts:87


loadData

loadData(URL, type?): Promise<Data[]> | Promise<WideData[]>

Parameters

NameTypeDefault value
URLstringundefined
type"json" | "csv" | "tsv" | "xml"'json'

Returns

Promise<Data[]> | Promise<WideData[]>

Defined in

lib/load-data.ts:4


race

race(data, container?, options?): Promise<Race>

Parameters

NameType
datastring | Data[] | Promise<Data[]> | WideData[] | Promise<WideData[]>
container?string | HTMLElement
optionsPartial<Options>

Returns

Promise<Race>

Defined in

lib/race.ts:12