Search for a command to run...
Hours vs. Productivity
Self-reported productivity score by hours worked
Used to show relationships between two metrics — where a trend line would lie, or whether two variables move together — in AI-generated exploratory analyses.
npx shadcn@latest add https://ui.heygaia.io/r/scatter-chart.jsonimport { ScatterChart } from "@/components/ui/scatter-chart";
const data = [
{ hours: 1, productivity: 22 },
{ hours: 2, productivity: 35 },
{ hours: 3, productivity: 48 },
];
export default function Example() {
return (
<ScatterChart
data={data}
xKey="hours"
yKey="productivity"
title="Hours vs. Productivity"
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
| data | Array<Record<string, string | number>> | - | Chart data rows |
| xKey | string | - | Key for the X axis |
| yKey | string | - | Key for the Y axis |
| title | string | - | Card title |
| description | string | - | Card description |
| footer | string | - | Optional footer text |
| labelKey | string | - | Optional key used for point labels |