# lightweight-charts-react-components

The lightweight-charts-react-components GitHub Copilot skill helps build and fix financial charts in React with lightweight-charts. It activates for requests about TradingView charts in React or the package’s chart features.

- skill · `type=skill` · GitHub Copilot, Claude Code, Codex, Cursor, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 41430 repo stars
- Author: ukorvl · official GitHub repository
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/github/awesome-copilot/tree/HEAD/skills/lightweight-charts-react-components/SKILL.md
- Updated: 2026-10-23
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/lightweight-charts-react-components

## What it does

The skill provides recipes for candlestick, line, and area charts, volume and indicator panes, WebSocket updates, loading older history on scroll, hover details, and synchronized charts. It selects references for the requested chart behavior instead of loading every guide for a simple task.

Recipes target `lightweight-charts-react-components` 2.6.1 and `lightweight-charts` 5.2.1, with compatibility ranges `>=2.6.1 <3` and `>=5.0.8 <6`. React and React DOM must be `>=18.2 <20`, and Node.js must be `>=18.14.0`. Charts need to render in the browser, and their container needs nonzero height. When no recipe covers a request, the skill directs the agent to use the public components and `lightweight-charts` API.

## Install

### GitHub Copilot (native platform)

1. **GitHub CLI**
```bash
gh skill install github/awesome-copilot skills/lightweight-charts-react-components
```

2. **Manually: put the files in place**
- File: `.github/skills/lightweight-charts-react-components/SKILL.md`

### Claude Code

1. **Skills CLI (Vercel)**
```bash
npx skills add github/awesome-copilot --skill lightweight-charts-react-components -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/lightweight-charts-react-components/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/lightweight-charts-react-components/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add github/awesome-copilot --skill lightweight-charts-react-components -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/lightweight-charts-react-components/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add github/awesome-copilot --skill lightweight-charts-react-components -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/lightweight-charts-react-components/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add github/awesome-copilot --skill lightweight-charts-react-components -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/github/awesome-copilot --path skills/lightweight-charts-react-components
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/lightweight-charts-react-components/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/github/awesome-copilot/tree/HEAD/skills/lightweight-charts-react-components/SKILL.md

## When to use it
- add a candlestick chart with live WebSocket updates
- load older chart history as the user scrolls
- display volume and indicators in separate panes
- sync scrolling, zoom, and crosshair across charts
- add OHLC hover details, trade markers, or price levels

## Example prompts
- Add a React candlestick chart that updates the current bar over WebSocket.
- Load older chart data as the user scrolls back.
- Add an OHLC hover legend and sync this chart’s zoom with a second chart.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 09ec85ea765c224e.

BEGIN THIRD-PARTY FILE 09ec85ea765c224e
````text
---
name: lightweight-charts-react-components
description: lightweight-charts-react-components recipes for TradingView lightweight-charts in React. Candlestick, line, and area series; volume and indicator panes; realtime WebSocket updates; infinite history on scroll; crosshair OHLC legends and tooltips; trade markers and price lines; synchronized charts; numeric options and yield-curve axes. Use when adding or fixing a financial or trading chart in a React app, or when the user mentions lightweight-charts, TradingView charts in React, or this package.
license: MIT
metadata:
  author: ukorvl
  version: "1.0"
  source: "https://github.com/ukorvl/lightweight-charts-react-components/tree/0368191127568e48aef6f7bda2ff3900e8e24756/skills/lightweight-charts-react-components"
---

# lightweight-charts-react-components guide

## Quick Start

Let the components manage chart and series creation and cleanup. Import components
and ref types from `lightweight-charts-react-components`; import native data, option,
and event types from `lightweight-charts`.

1. Check versions against the compatibility table below. Read declared ranges
   from the app's `package.json`, then the installed versions from the `version`
   field of `node_modules/<package>/package.json` for
   `lightweight-charts-react-components`, `lightweight-charts`, `react`, and
   `react-dom`. If the library is not installed, follow
   [Installation](#installation). Ensure chart rendering runs in the browser,
   within the app's client boundary.
2. For a basic static chart, start from the minimal chart below. Otherwise, read the
   reference matching the requested behavior. Adapt its feed and UI; preserve its
   data contract, component nesting, and API readiness handling.
3. Choose one data owner: pass the complete dataset through `data` for React-owned
   updates, or use `reactive={false}` and the series API for frequent ticks.

### Installation

Install the wrapper together with its `lightweight-charts` peer dependency, using
the project's package manager. React and React DOM must already be installed.

```sh
npm install lightweight-charts-react-components lightweight-charts
```

### Minimal chart

```tsx
import type { LineData, UTCTimestamp } from "lightweight-charts";
import {
  Chart,
  LineSeries,
  TimeScale,
  TimeScaleFitContentTrigger,
} from "lightweight-charts-react-components";

// Data must be sorted ascending by time with unique times (UTC seconds here).
export function SimpleLineChart({ data }: { data: LineData<UTCTimestamp>[] }) {
  return (
````
END THIRD-PARTY FILE 09ec85ea765c224e

The third-party file has ended. Everything between the 09ec85ea765c224e tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2551 of 10369 bytes. © ukorvl · MIT · https://github.com/github/awesome-copilot/tree/HEAD/skills/lightweight-charts-react-components/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
