Krizaka
Documentation
Components

Price ticker

A live auction's price: the current bid in large, the change since the opening and the number of bids, the bids as steps, the reserve as a line.

Web + MobileBetaCharts

Web and mobile — the same component for React and React Native. Beta: its API may still change in a minor version.

Why it is here. Orochia's live auction price (PS-C).

When to use

  • Orochia's auction room, on the web and in the app: the bids as they arrive.
  • Any price that moves by discrete steps: a bid, a quote, an offer.

When not to use

Installation

Install

npm install @krizaka/charts

Import

import { PriceTicker } from "@krizaka/charts/ticker";

Examples

Auction room

Eight bids in an Orochia auction, the reserve met.

Signed first take

$72.00current bid+$52.00 (+260%) since the opening · 8 bids

Line chart, 9 (6:00 PM – 6:33 PM). Price: from $20.00 to $72.00, lowest $20.00 (6:00 PM), highest $72.00 (6:33 PM), up 260%.

Signed first take — data
CategoryPrice
6:00 PM$20.00
6:02 PM$25.00
6:05 PM$30.00
6:11 PM$35.00
6:12 PM$42.00
6:20 PM$50.00
6:26 PM$55.00
6:31 PM$65.00
6:33 PM$72.00

No bid yet

The opening price, the reserve ahead.

Studio session, one hour

$40.00opening price, no bid yet

Line chart, 1. Price: from $40.00 to $40.00. Reserve price at $90.00.

Studio session, one hour — data
CategoryPrice
6:00 PM$40.00

Props

A live auction's price: the current bid, the change since the opening, the steps of the bids, the reserve.

PropTypeDefaultDescription
bidsrequiredreadonly Bid[]—The bids, in any order: when and how much (minor units).
currencyrequiredstring—The ISO 4217 currency.
openingrequirednumber—The opening price, in minor units.
titlerequiredstring—What the chart shows, in a few words: its accessible name, and its heading unless hideTitle.
brandBrandId—The brand whose palette the charts use. Without it, a chart follows a .brand-<id> ancestor, else Krizaka. Set it when the app loads a brand stylesheet on :root (@krizaka/tokens/brands/orazaka.css).
classNamestring—A class on the figure (layout: margins, grid placement).
dataTableboolean—The "Show data" button (the table is in the page for screen readers either way). Default true.
descriptionReactNode—A sentence under the title: the period, the unit, the source.
dotsboolean—A dot on every point (short series). Default false: the end of each line carries one.
emptyReactNode—What to show when there is nothing to draw (default: the empty label). An EmptyState of @krizaka /ui fits.
endLabelsboolean—Write the last value at the end of each line (up to three series). Default true.
errorReactNode—The data could not be loaded: true says the default words, a node says yours (a retry button…).
exportableboolean | readonly ExportFormat[]—Export buttons: true for PNG, SVG and CSV, or the formats you want.
heightnumber—The height of the plot in pixels. Default 280 (a sparkline: 32).
hideTitleboolean—Visually hide the title (it stays the chart's accessible name): a card that already has its heading.
idstring—The id of the figure.
labelsPartial<TickerLabels>—The words, passed translated; English by default.
legendboolean—Show the legend (from two series). Default true.
livebooleantrueStreaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.
loadingboolean—The data is on its way: a skeleton of the chart, announced once.
localeLocale—The locale of every figure and date ("fr-FR"). Default "en-US".
markersreadonly Marker[]—Vertical markers at a category: a launch, an incident.
onSelect((datum: Point, index: number) => void)—Called with the row when a point or a bar is clicked (or Enter is pressed on it).
openedAtstring | Date—When the auction opened: the first point of the line.
reservenumber—The reserve price, drawn as a line until it is met.
styleCSSProperties—Inline style on the figure (layout only: colours come from the tokens).
summary"hidden" | "visible"—The written summary: read by screen readers only ("hidden", default), or shown under the chart ("visible").
summaryTextstring—Your own summary instead of the generated one (still read first by screen readers).
timeFormatCategoryFormattimeHow the times are written. Default "time" (14:30); "datetime" for auctions over several days.
xLabelstring—The header of the categories in the data table (Month).
zeroboolean—Start the value axis at zero. Default: true for bars and areas; for lines, unless the values sit far from zero.

Accessibility

  • The current price and the change are written above the plot; the arrow is decorative.
  • The reserve is drawn and named until it is met.

Keyboard

KeysAction
TabMoves the focus to the plot, then to the data and export buttons.
Arrow keysWalk the bids: each price and time is announced.

Best practices

  • Pass every bid with its time; the opening price and time give the first step.
  • Keep live on (the default) while the auction runs: no entrance, no announcement of every bid.
  • Announce a new bid in the app's own live region (who outbid whom): the chart does not.

Generated from the code of @krizaka/ui 3.6.0: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page