Files
leo-claude-mktplace/plugins/viz-platform/commands/chart.md
lmiranda b5d36865ee feat(plugins): add Visual Output headers to all other plugin commands
Add single-line visual headers to 66 command files across 10 plugins:
- clarity-assist (2 commands): 💬
- claude-config-maintainer (5 commands): ⚙️
- cmdb-assistant (11 commands): 🖥️
- code-sentinel (3 commands): 🔒
- contract-validator (5 commands): 
- data-platform (10 commands): 📊
- doc-guardian (5 commands): 📝
- git-flow (8 commands): 🔀
- pr-review (7 commands): 🔍
- viz-platform (10 commands): 🎨

Each command now displays a consistent header at execution start:
┌────────────────────────────────────────────────────────────────┐
│  [icon] PLUGIN-NAME · Command Description                       │
└────────────────────────────────────────────────────────────────┘

Addresses #275 (other plugin commands visual output)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:24:49 -05:00

2.6 KiB

description
description
Create a Plotly chart with theme integration

Create Chart

Visual Output

When executing this command, display the plugin header:

┌──────────────────────────────────────────────────────────────────┐
│  🎨 VIZ-PLATFORM · Chart Builder                                  │
└──────────────────────────────────────────────────────────────────┘

Then proceed with the chart creation.

Create a Plotly chart with automatic theme token application.

Usage

/chart {type}

Arguments

  • type (required): Chart type - one of: line, bar, scatter, pie, area, histogram, box, heatmap, sunburst, treemap

Examples

/chart line
/chart bar
/chart scatter
/chart pie

Tool Mapping

This command uses the chart_create MCP tool:

chart_create(
    chart_type="line",
    data_ref="df_sales",          # Reference to loaded DataFrame
    x="date",                      # X-axis column
    y="revenue",                   # Y-axis column
    color=None,                    # Optional: column for color grouping
    title="Sales Over Time",       # Optional: chart title
    theme=None                     # Optional: theme name to apply
)

Workflow

  1. User invokes: /chart line
  2. Agent asks: Which DataFrame to use? (list available with list_data from data-platform)
  3. Agent asks: Which columns for X and Y axes?
  4. Agent asks: Any grouping/color column?
  5. Agent creates: Chart with chart_create tool
  6. Agent returns: Plotly figure JSON ready for rendering

Chart Types

Type Best For
line Time series, trends
bar Comparisons, categories
scatter Correlations, distributions
pie Part-to-whole relationships
area Cumulative trends
histogram Frequency distributions
box Statistical distributions
heatmap Matrix correlations
sunburst Hierarchical data
treemap Hierarchical proportions

Theme Integration

Charts automatically inherit colors from the active theme:

  • Primary color for main data
  • Color palette for multi-series
  • Font family and sizes
  • Background colors

Override with explicit theme:

chart_create(chart_type="bar", ..., theme="my-dark-theme")

Output

Returns Plotly figure JSON that can be:

  • Rendered in a Dash app
  • Saved as HTML/PNG
  • Embedded in a layout component