Generate bar chart

Compare category values with proportional bars on a shared scale.

freeworks offlinenothing uploaded
ToolBar Chart Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Categories are assigned rectangular bars whose lengths are proportional to numeric values on a shared axis; grouped or stacked modes change how series occupy each category. Baselines and scale domains determine whether comparisons remain honest.

  • A zero baseline preserves proportional bar length; grouped and stacked layouts answer different questions.

Worked example

Monthly Sales
Generate a bar chart of monthly sales
Input
											Title: Monthly Sales
X axis: Month
Y axis: Revenue ($K)
Labels: ["Jan","Feb","Mar","Apr"]
Data: [45,62,58,71]
Horizontal: false
										
Output
												xychart-beta
    title "Monthly Sales"
    x-axis ["Jan", "Feb", "Mar", "Apr"]
    y-axis "Revenue ($K)"
    bar [45, 62, 58, 71]
											

When to use this

Reports, dashboards, and survey summaries use bar charts for category comparisons.

Edge cases

  • A truncated baseline exaggerates small differences.
  • Negative values require bars on both sides of zero.
  • Stacked totals hide individual series comparisons when segments share no baseline.