Chart style

Applies to every chart.

Palette

Theme

Appearance

Depth
Surface
Background

Reading & motion

Axis
Hover
Legend
Numbers
Loading
Empty
Using chart defaults
3,109npm
1stars

Charts

Every chart, by the job it does

Trends3

  • Area
  • Line
  • Combo

Comparison4

  • Bar
  • Horizontal bar
  • Slope
  • RangeNew

Part of a whole4

  • Radial
  • Treemap
  • Funnel
  • Sankey

KPIs3

  • Stat cards
  • Progress
  • Activity ring

Patterns4

  • Heatmap
  • Scatter
  • Radar
  • Box plotNew

Cool23

  • Chord loomNew
  • Rank ribbonsNew
  • Event helixNew
  • Contour islandsNew
  • Parallel ribbonsNew
  • Sunburst terracesNew
  • Cluster constellationNew
  • Ternary prismNew
  • Wind roseNew
  • Marimekko blocksNew
  • Intersection towersNew
  • Horizon foldsNew
  • Circle archipelagoNew
  • Helix ribbonsNew
  • Voxel cloudNew
  • Arc bridgesNew
  • TerrainNew
  • Hex cityNew
  • Voxel waffleNew
  • SkylineNew
  • Block cityNew
  • RidgelineNew
  • Spiral yearNew

Finance6

  • CandlestickNew
  • IndicatorsNew
  • PriceNew
  • DepthNew
  • Order bookNew
  • PortfolioNew

Ridgeline

Traffic by hour

55,93755,937
MonTueWedThuFriSatSun00:0003:0006:0009:0012:0015:0018:0021:00
Hover a ridge to read it · Nearer rows are stronger
Traffic by hour
ObservationValue
Mon · 00:0040
Mon · 01:0064
Mon · 02:0088
Mon · 03:0058
Mon · 04:0084
Mon · 05:0059
Mon · 06:00105
Mon · 07:00176
Mon · 08:00449
Mon · 09:00649
Mon · 10:00679
Mon · 11:00689
Mon · 12:00771
Mon · 13:00928
Mon · 14:00952
Mon · 15:00921
Mon · 16:00747
Mon · 17:00583
Mon · 18:00371
Mon · 19:00253
Mon · 20:00183
Mon · 21:00100
Mon · 22:0098
Mon · 23:0058
Tue · 00:0082
Tue · 01:0052
Tue · 02:0076
Tue · 03:0046
Tue · 04:0072
Tue · 05:0047
Tue · 06:0093
Tue · 07:00218
Tue · 08:00437
Tue · 09:00691
Tue · 10:00667
Tue · 11:00677
Tue · 12:00759
Tue · 13:00916
Tue · 14:00940
Tue · 15:00909
Tue · 16:00789
Tue · 17:00571
Tue · 18:00413
Tue · 19:00241
Tue · 20:00171
Tue · 21:0088
Tue · 22:0086
Tue · 23:0046
Wed · 00:0070
Wed · 01:0040
Wed · 02:0064
Wed · 03:0088
Wed · 04:0060
Wed · 05:0089
Wed · 06:0081
Wed · 07:00206
Wed · 08:00425
Wed · 09:00679
Wed · 10:00655
Wed · 11:00665
Wed · 12:00801
Wed · 13:00904
Wed · 14:00982
Wed · 15:00897
Wed · 16:00777
Wed · 17:00559
Wed · 18:00401
Wed · 19:00229
Wed · 20:00159
Wed · 21:00130
Wed · 22:0074
Wed · 23:0088
Thu · 00:0058
Thu · 01:0082
Thu · 02:0052
Thu · 03:0076
Thu · 04:0048
Thu · 05:0077
Thu · 06:0069
Thu · 07:00194
Thu · 08:00467
Thu · 09:00667
Thu · 10:00697
Thu · 11:00653
Thu · 12:00789
Thu · 13:00892
Thu · 14:00970
Thu · 15:00885
Thu · 16:00765
Thu · 17:00601
Thu · 18:00389
Thu · 19:00271
Thu · 20:00147
Thu · 21:00118
Thu · 22:0062
Thu · 23:0076
Fri · 00:0046
Fri · 01:0070
Fri · 02:0040
Fri · 03:0064
Fri · 04:0090
Fri · 05:0065
Fri · 06:00111
Fri · 07:00182
Fri · 08:00455
Fri · 09:00655
Fri · 10:00685
Fri · 11:00641
Fri · 12:00777
Fri · 13:00934
Fri · 14:00958
Fri · 15:00927
Fri · 16:00753
Fri · 17:00589
Fri · 18:00377
Fri · 19:00259
Fri · 20:00135
Fri · 21:00106
Fri · 22:00104
Fri · 23:0064
Sat · 00:0088
Sat · 01:0058
Sat · 02:0082
Sat · 03:0052
Sat · 04:0076
Sat · 05:0046
Sat · 06:0071
Sat · 07:0043
Sat · 08:0074
Sat · 09:00112
Sat · 10:00113
Sat · 11:00191
Sat · 12:00243
Sat · 13:00372
Sat · 14:00451
Sat · 15:00558
Sat · 16:00560
Sat · 17:00552
Sat · 18:00493
Sat · 19:00354
Sat · 20:00273
Sat · 21:00161
Sat · 22:00131
Sat · 23:0070
Sun · 00:0076
Sun · 01:0046
Sun · 02:0070
Sun · 03:0040
Sun · 04:0064
Sun · 05:0088
Sun · 06:0059
Sun · 07:0085
Sun · 08:0062
Sun · 09:00100
Sun · 10:00101
Sun · 11:00179
Sun · 12:00231
Sun · 13:00360
Sun · 14:00493
Sun · 15:00546
Sun · 16:00602
Sun · 17:00540
Sun · 18:00481
Sun · 19:00342
Sun · 20:00261
Sun · 21:00149
Sun · 22:00119
Sun · 23:00112
Default01 / 01

