ProUnlock everything for $49.99 a year, or $79.99 once. See plans ›

Nexus UI

Empty Chart, animated React component

A chart with no data yet, drawn as a dashed placeholder line that breathes on the grid. Connect a source and the same line bends into the real numbers while the area fills in and the total counts up.

  • Pro
  • Dashboards
  • Hover
  • Spring
  • Glow

Taps when you connect a source and plays a soft finished chime when the numbers arrive and the line bends into place; hovering the chart is silent. Sound is off on this site until you switch it on.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Revenue, last 12 months
No data yet
Connect a source
Your numbers show up here in about a minute.

Props

PropTypeDefaultWhat it does
dataEMPTY_CHART_DATAOne value per point, oldest first, at least two. The total counts these up. Defaults to twelve months of revenue in thousands.
labelsEMPTY_CHART_MONTHSA label per point, used for the axis (every second one) and the hover readout.
sources["Payments", "Spreadsheet", "Database"]The sources offered while the chart is empty.
title"Revenue, last 12 months"Caption above the total.
prefix"$"Put before the total and the hover values.
suffix"k"Put after the total and the hover values.
onConnectundefinedCalled with the source name when one is connected. The autoplay demo never calls it.
onDisconnectundefinedCalled when Disconnect is pressed.
autoplayfalseConnects a source, reads a month and disconnects on a loop until someone touches it. Pauses off screen and never runs under reduced motion.
className""Extra classes for the card.
enableSoundtruePlays interface sounds on interaction. They follow the sound switch (setSoundsEnabled, on by default) and stay silent on hover. Autoplay makes the same sounds once the visitor has used the page. Pass false to silence this component.

Empty Chart questions

Does it make sound, and how do I turn it off?

Taps when you connect a source and plays a soft finished chime when the numbers arrive and the line bends into place; hovering the chart is silent. Sounds are synthesised with the Web Audio API, so there are no audio files, and they only play after a click or key press. Pass `enableSound={false}` to silence this component, or call `setSoundsEnabled(false)` from `@/lib/ui-sounds` to switch every sound off at once. The CLI installs `@/lib/ui-sounds` with the component.