common-patterns

Codify reusable patterns for vue-chrts chart development with consistent data formatting and styling.

427|25|Updated Mar 16, 2025
One-click install
npx skills add https://github.com/dennisadriaans/vue-chrts --skill common-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: common-patterns
Source: https://github.com/dennisadriaans/vue-chrts/tree/main/.claude/skills/common-patterns
Command: npx skills add https://github.com/dennisadriaans/vue-chrts --skill common-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide provides standardized patterns and best practices to streamline chart development with vue-chrts. It helps teams maintain consistent data formatting, styling, and configuration across multiple chart types.

Core Features & Use Cases

  • The Categories Object Pattern: Define categories for each data key with a display name and color to ensure consistent legends and color usage.
  • Formatter Functions: Use xFormatter, yFormatter, and tooltipTitleFormatter to control axis labels and tooltips with correct data access patterns.
  • Common Styling Props: Leverage shared props like xLabel, yLabel, legendPosition, tooltip, and padding to achieve a cohesive look and behavior across charts.
  • Responsive & TypeScript Generics: Build responsive charts with type-safe data access using TypeScript generics.
  • Color Guidance & Performance: Follow recommended palettes and performance tips to keep dashboards fast and visually consistent.
  • Debugging & Best Practices: Follow a simple checklist to resolve common issues in data mapping, legends, and tooltips.

Quick Start

Apply the common-patterns guidelines to standardize categories, formatters, and styling across all charts.

Frequently Asked Questions about common-patterns

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

FAQPage Schema
How do I standardize data visualization styling and formatting across multiple vue-chrts projects?

Standardizing vue-chrts involves codifying reusable patterns for consistent data formatting, styling, and configuration. You achieve this by leveraging shared props like xLabel, yLabel, and legendPosition across multiple chart types and projects.

What is the categories object pattern for data visualization in vue-chrts?

The categories object pattern in vue-chrts defines categories for each data key using a display name and color. This pattern ensures consistent legends and color usage across all your data visualization components.

How do I format axis labels and tooltips in vue-chrts?

Format axis labels and tooltips in vue-chrts by using xFormatter, yFormatter, and tooltipTitleFormatter functions. These functions provide correct data access patterns to control visual output precisely.

Does vue-chrts support TypeScript generics for type-safe data access?

Yes, vue-chrts supports TypeScript generics to build responsive charts with type-safe data access. This ensures your data mapping remains strictly typed and reduces runtime errors across your dashboard components.

Why are my vue-chrts legends and tooltips displaying incorrect data?

Incorrect legends and tooltips in vue-chrts usually stem from improper data mapping or missing formatter functions. Following a standard debugging checklist resolves these common issues in data access patterns and category definitions.