Usage

Import the component and the stylesheet once. See Getting started to install the package.

import { RidgelineCard } from '@lilt-ui/charts';
import '@lilt-ui/charts/styles.css';
<RidgelineCard title="Traffic by hour" data={weekdayTraffic} series="day" x="hour" value="visits" />

Omit title to leave out the visible title. Set header={false} to remove the whole header, and use aria-label to name a chart inside your own card. surface="ghost" controls only the visual frame. See Card composition.

Data

One row per series and x position. Ridges stack back to front in the order series first appear, and x positions keep their first-seen order. Every ridge shares one value scale so heights compare. Null draws on the baseline but reads as no data; duplicate pairs are rejected.

const weekdayTraffic = [
  { day: 'Mon', hour: '00:00', visits: 64 },
  { day: 'Mon', hour: '01:00', visits: 58 },
  // …one row per day and hour
];

Props

Every prop RidgelineCard accepts, in the order you are likely to reach for them.

PropTypeDescription
titlestringOptional visible title. Omit to render no title. Also supplies the accessible name unless aria-label is set.
headerbooleanDefaults to true. False removes the whole header: title, headline, delta and period controls, with no reserved space. Pass data directly when your app owns period selection.
aria-labelstringAccessible chart name, independent of the visible title. Falls back to title, then a generic chart name.
dataRow[]One row per observation. Omit when using ranges.
heightnumberMinimum plot height, default 300px. Dense data may expand within the scrollable viewport.
depthbooleanLit tiles, solid bars, or spheres. Data positions remain exact; loading keeps the same depth treatment.
colorstringOverride the palette with one CSS color.
aggregate'sum' | 'mean' | 'max'Resting headline summary; Strip defaults to mean, the others to sum.
headlinenumberOverride the resting headline.
deltanumberFractional change shown alongside the headline.
deltaTone'default' | 'inverse' | 'neutral'Use inverse when a decrease is good.
rangestringStatic period label.
ranges{ id, label, data, headline?, delta? }[]Period choices with their own data.
defaultRangestringInitial period id.
localestringLocale for numbers and dates; defaults to en-US.
formatValue(value: number) => stringCustom value formatter.
badgeReactNodeContent for the glass tab above the card.
classNamestringClass on the card frame.
styleCSSProperties | ChartStyleInline styles and scoped chart variables.
onSelectionChange(selection | null) => voidReports id, original row (or null for an absent day), value, and pinned state.
renderReadout(selection | null) => ReactNodeConsumer-owned readout, including when the header is hidden.
valueFormatIntl.NumberFormatOptionsFormats the headline, tiles, and axis, e.g. currency.
surface'elevated' | 'outline' | 'ghost'Card treatment. Ghost removes the visual frame only; header and legend are independent controls.
palette'iris' | 'cobalt' | 'emerald'Series colors. Iris by default; explicit series colors still win.
numberStyle'count' | 'pop' | 'slide' | 'roll' | 'flow' | 'scramble'How the headline animates when its value changes. Count (default) counts to the new value.
loadingbooleanShows a neutral loading skeleton, not data.
loadingStyle'shimmer' | 'draw' | 'breathe'Shimmer sweeps a highlight over still shapes; draw reveals them in order; breathe lets them settle. Follows the selected look, including depth, and respects reduced motion.
empty'dots' | 'shape' | ReactElement | nullWhat the card shows when the period has no data. Dots (default) gathers a quiet dot field around the message; shape lays the chart’s own outline behind it. Pass `<ChartEmpty>` with your own words, any element of your own, or null for nothing. Both looks stay still, so empty never reads as loading, and the headline reads a dash, never zero.
motion'auto' | 'none'None turns off decorative motion; reduced motion does this automatically.
seriestext key of RowOne ridge per value, back to front.
xtext, number, or date key of RowPosition along each ridge, in first-seen order.
valuenumeric key of RowRidge height and headline.
overlapnumberHow many rows the tallest peak rises over the ridges behind it, default 2.2.
domain[number, number]Fixed value domain that must contain every value. Defaults to zero through the largest.
onKeyDownKeyboardEventHandler<HTMLElement>Keyboard handler on the card frame. Chart inspection also has its own keyboard handling.