跳到正文

第 15 课 · Charts and Dashboards

Charts and KPIs

Pick and build Sigma charts and KPI elements, set axes, colors and trellis panels, and avoid misleading scales, crowded pie charts and wrong aggregates.

A good chart answers one question faster than a table could. Sigma builds charts from the same tabular data as tables, so everything you learned about sources, filters and aggregates still applies. If a table number is wrong, a chart of it is wrong too, only prettier.

Chart types

Sigma's documentation (as of December 2026) lists these chart types: bar, line, KPI, area, scatter, combo, box, pie and donut, Sankey, funnel, gauge, waterfall, and region, point and geography maps. Choose by the question:

Question Start with
How do categories compare? Bar chart
How does a value change over time? Line chart
What is the number right now? KPI
Are two numbers related? Scatter plot
How is a value spread? Box chart
How did we get from start to end? Waterfall
How do quantities flow between stages? Sankey or funnel
Where does it happen? Map

The data visualization tutorial explains these ideas for any tool.

Build a chart

Create a chart element, choose its source (often a prepared parent table), then set its properties. You configure source columns for axis categories and metrics, and options such as color, trellis (a grid of small charts), tooltips, orientation and stacking. The available options depend on the chart type.

TEXT
Line chart
X-axis:  DateTrunc("month", [Order Date])
Y-axis:  Sum([Net Revenue])
Color:   [Region]

Aggregation in charts

The chart aggregates your data to the level of its axis and color. That is why the measure must be an aggregate. A chart of an average of ratios has the same trap you saw with tables. Use Sum([Profit]) / Sum([Revenue]) for margin.

SQL Stand-in: the data behind a monthly line chart

Press Run (or Ctrl + Enter) to see the result here.

Notice that North has no row for November. A line chart might connect points or leave a gap, depending on settings. Make sure readers can tell "zero" from "no data".

KPIs

A KPI element shows one headline number. It is only useful with context:

  • A comparison: last period, target or budget.
  • A time window: "month to date", not just "revenue".
  • A definition: what is included and excluded.
TEXT
Headline:     Net revenue, month to date
Comparison:   same days of last month
Note:         excludes refunds recorded after day 30

A gauge can show progress toward a target but uses a lot of space for one value. A KPI with a clear comparison is often more efficient.

Honest scales

  • Bar charts should start at zero, because readers compare bar length.
  • Line charts may zoom in, but say so and avoid exaggerating small changes.
  • Dual axes can suggest relationships that do not exist. Use them rarely and label both.
  • For time on the x-axis, keep the spacing even and truncate dates correctly.
JS Stand-in: a small bar chart drawn with text

Press Run (or Ctrl + Enter) to see the console output here.

No output.

With an axis from 370, the North bar is five times as long as the South bar, although the real difference is about 11 percent.

Pies and donuts

A pie works only for a few parts of a whole. With many slices or similar sizes, use a sorted bar chart. Never use a pie for values that do not add up to a meaningful whole, or for negative values.

Color, labels and tooltips

  • Use color to carry meaning, and keep the same color for the same category across the workbook.
  • Highlight one thing and keep the rest neutral.
  • Do not use color alone: add labels where possible.
  • Give charts titles that state the question or finding.
  • Use tooltips for extra detail, not for essential information, because not everyone hovers.

Too many categories

For hundreds of products, show the Top N, or let the user choose with a control. For a chart with many series, try trellis panels so each series gets its own small chart. Check whether the panels share a scale before readers compare them.

Maps

Maps are tempting but answer "where" better than "how much". For comparing values, a sorted bar chart is usually clearer. When you use a region map, think about whether to show totals or rates; big populations produce big totals.

AI explanations

Sigma offers an AI feature that summarizes a chart. Treat such text as a draft: check the numbers and the reasoning against the data, and never let a summary replace your own review.

Common mistake: using many chart types to make a dashboard look rich. Use the fewest forms that answer the questions well.

Check a chart before sharing it

Compare one point with a table that uses the same source and filters. Read the axis labels and units aloud. Then ask what a reader would conclude in five seconds, and whether the data supports that conclusion. If the latest period is incomplete, mark it or leave it out, because an unfinished month can look like a sharp fall.

Order and grouping in charts

Sorting changes how quickly a reader finds the answer. Sort bars by value unless the categories have a natural order, such as months or size bands. Keep natural orders intact, because a month axis sorted by revenue hides the trend. When you group small categories together as "Other", say what it contains, and check that "Other" does not become the largest bar. If it does, your grouping is hiding the story rather than simplifying it. Review the chart again when new categories appear, since the order and the colors may need an update.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Which chart suits revenue over twelve months?

    Lines show change over a continuous time axis.
  2. 2. Why should a bar chart's value axis start at zero?

    A truncated axis distorts the ratio between bars.
  3. 3. What makes a KPI useful?

    A number without context is hard to interpret.
  4. 4. When is a pie chart a poor choice?

    Angles of similar slices are hard to compare, so sorted bars work better.

Summary

  • Choose a chart from the question it must answer.
  • Charts aggregate to the axis level, so define measures carefully.
  • Give KPIs context and definitions.
  • Use honest scales, consistent colors and clear titles.
  • Limit categories with Top N, controls or trellis panels.

Next: Dashboard Design

你的学习进度保存在此浏览器中,无需账号。