blog-chart

Generate accessible inline SVG data visualization charts for blog posts.

1|Updated Dec 24, 2021
One-click install
npx skills add https://github.com/arthur-fontaine/arthurfontaine.fr --skill blog-chart-arthur-fontaine
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: blog-chart
Source: https://github.com/arthur-fontaine/arthurfontaine.fr/tree/main/.agents/skills/blog-chart
Command: npx skills add https://github.com/arthur-fontaine/arthurfontaine.fr --skill blog-chart-arthur-fontaine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Manually writing SVG charts for blog posts is error-prone and often produces graphics that break in dark mode, lack accessibility markup, or omit source attribution. This Skill generates dark-mode-compatible inline SVG charts with correct ARIA labeling and consistent styling. ## Core Features & Use Cases - Seven Chart Types: Supports horizontal bar, grouped bar, donut, line, lollipop, area, and radar charts selected by data pattern. - Deterministic CLI Renderer: A Python script converts a JSON chart spec into a complete figure with title, desc, aria-labelledby, and figcaption. - Platform-Aware Output: Automatically produces HTML or JSX/MDX markup with camelCase attributes for MDX-based blogs. - Use Case: While writing a blog post comparing quarterly signups across products, pass the data as JSON and receive a ready-to-embed accessible SVG figure with source attribution. ## Quick Start Ask the AI to generate a blog chart from your data, for example: create a horizontal bar chart showing Product A 420, Product B 315, Product C 180 with source attribution in MDX format.

Frequently Asked Questions about blog-chart

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an SVG chart for a blog post?▼

Create a JSON file with the chart type, title, data labels and values, and source metadata, then run the generate_chart_svg.py script with --input and --output flags. The script outputs a complete figure element containing an accessible inline SVG.

What chart types does the SVG chart generator support?▼

It supports seven chart types: horizontal bar, grouped bar, donut, line, lollipop, area, and radar. Choose based on the data pattern, such as donut for parts of a whole or line for trends over time.

Does the chart output work in MDX or JSX files?▼

Yes, pass --format mdx to the script and it converts attributes to JSX camelCase form, such as textAnchor, fontSize, and strokeWidth, and transforms style strings into JSX style objects.

How do SVG charts support dark mode?▼

Charts use fill="currentColor" for text and low-opacity currentColor strokes for grid lines, with a transparent background. A --chart-muted CSS variable switches between #4b5563 on light and #d1d5db on dark backgrounds via prefers-color-scheme.

Why does the grouped bar chart fail with dense data?▼

The fixed 560x380 viewBox limits bar width, so the renderer raises an error when too many groups or series make bars narrower than 2 pixels. Reduce the number of groups or series, or split the data into multiple charts.

What accessibility features are included in generated charts?▼

Every chart includes role="img", aria-labelledby referencing title and desc elements, a screen-reader description containing all data points and the source, and a semantic figcaption with source attribution.