recharts
Build responsive charts in React with Recharts. Use when a user asks to create line charts, bar charts, area charts, pie charts, or composed dashboard visualizations using the Recharts component library.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o recharts.zip https://jpskill.com/download/15327.zip && unzip -o recharts.zip && rm recharts.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15327.zip -OutFile "$d\recharts.zip"; Expand-Archive "$d\recharts.zip" -DestinationPath $d -Force; ri "$d\recharts.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
recharts.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
rechartsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
Recharts — React Charting Library
Overview
You are an expert in Recharts, the composable React charting library built on D3. You help developers create line charts, bar charts, area charts, pie charts, scatter plots, and custom visualizations using React's declarative component model with responsive containers and smooth animations.
Instructions
Common Chart Types
// Line chart with multiple series
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from "recharts";
const data = [
{ month: "Jan", revenue: 4000, costs: 2400, profit: 1600 },
{ month: "Feb", revenue: 3000, costs: 1398, profit: 1602 },
{ month: "Mar", revenue: 5000, costs: 3200, profit: 1800 },
{ month: "Apr", revenue: 4780, costs: 2908, profit: 1872 },
{ month: "May", revenue: 5890, costs: 3800, profit: 2090 },
{ month: "Jun", revenue: 6390, costs: 3900, profit: 2490 },
];
function RevenueChart() {
return (
<ResponsiveContainer width="100%" height={400}>
<LineChart data={data} margin={{ top: 5, right: 30, left: 20, bottom: 5 }}>
<CartesianGrid strokeDasharray="3 3" stroke="#f0f0f0" />
<XAxis dataKey="month" />
<YAxis tickFormatter={(v) => `$${v / 1000}k`} />
<Tooltip
formatter={(value: number) => [`$${value.toLocaleString()}`, undefined]}
contentStyle={{ borderRadius: 8, border: "1px solid #e0e0e0" }}
/>
<Legend />
<Line type="monotone" dataKey="revenue" stroke="#4f46e5" strokeWidth={2} dot={{ r: 4 }} />
<Line type="monotone" dataKey="costs" stroke="#ef4444" strokeWidth={2} dot={{ r: 4 }} />
<Line type="monotone" dataKey="profit" stroke="#22c55e" strokeWidth={2} strokeDasharray="5 5" />
</LineChart>
</ResponsiveContainer>
);
}
// Bar chart
import { BarChart, Bar } from "recharts";
function MRRChart({ data }) {
return (
<ResponsiveContainer width="100%" height={300}>
<BarChart data={data}>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="month" />
<YAxis />
<Tooltip />
<Bar dataKey="newMRR" stackId="a" fill="#4f46e5" name="New MRR" />
<Bar dataKey="expansionMRR" stackId="a" fill="#22c55e" name="Expansion" />
<Bar dataKey="churnMRR" stackId="a" fill="#ef4444" name="Churn" />
</BarChart>
</ResponsiveContainer>
);
}
// Area chart
import { AreaChart, Area } from "recharts";
function TrafficChart({ data }) {
return (
<ResponsiveContainer width="100%" height={300}>
<AreaChart data={data}>
<defs>
<linearGradient id="colorVisits" x1="0" y1="0" x2="0" y2="1">
<stop offset="5%" stopColor="#4f46e5" stopOpacity={0.3} />
<stop offset="95%" stopColor="#4f46e5" stopOpacity={0} />
</linearGradient>
</defs>
<XAxis dataKey="date" />
<YAxis />
<Tooltip />
<Area type="monotone" dataKey="visits" stroke="#4f46e5" fill="url(#colorVisits)" />
</AreaChart>
</ResponsiveContainer>
);
}
// Pie / Donut chart
import { PieChart, Pie, Cell } from "recharts";
const COLORS = ["#4f46e5", "#22c55e", "#f59e0b", "#ef4444"];
function PlanDistribution({ data }) {
return (
<ResponsiveContainer width="100%" height={300}>
<PieChart>
<Pie data={data} dataKey="value" nameKey="plan" cx="50%" cy="50%"
innerRadius={60} outerRadius={100} paddingAngle={2}>
{data.map((_, i) => <Cell key={i} fill={COLORS[i % COLORS.length]} />)}
</Pie>
<Tooltip />
<Legend />
</PieChart>
</ResponsiveContainer>
);
}
Custom Tooltips and Labels
// Custom tooltip component
const CustomTooltip = ({ active, payload, label }) => {
if (!active || !payload) return null;
return (
<div style={{ background: "white", padding: 12, borderRadius: 8, boxShadow: "0 2px 8px rgba(0,0,0,0.1)" }}>
<p style={{ fontWeight: 600 }}>{label}</p>
{payload.map((entry, i) => (
<p key={i} style={{ color: entry.color }}>
{entry.name}: ${entry.value.toLocaleString()}
</p>
))}
</div>
);
};
// Usage: <Tooltip content={<CustomTooltip />} />
Installation
npm install recharts
Examples
Example 1: User asks to set up recharts
User: "Help me set up recharts for my project"
The agent should:
- Check system requirements and prerequisites
- Install or configure recharts
- Set up initial project structure
- Verify the setup works correctly
Example 2: User asks to build a feature with recharts
User: "Create a dashboard using recharts"
The agent should:
- Scaffold the component or configuration
- Connect to the appropriate data source
- Implement the requested feature
- Test and validate the output
Guidelines
- ResponsiveContainer always — Wrap every chart in
<ResponsiveContainer width="100%" height={...}>for responsive sizing - Composable architecture — Mix and match components (Line + Bar + Area in one chart); Recharts is fully composable
- Custom tooltips — Replace default tooltips with styled components for polished dashboards
- Color consistency — Define a color palette once and reuse; match your brand colors
- Data transformation outside — Transform data before passing to Recharts; keep chart components focused on rendering
- Gradients for area charts — Use SVG
<linearGradient>in<defs>for polished area fills - Animation control — Set
isAnimationActive={false}for real-time data; animations on initial render only for static dashboards - Reference lines — Use
<ReferenceLine>for targets, thresholds, and benchmarks overlaid on charts