К основному содержанию
скилл CX Codex официальный · GitHub

lightweight-charts-react-components — скилл для GitHub Copilot

Скилл lightweight-charts-react-components для GitHub Copilot помогает добавлять и чинить финансовые графики на React с lightweight-charts. Включается по запросу о TradingView-графиках, пакетах lightweight-charts или их возможностях.

MIT ★ 41 430 обновлён 2026-10-23

Установить в GitHub Copilot · GitHub CLI Все способы и платформы ↓
gh skill install github/awesome-copilot skills/lightweight-charts-react-components
Открыть на GitHub

Что делает lightweight-charts-react-components

Скилл подбирает рецепты для графиков на React: свечи, линии и области, объём и индикаторы, обновления через WebSocket, подгрузку истории при прокрутке, подсказки и синхронизацию графиков. Для задачи он выбирает подходящий пример, а не загружает все справочные материалы сразу.

Рецепты рассчитаны на lightweight-charts-react-components 2.6.1 и lightweight-charts 5.2.1; диапазоны совместимости — >=2.6.1 <3 и >=5.0.8 <6. Нужны React и React DOM версий >=18.2 <20, а Node.js — >=18.14.0. График должен отображаться в браузере, а контейнеру нужна ненулевая высота. Если для запроса нет рецепта, скилл предлагает собрать решение на публичных компонентах и API lightweight-charts.

Какие задачи решает

  • добавить свечной график с обновлениями через WebSocket
  • подгружать старую историю при прокрутке графика
  • показать объём и индикаторы на отдельных панелях
  • синхронизировать прокрутку, масштаб и crosshair между графиками
  • добавить OHLC-подсказки, маркеры сделок или ценовые уровни

Примеры запросов агенту

  • Добавь в приложение на React свечной график с обновлением текущей свечи через WebSocket.
  • Сделай подгрузку старой истории при прокрутке графика.
  • Добавь к графику OHLC-легенду и синхронизируй его масштабирование со вторым графиком.

Как установить lightweight-charts-react-components

1GitHub CLI

gh skill install github/awesome-copilot skills/lightweight-charts-react-components

2Вручную: положить файлы

.github/skills/lightweight-charts-react-components/SKILL.md

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о lightweight-charts-react-components

Как установить lightweight-charts-react-components в GitHub Copilot?

Выполни gh skill install github/awesome-copilot skills/lightweight-charts-react-components. Файл скилла появится по пути .github/skills/lightweight-charts-react-components/SKILL.md.

Что делает lightweight-charts-react-components?

Скилл содержит рецепты для финансовых графиков на React с lightweight-charts: от свечей и индикаторов до обновлений в реальном времени, подгрузки истории и синхронизации графиков.

Что нужно для работы lightweight-charts-react-components?

Нужны lightweight-charts-react-components версии >=2.6.1 <3, lightweight-charts версии >=5.0.8 <6, React и React DOM версий >=18.2 <20, а также Node.js >=18.14.0. График рендерится в браузере.

Исходный текст

