Glow Chart
Line, area and bar charts with glow, crosshair tooltips and a Sparkline.
Unique visitors
49,667
+13.7%docs.halcyon.dev · last 30 days vs the 30 days before
| Date | This period | Previous 30 days |
|---|---|---|
| Fri, Sep 11 | 1,610 | 1,563 |
| Sat, Sep 12 | 966 | 1,429 |
| Sun, Sep 13 | 1,187 | 1,337 |
| Mon, Sep 14 | 1,759 | 1,016 |
| Tue, Sep 15 | 1,861 | 1,111 |
| Wed, Sep 16 | 1,839 | 1,452 |
| Thu, Sep 17 | 1,704 | 1,847 |
| Fri, Sep 18 | 1,665 | 1,543 |
| Sat, Sep 19 | 1,002 | 1,633 |
| Sun, Sep 20 | 1,260 | 1,321 |
| Mon, Sep 21 | 1,574 | 940 |
| Tue, Sep 22 | 3,948 | 1,074 |
| Wed, Sep 23 | 2,508 | 1,748 |
| Thu, Sep 24 | 1,952 | 1,826 |
| Fri, Sep 25 | 1,625 | 1,684 |
| Sat, Sep 26 | 1,081 | 1,504 |
| Sun, Sep 27 | 1,103 | 1,608 |
| Mon, Sep 28 | 1,758 | 1,104 |
| Tue, Sep 29 | 1,926 | 1,181 |
| Wed, Sep 30 | 1,666 | 1,616 |
| Thu, Oct 1 | 1,721 | 1,615 |
| Fri, Oct 2 | 1,562 | 1,658 |
| Sat, Oct 3 | 1,034 | 1,547 |
| Sun, Oct 4 | 1,253 | 1,363 |
| Mon, Oct 5 | 1,765 | 1,081 |
| Tue, Oct 6 | 1,969 | 1,226 |
| Wed, Oct 7 | 1,693 | 1,709 |
| Thu, Oct 8 | 1,851 | 1,598 |
| Fri, Oct 9 | 1,772 | 1,831 |
| Sat, Oct 10 | 1,053 | 1,506 |
- Avg. session+6.1%
- 3m 42s
- Bounce rate−2.4%
- 38.2%
- Sign-ups+18.0%
- 1,284
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/glow-chart.jsonUsage
import { GlowChart, Sparkline } from "@/components/ui/glow-chart"
<GlowChart
label="Unique visitors per day"
data={[
{ x: new Date("2026-10-08"), y: 1840 },
{ x: new Date("2026-10-09"), y: 1912 },
{ x: new Date("2026-10-10"), y: 1206 },
]}
/>
<Sparkline data={[96, 104, 98, 121, 117, 132]} />Examples
Bars with a target
Bars are glass with a lit cap; the hovered month powers on. Monthly dates tick on calendar months, and thresholds draw a dashed reference line.
Several series
Each series takes its own color. The first follows the accent, so only the others are set. yDomain fixes the range so a spike doesn't rescale the day.
Sparklines
A Sparkline is a single glowing trend with its latest value marked. live makes that dot ping.
API reference
GlowChart
Also accepts native div attributes. aria-label replaces the generated summary.
| Prop | Type | Default |
|---|---|---|
data | GlowChartPoint[]Points for one series, or named series. Series are matched by x, so they don't need the same length. | None |
type | "area"Area and bar charts start at zero; lines fit the data. | "area" |
label | stringWhat the chart shows. Leads the accessible summary and captions the data table. | None |
color | NeonColorColor of the first series. Falls back to --neon-accent, then cyan. | inherited |
curve | "smooth"Smooth is monotone, so it never overshoots a peak. | "smooth" |
height | numberPlot height in pixels, x-axis labels included. The width fills the container. | 240 |
grid | booleanHairlines at each y tick. | true |
axis | booleanTick labels on both axes. | true |
tooltip | booleanCrosshair, tooltip and arrow-key reading. Off makes the chart a static image. | true |
legend | booleanSeries key above the plot. | series > 1 |
yFormat | (value: number, context: "axis" | "tooltip") => stringFormats y values. The axis gets 1.2K by default; the tooltip and table get 1,204. | compact / grouped |
xFormat | (x: string | number | Date, context: "axis" | "tooltip") => stringFormats x values. Dates default to UTC so the server and browser agree; pass this to use a local zone. | None |
yDomain | [number, number]A fixed y range instead of fitting the data. | None |
yTicks | numberRough number of y ticks. Steps are always 1, 2, 2.5 or 5 times a power of ten. | 4 |
thresholds | { y: number; label?: string; color?: NeonColor }[]Dashed reference lines, like an SLO or a target. | None |
xLabel | stringHeader of the x column in the data table. | "Date" / "Label" |
animate | booleanA beam draws the series in when the chart scrolls into view (bars grow), and again when the number of points changes. | true |
onActiveIndexChange | (index: number | null) => voidThe point under the crosshair, from pointer or keyboard. | None |
GlowChartSeries
| Prop | Type | Default |
|---|---|---|
name | stringShown in the legend, tooltip, summary and table header. | None |
data | { x: string | number | Date; y: number | null }[]A null y leaves a gap in the line. | None |
color | NeonColorThe first series defaults to --neon, the rest to white, amber, violet, green, pink and blue in that order. | None |
type | "line"Overrides the chart type for this series in a line or area chart. | None |
muted | booleanDrawn thin and unlit, for a comparison or baseline. | false |
Sparkline
Also accepts native span attributes.
| Prop | Type | Default |
|---|---|---|
data | number[]Values in order, oldest first. | None |
width | numberPixels or any CSS length. With a percentage it stretches without distorting the glow. | 96 |
height | numberHeight in pixels. | 28 |
label | stringAccessible name. | trend summary |
area | booleanA soft wash under the line. | true |
dot | booleanMarks the latest value. | true |
live | booleanThe latest-value dot pings, for streaming data. | false |
curve | "smooth"Line interpolation. | "smooth" |
yFormat | (value: number) => stringFormats values in the generated label. | None |
color | NeonColorLine color. | inherited |
Accessibility
- The plot is role="img" with a generated summary: the range, then each series' low, high and latest value.
- Every value is also in a visually hidden table with a caption, so nothing depends on hovering.
- The plot is focusable when tooltip is on. Left and Right move the crosshair, PageUp and PageDown jump a tenth of the range, Home and End go to the ends, and Escape hides it.
- Keyboard moves are announced through a polite live region; pointer hover is not, so screen readers aren't flooded.
- Touch scrubs horizontally and leaves vertical scrolling to the page.
- With reduced motion the series appear without the draw-in beam and the crosshair doesn't glide.