Sprint 1 - viz-platform Plugin completed (13/13 issues): - Commands: 7 files (initial-setup, chart, dashboard, theme, theme-new, theme-css, component) - Agents: 3 files (theme-setup, layout-builder, component-check) - Documentation: README.md, claude-md-integration.md - Tests: 94 tests passing (68-99% coverage) - CHANGELOG updated with completion status Closes: #178, #179, #180, #181, #182 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.0 KiB
2.0 KiB
description
| description |
|---|
| Create a Plotly chart with theme integration |
Create Chart
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
- User invokes:
/chart line - Agent asks: Which DataFrame to use? (list available with
list_datafrom data-platform) - Agent asks: Which columns for X and Y axes?
- Agent asks: Any grouping/color column?
- Agent creates: Chart with
chart_createtool - 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