Skip to content
peakcharts

Styles

One prop switches how a chart is drawn. Data, axes and tables are identical across styles.

tsx
<BarChart title="Revenue" data={data} variant="flat" />
<BarChart title="Revenue" data={data} variant="pixel" />
<BarChart title="Revenue" data={data} variant="3d" />
Revenue by month
Revenue by monthClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.021426384JanFebMarAprMayJunJan: 32Feb: 46Mar: 63Apr: 58May: 71Jun: 84
Click a mark to pin its value
View data
Revenue by month
LabelValue
Jan32
Feb46
Mar63
Apr58
May71
Jun84
variant="flat"
Revenue by month
Revenue by monthClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.021426384JanFebMarAprMayJunJan: 32Feb: 46Mar: 63Apr: 58May: 71Jun: 84
Click a mark to pin its value
View data
Revenue by month
LabelValue
Jan32
Feb46
Mar63
Apr58
May71
Jun84
variant="pixel"
Revenue by month
Revenue by monthClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.021426384JanFebMarAprMayJunJan: 32Feb: 46Mar: 63Apr: 58May: 71Jun: 84
Click a mark to pin its value
View data
Revenue by month
LabelValue
Jan32
Feb46
Mar63
Apr58
May71
Jun84
variant="3d"
VariantCharacter
flatThe default and the clearest choice for precise comparisons.
pixelSquare markers and a pixel-grid mask on marks, with smooth text.
3dA shallow SVG extrusion. It is a depth treatment, not a WebGL scene, and the data plane never rotates.