← Back to the catalog

Skill · Version 1.0.0

Chart library integration

Fits charts into the existing frontend stack with consistent themes, responsive sizing and deliberate resource cleanup.

chart-library-integration

See how it helps

When is it useful?

Use when charts need to fit your application without duplicate libraries or lifecycle leaks.

What does it help you do?

  • Reuses the existing chart library with narrowly scoped imports.
  • Connects resizing and cleanup to component mounting and unmounting.
  • Aligns palettes, typography and localized values with design tokens.

Try asking this

Add a responsive revenue chart using our installed library and verify repeated navigation releases resources. Resize the chart, switch theme and reopen the page repeatedly. Labels should remain readable and disposed charts must release observers and event listeners.

Detailed documentation

Read the skill’s original instructions, examples and checks in their authored language.

Details…Show less

Chart Library Integration

Use this skill when building or extending charts using the project's established charting library or selecting a library when none exists yet.

Adapt to the Project's Ecosystem First

  1. Inspect Existing Dependencies Before Introducing a New Library:
    • Check package.json and existing dashboard components first. Do not bundle a second heavy charting library alongside an existing one without clear architectural justification.
    • Apply library-specific best practices:
      • Apache ECharts: Use tree-shakable modular imports (echarts/core, specific chart/component modules), bind ResizeObserver to chart.resize(), call chart.dispose() on unmount, and use dataset + dataZoom cleanly.
      • Recharts / Visx: Memoize data arrays and custom tooltip/tick components so parent state updates do not trigger full SVG re-mounts; disable initial mount animations when updating high-frequency live data.
      • Chart.js: Register only required controllers/scales/plugins (Chart.register(...)), provide explicit container aspect-ratio/height wrappers so resize loops cannot occur, and destroy instances on unmount.
      • Observable Plot / Vega-Lite: Use declarative mark composition and explicit scale/channel definitions with responsive width bindings.

Design System Token & Theme Alignment

  • Bind Colors, Typography, and Spacing to Design Tokens:
    • Coordinate with the design system and UI/UX designer so chart axes, gridlines, tooltip surfaces, font families, and categorical/sequential/diverging palettes pull from semantic theme tokens (supporting both light and dark modes).
    • Keep gridlines subtle and non-competing (low-opacity neutral stroke) so data marks carry the highest visual prominence (Tufte's data-ink ratio).
  • Consistent Number, Currency & Date Formatting:
    • Format axis ticks with compact notation ($1.2M, 45k) while showing exact formatted values ($1,245,890.00) in tooltips and tables using locale-aware Intl.NumberFormat and Intl.DateTimeFormat.

Checklist

  • Does the implementation reuse the project's existing charting library and tree-shake unused modules?
  • Are chart instances, event listeners, and ResizeObserver hooks properly disposed on unmount?
  • Do colors, fonts, gridlines, and tooltips adapt cleanly to the project's light and dark design tokens?
  • Do axis ticks use concise locale-aware formatting while tooltips and tables expose exact values?

Included files 1

  • SKILL.md

About this skill package

chart-library-integration

chart-library-integration: Turn data into readable, interactive charts and dashboards with correct metrics, accessible views and usable large datasets.

Details…Show less

chart-library-integration

chart-library-integration: Turn data into readable, interactive charts and dashboards with correct metrics, accessible views and usable large datasets.

Includes the complete skill and its supporting files (1 files). The exact authored scope is preserved below.

Original skill description (source language)

Use when integrating and configuring existing project charting libraries (ECharts, Recharts, Visx, Chart.js, Vega-Lite, Observable Plot) with design tokens, theming, and accessible defaults.

Install the skill, review its source and trust settings, then enable it for the relevant project or agent.

Requirements

  • Orqestria installed on your computer.