racing-bars
Modules
Interfaces
Type Aliases
Options
Ƭ Options: Partial
<Options
>
Defined in
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
Variables
defaultOptions
• Const
defaultOptions: Options
Defined in
lib/options/options.reducer.ts:6
Functions
generateId
▸ generateId(prefix?
, n?
): string
Parameters
Name | Type | Default value |
---|---|---|
prefix | string | 'racingbars' |
n | number | 8 |
Returns
string
Defined in
loadData
▸ loadData(URL
, type?
): Promise
<Data
[]> | Promise
<WideData
[]>
Parameters
Name | Type | Default value |
---|---|---|
URL | string | undefined |
type | "json" | "csv" | "tsv" | "xml" | 'json' |
Returns
Promise
<Data
[]> | Promise
<WideData
[]>
Defined in
race
▸ race(data
, container?
, options?
): Promise
<Race
>
Parameters
Name | Type |
---|---|
data | string | Data [] | Promise <Data []> | WideData [] | Promise <WideData []> |
container? | string | HTMLElement |
options | Partial <Options > |
Returns
Promise
<Race
>