Manta Developers
GitHub
Menu

@manta-eu/react/replay-chart

Reference for @manta-eu/react/replay-chart as it is on main.

Type Aliases

ReplayChartLabels

ReplayChartLabels = object

Properties

ahead

ahead: string

expected

expected: string

moments

moments: string

pause

pause: string

play

play: string

playAgain

playAgain: string

playhead

playhead: string

reached

reached: string

today

today: string


ReplayChartMoment

ReplayChartMoment = object

Properties

id?

optional id?: string

label

label: string

x

x: number


ReplayChartPoint

ReplayChartPoint = object

Properties

baseline?

optional baseline?: number | null

The same measure without the plans; leave it out where there is none.

value

value: number

x

x: number

A time on a continuous scale, such as a timestamp; points come in time order.


ReplayChartProps

ReplayChartProps = object

Properties

autoPlay?

optional autoPlay?: boolean

Plays once the first time the chart is in view; never under reduced motion.

baselineLabel?

optional baselineLabel?: string

changeLabel?

optional changeLabel?: string

Follows the signed gap to the baseline: “+$2,664 with the plans”.

className?

optional className?: string

data

data: ReplayChartPoint[]

duration?

optional duration?: number

Seconds a play from the start to the end takes.

expectedLabel?

optional expectedLabel?: string

formatDetail?

optional formatDetail?: (value) => string

Formats the readout’s and the hover card’s figures.

Parameters
value

number

Returns

string

formatValue?

optional formatValue?: (value) => string

Formats axis ticks.

Parameters
value

number

Returns

string

formatX

formatX: (x) => string

Parameters
x

number

Returns

string

gainLabel?

optional gainLabel?: string

height?

optional height?: number

label

label: string

labels?

optional labels?: Partial<ReplayChartLabels>

moments?

optional moments?: ReplayChartMoment[]

Each shows once the playhead reaches it; choosing one moves the playhead there.

onMomentSelect?

optional onMomentSelect?: (moment) => void

Parameters
moment

ReplayChartMoment

Returns

void

seriesLabel?

optional seriesLabel?: string

today?

optional today?: number

The x of one of the points: the line is solid up to it and dotted after.

Functions

ReplayChart()

ReplayChart(props): Element

Parameters

props

ReplayChartProps

Returns

Element