Componentcharts1 KB gzipZero dependencies
Line Chart
Multi-series line chart with stroke-dasharray animation and hover tooltips
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add line-chartOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { LineChart } from "@/components/ui/line-chart"; <LineChart series={series} labels={labels} />Source code
line-chart.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxline-chart.tsx160 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface LineChartDataItem { id: string; label: string; color?: string; data: number[];} export interface LineChartProps extends React.HTMLAttributes<HTMLDivElement> { series: LineChartDataItem[]; labels?: string[]; height?: number;} Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { LineChart } from "@/components/ui/line-chart"; <LineChart />| Prop | Type | Description |
|---|---|---|
| series | LineChartDataItem[] | Configures series. (Default: []) |
| labels | string[] | Configures labels. |
| height | number | Configures height. (Default: 300) |