Componentcharts0.71 KB gzipZero dependencies

Scatter Plot

SVG scatter plot with dashed axes and hover enlargements

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add scatter-plot

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { ScatterPlot } from "@/components/ui/scatter-plot"; <ScatterPlot points={points} />

Source code

scatter-plot.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxscatter-plot.tsx131 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ScatterPlotPoint {  x: number;  y: number;  label?: string;  color?: string;} export interface ScatterPlotProps extends React.HTMLAttributes<HTMLDivElement> {  points: ScatterPlotPoint[];  className?: string;} export function ScatterPlot({

Props

PropTypeDescription
pointsScatterPlotPoint[]Configures points. (Default: [])
classNamestringOptional Tailwind or custom CSS classes merged with component styles.