Componentcharts0.77 KB gzipZero dependencies
Bubble Chart
Bubble chart with size-coded circles and hover magnify.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add bubble-chartOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { BubbleChart } from "@/components/ui/bubble-chart"; <BubbleChart />Source code
bubble-chart.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxbubble-chart.tsx58 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface BubblePoint { id: string; x: number; y: number; size: number; label?: string;} export interface BubbleChartProps extends React.HTMLAttributes<SVGSVGElement> { points: BubblePoint[]; height?: number;} Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { BubbleChart } from "@/components/ui/bubble-chart"; <BubbleChart />| Prop | Type | Description |
|---|---|---|
| points | BubblePoint[] | Configures points. (Default: []) |
| height | number | Configures height. (Default: 240) |