Data Visualization Techniques
by vmasrani
This skill should be used when creating charts, graphs, dashboards, or data visualizations - covers chart type selection, D3.js patterns, Recharts usage, dashboard design principles, and data storytelling techniques for analytics-reporter and finance-tracker agents.
Skill Details
Repository Files
1 file in this skill directory
name: data-visualization-techniques description: This skill should be used when creating charts, graphs, dashboards, or data visualizations - covers chart type selection, D3.js patterns, Recharts usage, dashboard design principles, and data storytelling techniques for analytics-reporter and finance-tracker agents.
Data Visualization Techniques
Overview
Transform data into clear, actionable visualizations. Choose the right chart types, design effective dashboards, and tell compelling data stories. Core principle: Visualizations exist to answer questions, not just display data.
When to Use
Use when:
- Building dashboards or analytics
- Presenting data to users
- Creating reports
- Visualizing trends or patterns
- Comparing metrics
- Showing relationships in data
Chart Type Selection
| Data Question | Chart Type | Use For |
|---|---|---|
| How does X change over time? | Line chart | Trends, time series |
| How do categories compare? | Bar chart | Comparing quantities |
| What's the composition? | Pie/Donut | Parts of whole (<6 categories) |
| What's the relationship? | Scatter plot | Correlation between variables |
| What's the distribution? | Histogram | Data spread and frequency |
| How does X compare to goal? | Progress bar | Goals and achievements |
| What's the trend + detail? | Area chart | Cumulative trends |
Quick Selection Guide
Time series data → Line chart
Comparing categories → Bar chart
Parts of whole → Donut chart (not pie)
2 variables correlation → Scatter plot
Distribution → Histogram
Progress to goal → Progress bar
Multiple series over time → Multi-line or stacked area
React Charting Libraries
Recharts (Recommended for Most Cases)
Why: Simple API, responsive, good defaults, TypeScript support
import {LineChart, Line, XAxis, YAxis, Tooltip, ResponsiveContainer} from 'recharts'
const data = [
{date: 'Jan', users: 400},
{date: 'Feb', users: 600},
{date: 'Mar', users: 800},
]
function GrowthChart() {
return (
<ResponsiveContainer width="100%" height={300}>
<LineChart data={data}>
<XAxis dataKey="date" />
<YAxis />
<Tooltip />
<Line type="monotone" dataKey="users" stroke="#3B82F6" />
</LineChart>
</ResponsiveContainer>
)
}
Chart.js (Alternative)
Why: More chart types, extensive documentation
D3.js (For Custom Visualizations)
Why: Maximum flexibility, complex visualizations When: Custom charts, advanced interactions Trade-off: Steeper learning curve
Dashboard Design Principles
Layout Hierarchy
┌─────────────────────────────────┐
│ KPI Cards (Big Numbers) │ ← Most important
├─────────────────────────────────┤
│ Primary Chart (Trend) │ ← Main insight
├─────────────────────────────────┤
│ Supporting Charts (Grid) │ ← Details
│ ┌──────┐ ┌──────┐ ┌──────┐ │
│ │Chart1│ │Chart2│ │Chart3│ │
│ └──────┘ └──────┘ └──────┘ │
└─────────────────────────────────┘
KPI Cards
function KPICard({title, value, change, trend}: KPIProps) {
return (
<Card>
<CardHeader>
<CardTitle className="text-sm text-muted-foreground">
{title}
</CardTitle>
</CardHeader>
<CardContent>
<div className="text-3xl font-bold">{value}</div>
<div className={trend === 'up' ? 'text-green-600' : 'text-red-600'}>
{change} from last period
</div>
</CardContent>
</Card>
)
}
<KPICard
title="Total Users"
value="12,547"
change="+2,341 (23%)"
trend="up"
/>
Color Palette for Data
Qualitative (categories):
#3B82F6 (blue)
#10B981 (green)
#F59E0B (amber)
#EF4444 (red)
#8B5CF6 (purple)
#EC4899 (pink)
Sequential (low to high):
#EFF6FF → #3B82F6 → #1E40AF (light blue to dark blue)
Diverging (negative to positive):
#EF4444 (red) → #F3F4F6 (gray) → #10B981 (green)
Accessibility
- Don't rely on color alone (use patterns, labels)
- Ensure sufficient contrast
- Provide text alternatives
- Support keyboard navigation
- Screen reader friendly alt text
Common Patterns
Time Series
const data = [
{month: 'Jan', revenue: 5000, expenses: 3000},
{month: 'Feb', revenue: 7000, expenses: 3500},
// ...
]
<ResponsiveContainer width="100%" height={300}>
<LineChart data={data}>
<XAxis dataKey="month" />
<YAxis />
<Tooltip />
<Line dataKey="revenue" stroke="#10B981" name="Revenue" />
<Line dataKey="expenses" stroke="#EF4444" name="Expenses" />
</LineChart>
</ResponsiveContainer>
Comparison Bar Chart
<BarChart data={data}>
<XAxis dataKey="category" />
<YAxis />
<Tooltip />
<Bar dataKey="value" fill="#3B82F6" />
</BarChart>
Progress Indicators
function ProgressBar({value, max, label}: ProgressProps) {
const percentage = (value / max) * 100
return (
<div>
<div className="flex justify-between mb-2">
<span>{label}</span>
<span>{value} / {max}</span>
</div>
<div className="w-full bg-gray-200 rounded-full h-2">
<div
className="bg-blue-600 h-2 rounded-full transition-all"
style={{width: `${percentage}%`}}
/>
</div>
</div>
)
}
Data Storyt[Ielling
Good visualizations:
- Answer a specific question
- Show comparison (vs last period, vs goal)
- Highlight insights (annotations, color)
- Provide context (What's normal? What's good?) Example:
❌ Just showing numbers:
"Revenue: $50,000"
✅ With context and insight:
"Revenue: $50,000 (+23% vs last month)
🎯 Hit Q4 goal 2 weeks early"
Resources
- Recharts: recharts.org
- shadcn/ui Chart components: ui.shadcn.com
- D3.js: d3js.org
- Color palette: tailwindcss.com/docs/customizing-colors Visualizations should clarify, not confuse. Choose the right chart, design for clarity, tell the story in the data.
Related Skills
Xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Analyzing Financial Statements
This skill calculates key financial ratios and metrics from financial statement data for investment analysis
Data Storytelling
Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.
Team Composition Analysis
This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.
Startup Financial Modeling
This skill should be used when the user asks to "create financial projections", "build a financial model", "forecast revenue", "calculate burn rate", "estimate runway", "model cash flow", or requests 3-5 year financial planning for a startup.
Kpi Dashboard Design
Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Startup Metrics Framework
This skill should be used when the user asks about "key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests guidance on tracking and optimizing business performance metrics.
