This component no longer exists. It was in bklit-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-10 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Live Line Chart
bklit-ui/live-line-chartRemovedComponent
Real-time streaming line chart with smooth scrolling, crosshair, and animated axes
Install it
npx shadcn@latest add https://bklit.com/r/live-line-chart.jsonSource
1"use client";23import { localPoint } from "@visx/event";4import { ParentSize } from "@visx/responsive";5import { scaleLinear, scaleTime } from "@visx/scale";6import { bisector } from "d3-array";7import {8 Children,9 isValidElement,10 memo,11 type ReactElement,12 type ReactNode,13 startTransition,14 useCallback,15 useEffect,16 useMemo,17 useRef,18 useState,19} from "react";20import { cn } from "@/lib/utils";21import {22 isClipExcludedComponent,23 isUnderlayComponent,24} from "./chart-child-passthrough";25import {26 ChartProvider,27 type LineConfig,28 type Margin,29 type TooltipData,30} from "./chart-context";31import { hmsTimeFmt } from "./chart-formatters";32import { DEFAULT_CHART_LIFECYCLE } from "./chart-phase";33import type { LiveLineProps } from "./live-line";34import { extractReferenceAreaConfigs } from "./reference-area-config";35import { wrapSingleYScale } from "./y-axis-scales";3637// ---------------------------------------------------------------------------38// Types39// ---------------------------------------------------------------------------4041export interface LiveLinePoint {42 time: number;43 value: number;44}4546export interface LiveLineChartProps {47 /** Streaming data — array of { time: unixSeconds, value } */48 data: LiveLinePoint[];49 /** Latest value (smoothly interpolated to) */50 value: number;51 /** Key used for the value field in context data. Default: "value" */52 dataKey?: string;53 /** Visible time window in seconds. Default: 30 */54 window?: number;55 /** Number of X-axis ticks (used to compute leading offset). Default: 5 */56 numXTicks?: number;57 /** Leading offset in X-tick units (0 = now at right edge). Default: 0 */58 nowOffsetUnits?: number;59 /** Tight Y-axis. Default: false */60 exaggerate?: boolean;61 /** Interpolation speed (0–1). Default: 0.08 */62 lerpSpeed?: number;63 /** Chart margins */64 margin?: Partial<Margin>;65 /** Freeze chart scrolling. Default: false */66 paused?: boolean;67 /** Child components (LiveLine, Grid, ChartTooltip, LiveXAxis, LiveYAxis, etc.) */68 children: ReactNode;69 className?: string;70 style?: React.CSSProperties;71}7273// ---------------------------------------------------------------------------74// Helpers75// ---------------------------------------------------------------------------7677const LERP_SPEED = 0.08;78const DEFAULT_MARGIN: Margin = { top: 24, right: 16, bottom: 32, left: 16 };79/** React commit interval for the live animation loop (~30fps). */80const LIVE_FRAME_COMMIT_MS = 32;8182// … truncated
What it pulls in
npm packages
Other registry items
