# Animated Line Chart

SVG line chart drawn left-to-right via stroke-dashoffset.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## Installation

<TabsTrigger value="cli">Command</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>

```bash
npx shadcn@latest add @framecn/animated-line-chart
```

<Step>Copy and paste the following code into your project.</Step>

<Step>Update the import paths to match your project setup.</Step>

## Usage

```tsx
import { AnimatedLineChart } from "@/components/framecn/animated-line-chart";
```

```tsx
<AnimatedLineChart />
```

## API Reference

### AnimatedLineChart

| Prop               | Type       | Default                               |
| ------------------ | ---------- | ------------------------------------- |
| `data`             | `number[]` | `[12, 19, 8, 15, 22, 18, 28, 25, 32]` |
| `width`            | `number`   | `1000`                                |
| `height`           | `number`   | `500`                                 |
| `strokeColor`      | `string`   | `"#22c55e"`                           |
| `strokeWidth`      | `number`   | `4`                                   |
| `background`       | `string`   | `"#0a0a0a"`                           |
| `gridColor`        | `string`   | `"#27272a"`                           |
| `showDot`          | `boolean`  | `true`                                |
| `speed`            | `number`   | `1`                                   |
| `fps`              | `number`   | `30`                                  |
| `durationInFrames` | `number`   | `90`                                  |
| `className`        | `string`   | `-`                                   |

## Notes

  The chart line is drawn using stroke-dashoffset animation for a smooth
  left-to-right reveal effect.