charting

Full-stack data visualization and charting intelligence. This skill should be used when the user asks to "create a chart", "visualize this data", "build a dashboard", "plot this", "graph these metrics", "show me a chart of", "make a bar chart", "create a line graph", "build a heatmap", or needs help choosing the right chart type, selecting a charting library, or engineering the data pipeline from raw database state to rendered visualization. Covers chart selection, data transformation, library choice by scale, performance optimization, and accessibility.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "charting" with this command: npx skills add b-open-io/prompts/b-open-io-prompts-charting

Charting Intelligence & Data-to-Viz Pipeline Engineering

Enable any agent to (1) instantly identify the exact chart needed from raw data, (2) generate the precise path of queries/transforms to materialize that chart, and (3) evaluate and choose the optimal charting library/stack based on performance, scale, and interactivity requirements.

This is not "just call a library" — it is full-stack visualization strategy.

1. Core Decision Framework — Choosing the Chart That Fits the Data AND the Story

Before any code runs, answer these questions in order:

What is the goal of the viewer?

GoalChart Type
Compare valuesBar/Column (grouped or stacked)
Show trend over timeLine or Area
Show distribution / spreadHistogram, Box Plot, Violin
Show relationship / correlationScatter, Bubble, Heatmap
Show composition / parts-of-wholeStacked Bar or Area (never pie if >5 slices)
Show hierarchy / flowTreemap, Sunburst, Sankey
Show geographic patternChoropleth or Symbol Map

How many variables and what types?

VariablesChart
1 numeric, unorderedHistogram / Density
1 numeric + timeLine
1 categorical + 1 numericBar
2 numericScatter
1 categorical + time seriesGrouped or Stacked Line/Area
Many-to-many relationshipsHeatmap or Parallel Coordinates

Audience & Context Check

AudienceApproach
Executive dashboardBig numbers + simple bars/lines, zero clutter
Analyst/explorerInteractive tooltips, zoom, hover details, multiple linked views
MobileHorizontal bars, large text, minimal colors
AccessibilityHigh contrast, patterns instead of color-only, alt-text descriptions

Rule of Thumb Table

Data SituationBest Chart (first choice)Avoid
>5 categoriesBar (horizontal)Pie
Time series >20 pointsLineColumn
Correlation between 2 measuresScatterLine (unless ordered)
Parts of whole >5 slicesStacked Bar or TreemapPie/Donut
Outliers or distribution shapeBox + ViolinBar
Flow between stagesSankeyAnything else

2. The Data Pipeline Engine

Most databases do NOT have the exact aggregation ready. Auto-generate the full pipeline:

Step A — Inventory

  • Scan schema or sample 100 rows — detect column types, null rates, cardinality
  • Flag missing aggregations (e.g., "no daily_sales_by_region view exists")

Step B — Required Transformations

Auto-generate SQL or pandas code for:

  • Joins needed?
  • GROUP BY + SUM/AVG/COUNT?
  • Window functions for running totals or YoY?
  • Binning (e.g., age into decades)?
  • Pivot/unpivot?
  • Outlier flagging or imputation?

Step C — Materialization Strategy

ScaleStrategy
One-off (<10k rows)Run query on-the-fly
MediumCreate materialized view or cached table
Large/Real-timePre-aggregate in Spark/DuckDB, incremental refresh
ExtremeStream + windowed aggregates (Flink/Kafka)

Step D — Validation

  • Run a tiny sample query first — confirm the shape matches the chosen chart type
  • If not, loop back and adjust aggregation

Example

User says "show monthly revenue by product category":

"I need: LEFT JOIN orders -> products -> categories; GROUP BY month, category; SUM(revenue). No view exists -> I will create temp table or run inline. Chart type: Stacked Area. Library recommendation below."

3. Library Selection Matrix

Always output the performance trade-off and recommended stack.

Scale / RequirementRecommended LibraryWhyFallback
<10k points, simple web dashboardChart.js or Recharts<10 ms render, ~60 KB bundleN/A
10k-500k points, interactiveApache ECharts or Plotly.jsCanvas + WebGL, 60 fps on 100k pointsD3 (slower)
500k-10M+ points, real-timeLightningChart or Highcharts Stock + WebGLGPU accelerated, <50 ms at 5M pointsAnything SVG-based fails
Python backend + webPlotly Dash or BokehServer-side render + client streamingMatplotlib (static only)
Python notebook explorationSeaborn + PlotlyInstant, beautiful defaults--
Extremely large / streamingDuckDB + Observable Plot or PerspectiveIn-memory columnar, sub-second on billions--
No JavaScript (PDF reports)Matplotlib + WeasyPrint or ReportLabPure Python, vector output--

Optimization Rules (apply automatically)

  • Downsample for overview, show full detail on zoom (ECharts built-in)
  • Use Canvas instead of SVG above ~5k elements
  • Pre-aggregate at DB level whenever possible (biggest single win)
  • Lazy load charts below the fold
  • Bundle size: tree-shake everything except the one chart type you need
  • GPU vs CPU: if >100k points and user needs pan/zoom, force WebGL path

4. Full Workflow

  1. Parse intent — identify required chart type from user request
  2. Schema scan — detect column types, cardinality, row estimates
  3. Decision framework — output chart recommendation + rationale
  4. Generate transforms — exact SQL/pandas/transform code needed
  5. Choose library — select by performance tier based on row estimate
  6. Emit deliverables:
    • Chart spec (JSON for the library or React component)
    • SQL/transform script
    • Performance warning or confirmation
    • Accessibility note + alt-text template

5. Advanced Capabilities

  • "Show me what I should be charting but aren't" — auto-correlation scan + suggested visuals
  • "Optimize this dashboard for 10x speed" — rewrite query + switch library
  • "Make this mobile-first" — auto-switch to horizontal bars + simplify
  • Color-blind & accessibility mode — toggle patterns, high contrast
  • Export — SVG/PNG/PDF with embedded data table

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

geo-optimizer

No summary provided by upstream source.

Repository SourceNeeds Review
General

npm-publish

No summary provided by upstream source.

Repository SourceNeeds Review
General

statusline-setup

No summary provided by upstream source.

Repository SourceNeeds Review
General

x-tweet-fetch

No summary provided by upstream source.

Repository SourceNeeds Review