Visualization Prompt Templates

Discover 20+ machine-friendly visualization prompt templates structured for LLMs and AI agents.

Description: Plot a metric over time, with options for smoothing, seasonality, confidence bands, and annotations.

Example Prompt:

Create a line chart of {metric} from {start_date} to {end_date}, aggregated by {time_granularity}, include a 7-day rolling average and shaded 95% confidence interval.

id: timeseries_trends
description: "Plot a metric over time, with options for smoothing, seasonality, confidence bands, and annotations."
placeholders:
  - metric
  - start_date
  - end_date
  - time_granularity
template: |
  Create a line chart of {metric} from {start_date} to {end_date},
  aggregated by {time_granularity}, include a 7-day rolling average
  and shaded 95% confidence interval.

Category Comparisons

Description: Compare values across nominal categories (bars, lollipop, dot-plots).

Example Prompt:

Generate a horizontal bar chart showing the total {value} for each {category} sorted descending, label the top three bars with their exact numbers.

id: category_comparisons
description: "Compare values across nominal categories (bars, lollipop, dot-plots)."
placeholders:
  - value
  - category
template: |
  Generate a horizontal bar chart showing the total {value} for each {category}
  sorted descending, label the top three bars with their exact numbers.

Distribution & Density

Description: Visualize the distribution of a continuous variable using histograms, box-plots, violin plots, etc.

Example Prompt:

Produce a box-and-whisker plot of {variable} for each {group}, highlight outliers beyond 1.5× IQR, and overlay a violin shape for density.

id: distribution_density
description: "Visualize the distribution of a continuous variable (histogram, box-plot, violin plot)."
placeholders:
  - variable
  - group
template: |
  Produce a box-and-whisker plot of {variable} for each {group},
  highlight outliers beyond 1.5× IQR, and overlay a violin shape for density.

Correlation & Relationships

Description: Scatter plots with regression lines or facetting to show relationships.

Example Prompt:

Draw a scatter plot of {y_var} vs {x_var}, color-code points by {group}, and fit a linear regression line with R² annotation in the corner.

id: correlation_relationships
description: "Scatter plots with regression lines or facetting to show relationships."
placeholders:
  - x_var
  - y_var
  - group
template: |
  Draw a scatter plot of {y_var} vs {x_var}, color-code points by {group},
  and fit a linear regression line with R² annotation in the corner.

Geospatial Maps

Description: Choropleths, symbol maps, hex-bin maps for location-based data.

Example Prompt:

Create a choropleth map of {value} by {region_level} using the {geojson_source}, with a sequential color scale and tooltip showing region name and value.

id: geospatial_maps
description: "Choropleths, symbol maps, hex-bin maps for location-based data."
placeholders:
  - value
  - region_level
  - geojson_source
template: |
  Create a choropleth map of {value} by {region_level} using the {geojson_source},
  with a sequential color scale and tooltip showing region name and value.

Network & Flow

Description: Force-directed graphs, Sankey diagrams, arc diagrams for relational data.

Example Prompt:

Build a Sankey diagram showing flow from {source_field} to {target_field} weighted by {volume}, limit to the top 10 largest flows, and use steppy curves.

id: network_flow
description: "Force-directed graphs, Sankey diagrams, arc diagrams for relational data."
placeholders:
  - source_field
  - target_field
  - volume
template: |
  Build a Sankey diagram showing flow from {source_field} to {target_field}
  weighted by {volume}, limit to the top 10 largest flows, and use steppy curves.

Multi-Series Small Multiples

Description: Faceted charts to compare many sub-groups side by side.

Example Prompt:

Generate small multiples of {measure} over time for each {category}, arranged in a grid of 4 columns, sharing the same y-axis scale.

id: multi_series_small_multiples
description: "Faceted charts to compare many sub-groups side by side."
placeholders:
  - measure
  - category
template: |
  Generate small multiples of {measure} over time for each {category},
  arranged in a grid of 4 columns, sharing the same y-axis scale.

Dashboard Layouts

Description: Combine multiple chart types in a single view with linked interactions.

Example Prompt:

Assemble a dashboard with a time-series line on top, a category bar chart on the left, and a data table on the right. Link the bar chart’s selection to filter both table and line.

id: dashboard_layouts
description: "Combine multiple chart types in a single view with linked interactions."
placeholders:
  - time_series
  - bar_chart_category
  - data_table_fields
template: |
  Assemble a dashboard with a time-series line on top, a category bar chart on the left,
  and a data table on the right. Link the bar chart’s selection to filter both table and line.

Interactive Controls

Description: Charts with dropdowns, sliders, brush-and-zoom, tooltip details.

Example Prompt:

Create an interactive scatter plot with a slider to filter {date_field} range and tooltips showing {additional_fields} when hovering.

id: interactive_controls
description: "Charts with dropdowns, sliders, brush-and-zoom, and tooltip details."
placeholders:
  - date_field
  - additional_fields
