Skip to content

Chart

<Chart scale={[0, 100]} orientation="horizontal">
  <Plot …>{Row}</Plot>
</Chart>
PropDefaultWhat it does
scale[0, 100]the range of values shown, [min, max]
orientation"horizontal""horizontal": bars run left to right. "vertical": bars run bottom to top.
ticksabout 5the axis lines: a list of values, a rough count, a function of [min, max] (such as every(10)), or false for no axis
formatthe numbera function that turns a tick’s value into its text
themerhp’scolors and font, see themes. A Chart’s theme wins over a <Theme> around it, key by key.
height240 (vertical)the plot’s height, in px. A vertical chart always has one; a horizontal chart with a height fits rows that have no thickness into it, and one without grows with its rows.
animateofftrue for the JS version; or { duration, ease, slide } with timings in ms. Plots inside take it too.
staticofffor data that doesn’t change: rows are drawn once and use much less memory. A change draws them again, without animation. See data.
class, stylethe chart’s own box: width, margin, background, border
refthe chart’s element

A Chart can hold several Plots (drawn over each other on the same scale), and a Scale. It also takes a <Show> or any Solid control flow around them.

Theme

<Theme value={{ series: ["#ff6b4a", "#ffd43b"], font: "Georgia, serif" }}>
  <Chart …>…</Chart>
</Theme>

<Theme> gives every Chart inside it a theme. Themes nest: an inner Theme changes only the keys it names.