Interface: Data
A single data row in long (tidy) format.
Each row represents one bar at a specific date. This is the primary data format used by the racing bar chart.
Example
const data: Data[] = [
{ date: '2017-01-01', name: 'Egypt', value: 96.44 },
{ date: '2017-01-01', name: 'Singapore', value: 5.61 },
];
See
https://racing-bars.hatemhosny.dev/documentation/data
Properties
color?
optionalcolor:string|HSLColor
A CSS color string or D3 HSL color to override the bar color.
Defined in
date
date:
string
A string representation of a valid date (preferably 'YYYY-MM-DD' format).
Defined in
group?
optionalgroup:string
A group name for categorising items. Has a one-to-many relationship with name (e.g. continent → countries).
Defined in
icon?
optionalicon:string
URL of an icon to display on the bar (e.g. country flag). Has a one-to-one relationship with name.
Defined in
lastValue?
optionallastValue:number
Internal use — the previous value before the current tick.
Defined in
name
name:
string
A string holding the name/bar label of each item (e.g. country name).
Defined in
rank?
optionalrank:number
Internal use — the rank position at this date.
Defined in
value
value:
number
The numeric value of the item at this date.