# Line Chart

> A standalone interactive SVG line chart showing a twelve-month revenue trend — generated at runtime with a crosshair hover, area fill under the line, a floating tooltip, click-to-pin data points, a legend, and a period selector. Fully token-driven.

- Category: Chart
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Sienna
- Dark mode: yes
- Access: premium (Atheros AI Pass)
- Tags: interactive, tooltip, visualization
- Page: https://builder.atheros.ai/components/line-chart
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_line_chart/preview-3231842e86dd.webp

## Features

- Runtime-generated SVG line with an area fill under the curve (primary color at 14% opacity)
- Crosshair hover: a vertical dashed guide follows the mouse and snaps to the nearest data point
- Nearest data-point dot enlarges and glows on hover, with a floating tooltip showing month and value
- Click a data point to pin its tooltip; click again to unpin
- Horizontal gridlines with Y-axis value labels and sampled X-axis month labels
- Period selector control and a legend built at runtime
- Fade-up entrance animation
- Visually-hidden data table mirrors the chart for screen readers
- Reduced-motion support shows the final chart state instantly

## Accessibility

- **Chart region** — `.cht-chart` uses `role="img"` with a descriptive `aria-label`
- **Period selector** — Keyboard-operable listbox with `aria-label`
- **Data table** — Visually-hidden `<table>` mirrors the chart data for screen readers
- **Focus indicators** — `:focus-visible` outline using the `--ring` token
- **Reduced motion** — `prefers-reduced-motion: reduce` disables all animations

## Common questions

**Which frameworks is Line Chart available in?**

Line Chart ships as Vanilla, React + CSS and React + Tailwind — HTML, CSS, JS and React source you can copy, download or clone into Atheros AI Builder.

**Is Line Chart free?**

Line Chart is a premium component. Anyone can preview it; the source, downloads and AI customisation are included with Atheros AI Pass.

**Does Line Chart support dark mode?**

Yes. Line Chart ships light and dark themes, both drawn from the Sienna design system's tokens. Switch the preview to dark mode to compare them.

## Get the code

Preview Line Chart live, then sign in to copy or download the source, apply another design system, or ask the AI assistant to change it: https://builder.atheros.ai/components/line-chart

Every component on https://builder.atheros.ai is also reachable from Claude Code, Cursor and Codex through the Atheros MCP server (paid plans). Component index: https://builder.atheros.ai/llms-components.txt
