Charts / React basic charts / Relationship
A scatter plot with a third measure as bubble area and a fourth as colour, with a size key and names that never overlap.
React component BubbleChart, data through props. How variables move together: correlation, density and many dimensions at once. Tags: bubble, scatter, three variables, portfolio, size, xyz, relationship.
npm i klar-charts
import 'klar-charts/styles.css'
import { ThemeScope, BubbleChart } from 'klar-charts'
# or copy the source:
npx shadcn@latest add https://klar.run/r/basic-bubble.json<BubbleChart
data={productLines}
groups={productFamilies}
xLabel="Revenue growth, year on year"
yLabel="Gross margin"
sizeLabel="Revenue"
unit="percent"
xUnit="percent"
sizeUnit="currency"
height={420}
ariaLabel="Product lines by revenue growth, gross margin and revenue"
/>