template: |
  Create an interactive scatter plot with a slider to filter {date_field} range
  and tooltips showing {additional_fields} when hovering.

Annotated Storytelling

Description: Guided charts with callouts, annotations, and narrative text.

Example Prompt:

Produce a timeline of monthly {metric} with annotations on the three largest spikes describing possible causes, placed above the points.

id: annotated_storytelling
description: "Guided charts with callouts, annotations, and narrative text."
placeholders:
  - metric
  - spikes_count
template: |
  Produce a timeline of monthly {metric} with annotations on the {spikes_count} largest spikes
  describing possible causes, placed above the points.

Accessibility-First Charts

Description: Templates that include ARIA roles, high-contrast palettes, and keyboard navigation.

Example Prompt:

Generate an accessible bar chart with ARIA labels for each bar, use a color-blind-safe palette, and include alt-text describing the chart’s key insights.

id: accessibility_first
description: "Templates that include ARIA roles, high-contrast palettes, and keyboard navigation."
placeholders:
  - insights_summary
template: |
  Generate an accessible bar chart with ARIA labels for each bar,
  use a color-blind-safe palette, and include alt-text describing the chart’s {insights_summary}.

Custom Styling & Theming

Description: Apply branding tokens, CSS variables, or theme objects to visualizations.

Example Prompt:

Render a line chart of {metric} using the {brand_name} theme—primary color: {primary_hex}, font: {brand_font}, and axis ticks in light gray.

id: custom_styling_theming
description: "Apply branding tokens, CSS variables, or theme objects to visualizations."
placeholders:
  - metric
  - brand_name
  - primary_hex
  - brand_font
template: |
  Render a line chart of {metric} using the {brand_name} theme—
  primary color: {primary_hex}, font: {brand_font}, and axis ticks in light gray.

Visualization Workflow Recipes

Description: End-to-end pipelines from data ingestion through transformation to visualization and export.

Example Prompt:

Outline a pipeline that loads {dataset_source}, performs {transformations}, and outputs a dashboard with a bar chart of {measure} and a line chart of {metric}.

id: workflow_recipes
description: "End-to-end visualization pipelines: data ingestion → transform → viz → export."
placeholders:
  - dataset_source
  - transformations
  - measure
template: |
  Outline a pipeline that loads {dataset_source}, performs {transformations},
  and outputs a dashboard with a bar chart of {measure} and a line chart of {metric}.

Benchmark Comparisons

Description: Machine-readable performance benchmarks comparing libraries (fps, load times).

Example Prompt:

Compare rendering performance for {library_list} on {dataset_size} items, report frame rate and load time for each.

id: benchmark_comparisons
description: "Machine-readable performance benchmarks for charting libraries."
placeholders:
  - library_list
  - dataset_size
template: |
  Compare rendering performance for {library_list} on {dataset_size} items,
  report frame rate and load time for each.

Chart Grammar & Declarative Schemas

Description: Registry of chart types and their declarative specs (Vega-Lite, ggplot2 mappings).

Example Prompt:

Provide a Vega-Lite spec for a stacked area chart of {metric} over {time_field} broken down by {category}.

id: chart_grammar_schemas
description: "Registry of chart types and declarative specs for multiple grammars."
placeholders:
  - metric
  - time_field
  - category
template: |
  Provide a Vega-Lite spec for a stacked area chart of {metric} over {time_field}
  broken down by {category}.

Visualization Design Patterns

Description: Curated best practices for dashboard layouts, linked views, and small multiples.

Example Prompt:

Suggest a visualization design pattern for comparing {metrics_list} across {dimensions_list} in a single dashboard.

id: design_patterns
description: "Best practices for dashboard layouts, linked views, small multiples, etc."
placeholders:
  - metrics_list
  - dimensions_list
template: |
  Suggest a visualization design pattern for comparing {metrics_list} across
  {dimensions_list} in a single dashboard.

Component & Plugin Metadata

Description: Index of charting components and plugins for frameworks (React, Vue, etc.) with feature metadata.

Example Prompt:

List React chart components that support {feature_list}, including their package names and documentation URLs.

id: component_plugin_metadata
description: "Index of chart components and plugins for major frameworks with metadata."
placeholders:
  - feature_list
template: |
  List React chart components that support {feature_list}, including their
  package names and documentation URLs.

Dataset Metadata & Provenance

Description: Standardized schema for dataset descriptions: schema, units, source, update frequency.

Example Prompt:

Describe the schema, units, and provenance for the dataset at {dataset_url}, including last updated date.

id: dataset_metadata_provenance
description: "Standardized schema for dataset descriptions, units, source, update frequency."
placeholders:
  - dataset_url
template: |
  Describe the schema, units, and provenance for the dataset at {dataset_url},
  including last updated date.
Updated on