traderspost/traderspost-command-dash/chart-setup
Claude Code and agent skill by traderspost/traderspost-command-dash
- community
Checking that the SKILL.md file is still in the repository.
Wire TradingView lightweight-charts into a React app — candlestick + volume series, dark theme, dynamic resize. Use when the user wants to add a price chart, swap a Recharts/Chart.js chart for lightweight-charts, or build a custom indicator on top of an existing chart.
Install
npx vskill@latest install traderspost/traderspost-command-dash/chart-setupSKILL.md
chart-setup
Add a production-quality price chart to a React app using TradingView's lightweight-charts library. This is what powers the main ChartCanvas in command-dash.
When to use
Trigger this skill whenever the user wants to:
- Show an OHLC / candlestick chart for a stock or crypto symbol
- Add volume bars under a price chart
- Theme an existing lightweight-charts instance to a dark dashboard palette
- Wire a chart to a
fetch('/api/...')source that returns{ time, open, high, low, close, volume }[]
Install
lightweight-charts v5+ uses the modular series API (addSeries(CandlestickSeries, ...)) — older v4 code that calls addCandlestickSeries(...) will not work. If the project is on v4, either upgrade to v5 or use the v4 API throughout.
Drop-in component
Create src/components/ChartPanel.tsx:
Key requirements
- `autoSize: true` in
createChartoptions — fills its container and re-fits on resize. No manualresizeObserverplumbing required. - Container must have an explicit height —
h-fullonly works if every ancestor is also height-constrained (flexbox or grid). - `time` is unix seconds (UTCTimestamp) — not milliseconds, not ISO strings. Divide JS
Date.now()by 1000. - Sort bars ascending by `time` before calling
setData. Polygon and most providers return ascending if you passsort=asc. - Cast `time` with `as never` in TS to avoid type friction with lightweight-charts' branded
Timetype.
Color palette (TradersPost dark navy)
| Token | Value | Use | |
|---|---|---|---|
bg-card | #1d2939 | chart background | |
border | #344054 | axis + scale borders | |
text-secondary | #98a2b3 | axis text | |
| grid lines | #293548 | both vert + horz | |
| up candle / bull | #12b76a | wickUp, body up | |
| down candle / bear | #f04438 | wickDown, body down | |
| accent / line | #2e90fa | overlay lines, equity curves |
Reference
The canonical implementation in command-dash is apps/web/src/components/dashboard/ChartCanvas.tsx. It includes:
- Controlled props for symbol, timeframe, chart type (Candles / Bars / Line / Area / Heikin Ashi), and indicator overlays (SMA / EMA)
- Vite proxy to a FastAPI backend that returns Polygon OHLC
- A
requestAnimationFramesize-wait pattern so charts created before the grid layout finalizes still render correctly
For equity-curve charts (single line series, no volume), see the OverviewTab inside apps/web/src/components/dashboard/StrategyReport.tsx.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/chart-setup/SKILL.md
Popularity
- Repository stars
- 6
- Repository forks
- 4
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/traderspost/traderspost-command-dash/chart-setup)