noahgdev

Scatter Chart

Dashboards

About

Correlation dots per series that become bubbles when a size key is set, with a per-point tooltip and legend.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Scatter Chart to your project and fits it to your theme.

Code

How Scatter Chart is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client"

import { ScatterChart } from "@/components/ui/dashboardcn-scatter-chart"
import { formatNumber } from "@/components/ui/dashboardcn-scatter-chart"

const paid = [
  { channel: "Search ads", spend: 18_400, conversions: 620, reach: 410_000 },
  { channel: "Social ads", spend: 12_900, conversions: 380, reach: 860_000 },
  { channel: "Display", spend: 7_200, conversions: 140, reach: 1_250_000 },
  { channel: "Sponsorships", spend: 9_800, conversions: 210, reach: 320_000 },
  { channel: "Retargeting", spend: 4_600, conversions: 290, reach: 95_000 },
]

const organic = [
  { channel: "SEO", spend: 3_200, conversions: 540, reach: 720_000 },
  { channel: "Newsletter", spend: 1_100, conversions: 260, reach: 48_000 },
  { channel: "Referrals", spend: 600, conversions: 180, reach: 22_000 },
  { channel: "Community", spend: 2_400, conversions: 150, reach: 130_000 },
]

export default function ScatterChartBubblesDemo() {
  return (
    <div className="w-full max-w-lg">
      <ScatterChart
        series={[
          { label: "Paid", data: paid },
          { label: "Organic", data: organic },
        ]}
        xKey="spend"
        yKey="conversions"
        sizeKey="reach"
        nameKey="channel"
        xLabel="Spend"
        yLabel="Conversions"
        sizeLabel="Reach"
        xFormatter={(v) => formatNumber(v, { format: "currency", compact: true })}
        yFormatter={(v) => formatNumber(v)}
        showLegend
      />
    </div>
  )
}

Dependencies

More by noahgdev

View all
  • Metric List

    Metric List

  • Sankey Chart

    Sankey Chart

  • Radar Chart

    Radar Chart

  • Donut Chart

    Donut Chart

  • Composed Chart

    Composed Chart

  • Bar Chart

    Bar Chart

  • Funnel Chart

    Funnel Chart

  • Activity Heatmap

    Activity Heatmap

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    659
  • Analytics Dashboard

    Analytics Dashboard

    59
  • Creator Dashboard

    Creator Dashboard

    208
  • Insights Dashboard

    Insights Dashboard

    35
  • serf dashboard

    serf dashboard

    137
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    293
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Business/Sales Dashboard

    Business/Sales Dashboard

    1.5K