Visualize data

From ahang1598/doubao-workbuddy-qwenwork-skills · View interactive version

Visualize data is an AI agent skill from the GitHub repository ahang1598/doubao-workbuddy-qwenwork-skills. Design, build, revise, or QA quantitative charts and figures. Use when an analytical answer needs visual judgment, whether for an inline answer, report, dashboard, notebook, or artifact.

How to use this skill

Skill file

Related Skills

Use $metric-diagnostics when the visual needs an explanation of a metric movement.

Use $build-report when the visual is part of a durable analytical report.

Data Visualization

Create quantitative visuals that are analytically sound, immediately readable, and polished enough to ship in a report, memo, slide, dashboard, notebook, widget, or HTML artifact. Treat charts as evidence for a takeaway. Redesign charts that are visually attractive but analytically weak, and revise charts that are technically correct but hard to interpret.

Runtime Delivery Routing

Whenever mode = work_mode is positively identified, regardless of surface, do not render with Data Analytics MCP chart or table widgets, do not call render_chart or render_table for inline delivery, and do not select a visible MCP artifact as the visual surface. This branch applies only after another workflow has already selected inline delivery; it does not choose inline over a report, dashboard, HTML, notebook, or other surface. For an already-selected inline visual, prefer native Work Mode rendering and read native-inline-visualizations.md to choose and invoke charts_widget_v2 or app_block. For one supported bar, line, pie, or scatter chart, treat charts_widget_v2 as directly surfaced in this runtime and emit its live genui content reference before considering fallback; do not self-declare it unavailable or search for it. The complete outer shape is genui{"charts_widget_v2":{"content":{...}}}: replace {...} with the real chart spec and emit the reference without Markdown backticks. The inner chart spec alone is not a response; do not print bare JSON, plain HTML, or a code fence. Keep app_block conditional on the host surfacing it. When a durable report or dashboard workflow automatically selects sites-app, shape visuals with the MCP artifact chart contract so the validated runtime can be exported to Sites, but skip the visible MCP render. If the Visualize plugin is installed, also consult and follow its current visualization guidance for native chart or app-block authoring, while keeping this skill's delivery gate and fallback order authoritative. If an emitted native visual is rejected or fails to render, use a reproducible static/Matplotlib chart that fits a non-MCP surface; use a compact table only if no visual renderer can be delivered. Use static or Matplotlib charting for this native-render failure fallback or when the user explicitly asks for Python, a static image/file, notebook-oriented output, or export. A successful Data Analytics MCP tool result is not delivery confirmation in Work Mode, so do not say a visual was plotted or rendered above unless the selected native or non-MCP surface actually rendered. MCP servers and other callable tools remain valid data sources.

Whenever the selected report or dashboard delivery surface is HTML, define each visual as a native chart in the canonical artifact.json accepted by validate_artifact, backed by reviewed snapshot.datasets rows and canonical source metadata. The portable builder in $build-report uses the shared artifact-app chart renderer and produces the semantic no-script/print/conversion representation. This applies to ChatGPT Desktop explicit HTML, Work Mode fallback HTML on any surface, and HTML used for PDF, Google Docs, or Google Slides conversion.

Outside positively identified Work Mode, keep the existing surface selection rules unchanged.

Chart Selection

Common surface forms should be named in the chart contract when the final surface is a report, dashboard, slide, notebook, widget, or HTML artifact.

| Data relationship | Best chart | Use it well |

|---|---|---|

| Trend over time or ordered axis | line | Show enough points to reveal shape; use area only when filled magnitude helps, and sparkline only in dense KPI cards |

| Composition over time | stackedArea | Use when parts should read as one total; switch to line when comparing component trajectories matters more |

| Comparison across categories | bar | Sort when order is not semantic; use horizontal bars for long labels; avoid redundant legends |

| Ranking or top-N | leaderboard | Keep it compact and single-measure; switch to ranked bar when comparison needs more chart context |

| Part-to-whole composition | stacked bar | Keep the denominator explicit; use pie only for a rough read with few slices |

| Distribution or spread | histogram | Use numeric bins that reveal shape; switch to boxPlot when comparing groups is the point |

| Distribution across groups | boxPlot | Use when median and spread matter more than full shape; switch to histogram when shape needs space |

| Relationship between two numeric variables | scatter | Use numeric x and y at a meaningful observation grain with enough distinct points to show a pattern; retain point labels, sample/volume fields, and one useful grouping candidate when safe |

| Dense two-dimensional pattern or cohort matrix | heatmap | Use for matrix shape or intensity; switch to scatter when point-level variation matters |

| Additive bridge from start to end | waterfall | Use only when drivers sum cleanly to the end value; otherwise use ranked bar |

| Ordered stage progression or drop-off | funnel | Use only for ordered single-series stages; prefer stage bar when funnel geometry distorts comparison |

Workflow

  1. Define the analytical question and one-sentence takeaway before choosing a chart. Identify the final surface, the intended comparison, and the context needed to make the visual honest.
  2. Choose the simplest defensible family and variant from Chart Selection. Coordinate with $build-dashboard or $build-report when the visual belongs to those artifacts, and use $validate-data when the supporting analysis needs validation.
  3. Write a compact chart contract before plot code, dashboard configuration, or renderer-specific implementation work. Include:
  1. Select the delivery path that matches the final surface.
  1. Build in this order: format, structure, color, then QA. Choose the family, variant, and delivery surface first; decide labels, annotations, benchmarks, and retained information second; choose palette policy and explicit colors last.
  2. Render or export the chart in its real context. For HTML reports and dashboards, inspect both the enhanced portable reader and the builder-generated semantic representation. For explicit standalone static output, save and inspect the image format the user requested.
  3. Inspect the visual in the final report, slide, dashboard, notebook, widget, or HTML layout. Revise before delivery when the chart, labels, color system, or container fails final-context QA.
  4. For shipped reports or dashboards with multiple visuals, maintain a compact chart map in notes or source material. Name the section, analytical question, selected family and chart type, fields, supported takeaway, palette policy, and delivery artifact, image path, or provenance source.

Standards

Selection Rules

Start from the analytical question and comparison the reader needs to make, not from a favorite chart type. Keep the top-level set small:

Concrete forms such as highlighted multi-series line, Likert, pie, Pareto, waterfall, faceted dot & interval, and cohort heatmap are variants inside these families, not peer families.

Surface And Implementation

Visual Design

Quality Bar

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.