Add the Nook "Line Chart" component to this project, exactly as Nook ships it.
Shows change over time as lines or filled areas, with a crosshair that reads every series at once.
Steps
1. Check for `nook.json` in the project root. If it is missing, run `npx nook-ui@latest init` first (React or Next.js with Tailwind CSS v4). It adds the Nook tokens, the theme and `cn()`.
2. Run `npx nook-ui@latest add line-chart`. It writes `components/ui/line-chart.tsx` together with everything the component needs. Do not write the component from memory.
3. If you cannot run commands, fetch http://localhost:3000/r/line-chart.json, write every entry of `files` to the path it names, install the packages in `dependencies`, and repeat for each name in `registryDependencies`.
4. Use it where I ask. Start from this example:
```tsx
import { LineChart } from "@/components/ui/line-chart";
const DATA = [
{ week: "W36", visitors: 4200, signups: 310 },
{ week: "W37", visitors: 4800, signups: 380 },
{ week: "W38", visitors: 4500, signups: 350 },
{ week: "W39", visitors: 5600, signups: 520 },
{ week: "W40", visitors: 6100, signups: 640 },
{ week: "W41", visitors: 5800, signups: 610 },
{ week: "W42", visitors: 7200, signups: 880 },
{ week: "W43", visitors: 7900, signups: 1040 },
];
export default function LineChartDefault() {
return ;
}
```
API
- `LineChart`: The chart.
- `data` (`Record[]`): One row per point in time.
- `categoryKey` (`string`): Key of the time label in each row.
- `series` (`{ key, label }[]`): The lines to draw, up to five.
- `area` (`boolean`, default false): Fill under each line.
- `curve` (`"linear" | "smooth" | "step"`, default "linear"): How points are joined.
- `dots` (`boolean`, default false): Draw a dot on every point.
- `title` (`string`): What the chart shows.
- `formatValue` (`(value: number) => string`): Formats axis and tooltip values.
Rules
- Colors, radii, shadows and motion come from Nook tokens and classes such as `bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg` and `h-control`. Never hard-code them.
- Do not restyle or simplify the file. Change how it looks through `className`, its props and the theme.
- It must keep working with the keyboard, in light and dark mode, and in the sharp, soft and bold styles.
- Accessibility: A hidden table carries the same data for screen readers, and text is never colored by its series. Two or more series always get a legend.
Done when the component renders like the example in light and dark mode and the project type-checks.