Componentcharts0.77 KB gzipZero dependencies

Bubble Chart

Bubble chart with size-coded circles and hover magnify.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add bubble-chart

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { BubbleChart } from "@/components/ui/bubble-chart"; <BubbleChart />

Source code

bubble-chart.tsx + 1 helper

Zero 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 />
PropTypeDescription
pointsBubblePoint[]Configures points. (Default: [])
heightnumberConfigures height. (Default: 240)