SKILL.md · MIT
---
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 (
    // autoSize follows the container, which needs a nonzero height.
    <Chart
      options={{ autoSize: true }}
      containerProps={{ style: { height: 300, width: "100%" } }}
    >
      <LineSeries data={data} />
      <TimeScale>
        <TimeScaleFitContentTrigger deps={[]} />
      </TimeScale>
    </Chart>
  );
}
```

## Examples and snippets (reference files)

Read the reference matching the user's outcome. Each contains a complete TypeScript
recipe, data and integration contracts, reasons for the architecture, failure modes,
and acceptance checks. Combine references when a task spans several outcomes; do
not load every reference for a simple chart.

| User request                                                                         | Reference                                                                        |
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| WebSocket candles, updating the current bar, stale history, excessive chart renders  | [Market data and live updates](references/market-data-and-live-updates.md)       |
| Older history on scroll, viewport jumps, symbol/interval changes, late API responses | [History and range selection](references/history-and-range-selection.md)         |
| Candles plus volume, moving averages, oscillator panes, independent price scales     | [Price, volume, and indicators](references/price-volume-and-indicators.md)       |
| OHLC legend, hover details, missing data, tooltip positioning                        | [Hover legends and tooltips](references/hover-legends-and-tooltips.md)           |
| Executions and signals, stop/target levels, click-to-place price lines               | [Trade markers and price levels](references/trade-markers-and-price-levels.md)   |
| Compare assets with different prices, fixed-baseline returns, toggle comparisons     | [Performance comparison](references/performance-comparison.md)                   |
| Separate charts that share scrolling, zooming, and a crosshair                       | [Synchronized charts](references/synchronized-charts.md)                         |
| Trading-session shading, pane backgrounds, custom drawing that follows zoom          | [Session overlays and primitives](references/session-overlays-and-primitives.md) |
| Options strikes, yield maturities, choosing a numeric or custom horizontal axis      | [Numeric axes and chart types](references/numeric-axes-and-chart-types.md)       |

If no reference matches the request, tell the user that the skill has no recipe
for it. Then build the solution from the public components and the upstream
`lightweight-charts` API, applying the Quick Start rules and the edge cases below.

### Skill compatibility

The recipes are verified against the reference versions below. These are the
tested baseline, not the latest available releases.

If an installed version differs from the reference version, compare it with the
compatibility range. Inside the range, recipes apply as written. Outside it,
tell the user about the mismatch before writing code, because breaking API
changes can affect the recipes, and verify every API the recipe uses against
the installed package.

| Dependency or environment             | Reference version | Compatibility range and checks                                                                                                                       |
| ------------------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `lightweight-charts-react-components` | `2.6.1`           | Recipe target: `>=2.6.1 <3`. Other versions require checking installed exports, chart API refs, and reactive data behavior before adapting a recipe. |
| `lightweight-charts`                  | `5.2.1`           | Declared peer: `>=5.0.8 <6`.                                                                                                                         |
| React and React DOM                   | `19.2.6`          | Declared peers: `>=18.2 <20`. Keep `react` and `react-dom` on matching versions and use the application's existing React instance.                   |
| Node.js                               | —                 | Package engines: `>=18.14.0`. The app's build tools can require a newer version.                                                                     |
| Module system                         | ESM               | ESM `import` entry only; there is no CommonJS `require` entry.                                                                                       |
| Rendering                             | Browser           | Charts need the DOM and canvas. Render them on the client, never during server rendering.                                                            |

## Common edge cases

- **Chart sizing:** Put DOM styles on `containerProps` and give the chart a
  nonzero height.
- **Required ancestors:** Headless chart children need a chart wrapper ancestor.
  `Markers`, `PriceLine`, and `SeriesPrimitive` belong inside their series;
  `PriceScale`, `Watermark`, and `PanePrimitive` require a `Pane`;
  `TimeScaleFitContentTrigger` requires a `TimeScale`.
- **API refs and readiness:** Use `ref.current?.api()` for the native API and
  `containerRef` for the div. For `Chart`, use `ChartApiRef<Time, IChartApi>`.
  `.api()` can initially return null; follow the recipe's readiness step before
  imperative setup.
- **Viewport resets:** To preserve scroll/zoom, keep the chart's key stable and
  live/history updates out of fit-trigger dependencies. Fit on initial load or a
  deliberate reset. See [range handling](references/history-and-range-selection.md).
- **Data updates:** Use `data` for React-owned updates, or `reactive={false}` and the
  series API when per-tick React renders are measurably costly. Avoid mixing both.
  Reactive `data` is always the complete dataset. With wrapper 2.6.1 and
  Lightweight Charts 5.2.1, `series.data()` reconstructs candle and line objects;
  the wrapper's earlier-item reference comparison therefore sends multi-bar tail
  updates through `setData()`, even when React keeps earlier references stable.
  Keep data immutable, but use the chart-owned `reactive={false}` recipe and
  explicit `series.update(bar)` when incremental writes are required. See
  [live updates](references/market-data-and-live-updates.md).

## Source

Adapted from [ukorvl/lightweight-charts-react-components](https://github.com/ukorvl/lightweight-charts-react-components/tree/0368191127568e48aef6f7bda2ff3900e8e24756/skills/lightweight-charts-react-components)
at commit `0368191127568e48aef6f7bda2ff3900e8e24756`. Original author: ukorvl.
The [MIT license](LICENSE) and all nine reference recipes are retained. Local
corrections in [live updates](references/market-data-and-live-updates.md) reject
malformed timestamps and explain the tested versions' reactive-update limitation;
[session overlays](references/session-overlays-and-primitives.md) clarifies the
primitive update callback.
The other seven references and MIT notice are unchanged. This catalog copy adds
source attribution and operational boundaries; it does not imply TradingView
endorsement.

Recipes generate application code and can change dependencies. Follow the user's
requested scope and the host's approval policy. Feed access belongs to the app's
separately authorized adapter; keep credentials out of client code. Trade markers
are visual annotations, not order execution or server-side alerts. Use synthetic
data for local checks and report browser/feed behavior that remains untested.

© ukorvl · MIT · github/awesome-copilot

Похожие скиллы

Все скиллы по теме «Фронтенд и UI» →
syncfusion-react-charts Syncfusion Inc Скилл syncfusion-react-charts для Claude Code помогает собирать графики Syncfusion в React с настройкой осей, серий, данных и интерактивности для дашбордов и аналитики. CX Codex +1 781установок charts coleam00 Правило charts для Claude Code описывает создание графиков и анимаций данных в Remotion без мерцания кадров. CX Codex +1 ★ 849звёзд репо syncfusion-react-stock-chart Syncfusion Inc Скилл syncfusion-react-stock-chart для ИИ-агента: подсказывает, как собрать биржевой график на компоненте Syncfusion Stock Chart в React — свечи, OHLC, индикаторы. CX Codex +1 680установок stitch::react-components официальный google-labs-code Скилл stitch::react-components для Claude Code превращает дизайны Stitch в компоненты React с Vite и синхронизирует существующие компоненты с обновлёнными макетами. CX Codex +1 50 400установок react-server-components patterns.dev Скилл объясняет React Server Components: какие компоненты рендерить на сервере и где ставить 'use client'. Пригодится в Next.js App Router. CX Codex +1 1 000установок react-server-components-framework OrchestKit Скилл react-server-components-framework задаёт серверный подход к приложениям Next.js с React Server Components, App Router, кэшированием, потоковым SSR и Server Actions. CX Codex +1 227установок

Из того же набора993

Весь набор →
openapi-to-application-java-spring-boot Скилл openapi-to-application-java-spring-boot для GitHub Copilot превращает спецификацию OpenAPI в основу приложения на Spring Boot. Он включается, когда нужно создать или доработать Java API по файлу OpenAPI или Swagger. CX Codex +1 ★ 41 430звёзд репо on-device-delegate Скилл on-device-delegate для GitHub Copilot передаёт объёмное чтение файлов локальному агенту. Основная сессия экономит контекст облачной модели при разборе логов или поиске фактов. CX Codex +1 ★ 41 430звёзд репо markdown-to-word-mermaid Скилл markdown-to-word-mermaid для GitHub Copilot превращает Markdown с диаграммами Mermaid в документ Word. Диаграммы сохраняются в SVG с PNG-резервом, а крупные изображения размещаются с учётом страниц. CX Codex +1 ★ 41 430звёзд репо logicapps-custom-code-net10-migration Скилл logicapps-custom-code-net10-migration для GitHub Copilot переводит проекты кастомного кода Azure Logic Apps Standard с .NET 8 на .NET 10. Настраивает конфигурацию проектов, сборку и локальную отладку в VS Code. CX Codex +1 ★ 41 430звёзд репо globestudio Генерирует точечные карты мира и трёхмерные анимированные глобусы через веб-сервис Globestudio. Создаёт ссылки с JSON-конфигурацией и код для встраивания на сайт. CX Codex +1 ★ 41 430звёзд репо foundry-agentic-loop Скилл foundry-agentic-loop для GitHub Copilot координирует создание агентных решений на Microsoft Foundry и Azure. Запускает прототипирование, разработку по спецификации или улучшение скилла по результатам прошлых запусков. CX Codex +1 ★ 41 430звёзд репо embedding-anisotropy-check Скилл embedding-anisotropy-check для GitHub Copilot вычисляет анизотропию эмбеддингов и находит базовый уровень сходства для несвязанных пар. Запускается перед оценкой моделей, слоёв или качества ретривера. CX Codex +1 ★ 41 430звёзд репо diagnose-ci-gate Скилл diagnose-ci-gate для GitHub Copilot разбирает падение обязательной CI-проверки. Сопоставляет ошибку с базовой веткой и текущими изменениями, затем рекомендует одно действие. CX Codex +1 ★ 41 430звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой