Skip to content
Tutorials Center
My learning

Topics

Lesson 21 of 31 ยท Data Preparation and Design

Storytelling with Charts

Turn a correct chart into a clear one: write message titles, annotate, cut clutter, use small multiples with shared scales, and lay out dashboards well.

A chart can be technically correct and still fail, because the reader has to work out what to look at. Storytelling is the craft of removing that work. You decide what the one important thing is, and then every choice (title, color, labels, order, layout) either helps the reader see it or gets out of the way.

This lesson is about design decisions that apply equally to Plotly, Bokeh and Altair. The libraries' own calls (titles, annotations, subplots, layers) appear as read-only snippets, because they need Python and a browser display. The runnable examples are stand-ins: small HTML pages that draw SVG by hand, so you can see a cluttered chart and a clear chart built from the same numbers, side by side. If you need the building blocks first, read How a Chart Works Inside and Color, Labels and Accessibility.

Start with the sentence

Before you open any library, write the finding in one sentence: "Free-plan sign-ups dropped by about a third after the price change." If you cannot write it, you are not ready to chart; you are still exploring, which is fine, but an exploration chart and a presentation chart are different jobs.

The sentence becomes the title. A topic title ("Monthly sign-ups") names the data and leaves the reader to find the point. A message title ("Free-plan sign-ups dropped 30% in September") tells them what to see and lets them check it against the picture. Put the details (units, period, source) in a smaller subtitle.

Python
import plotly.express as px

fig = px.line(df, x="month", y="signups", color="plan",
              title="Free-plan sign-ups dropped 30% in September")
fig.update_layout(title_subtitle_text="Monthly sign-ups by plan")

Read-only. In Altair, alt.Title("...", subtitle="...") sets both; in Bokeh, set figure(title=...) and add a second Title for the subtitle.

The story process

flowchart LR
    A["Find the<br/>one message"] --> B["Choose the<br/>simplest chart"]
    B --> C["Remove clutter"]
    C --> D["Emphasize<br/>the message"]
    D --> E["Annotate and<br/>write the title"]
    E --> F["Check scales<br/>and honesty"]

Most of the work is subtraction: clutter goes first, then emphasis is added.

Reduce clutter

Every element on a chart costs attention. Keep what carries information, and quiet or remove the rest.

  • Gridlines: light gray, few, or none if the values are labeled. Heavy black grids compete with the data.
  • Borders and backgrounds: drop chart frames, shadows and 3D effects.
  • Markers: a marker on every point of a long line adds noise. Mark only the points you discuss.
  • Legends: replace with direct labels when you have fewer than about six series.
  • Tick labels: show every third month, not all twelve, if the axis is crowded.
  • Redundant ink: if bars have value labels, the y-axis can go.

Plotly's templates (template="simple_white") and Altair's configure_view(stroke=None) and configure_axis(grid=False) strip many of these defaults at once.

Emphasize with contrast

Make one thing stand out, and push the rest back. Gray is the storyteller's best color: draw the context series in light gray and the subject in one strong color. The eye goes to the only colored thing without being told.

Python
colors = {"Free": "#c2410c", "Pro": "#9aa0a6", "Team": "#9aa0a6"}
fig = px.line(df, x="month", y="signups", color="plan",
              color_discrete_map=colors)

Read-only Plotly. Altair uses alt.condition(...) or a scale with domain and range to the same effect.

Annotate where the reader looks

An annotation is a short sentence placed on the chart at the exact spot that matters: an event line, a callout on a peak, a shaded period. It saves the reader from flipping to a footnote. Keep annotations short and let them point to the data.

Python
fig.add_vline(x="Sep", line_dash="dash", annotation_text="New price starts")

Read-only. In Altair, add a layer: a mark_rule for the line and a mark_text for the words. In Bokeh, use a Span and a Label.

Before and after

The two charts below use the same twelve months of data. The first is typical default output: a generic title, a heavy grid, a marker on every point, three bright colors and a legend off to the side. The second states its message, grays out the context and labels the lines directly.

Same data, cluttered versus clear

Count what changed: the title now says something, the grid went from fifteen dark lines to three pale ones, the markers disappeared, two series turned gray, and the legend became labels at the line ends. Nothing was added except an annotation, yet the second chart takes two seconds to read.

Notice also that the y-axis still starts at zero in both. Emphasis must never come from bending the scale; see Testing Charts and Common Pitfalls.

Small multiples and consistent scales

When one chart holds too many series, split it into a grid of small charts, one per group, all with the same structure. These small multiples let the reader compare shapes without decoding colors. The one rule that makes or breaks them is the scale. If each panel picks its own y-axis range, a tiny series and a huge series look the same size, and every panel looks like a dramatic trend.

Independent scales versus one shared scale

In the top row, the Team line (peaking at 23) fills its panel as much as the Free line (peaking at 130). In the bottom row the Team line is rightly small. Independent scales are sometimes useful, when you care about each shape and not the size, but then label each panel's range, as the "max" text does here. In the libraries, shared axes are the default for faceted charts in Altair and for px facets (use matches=None in Plotly, or resolve_scale(y="independent") in Altair, to opt out). Read Layering, Faceting and Concatenation for the details.

Dashboard layout

A dashboard is several charts competing for one pair of eyes, so layout does the storytelling.

  • Top left is read first. Put the headline numbers (KPI cards) there and the detail below.
  • Group related charts and give each group a heading. Align edges so the page reads as a grid.
  • One idea per chart. If a chart needs a paragraph to explain, split it.
  • Be consistent. The same measure always has the same color and the same unit across every chart, and the same date range applies unless a chart says otherwise.
  • Limit filters to those people actually use. Every control is something to understand.
  • Show the state. When a filter is active, say so in text, so a screenshot still tells the truth.

A Dash page (see Dashboards with Dash and Callbacks) or a Bokeh server app gives you the layout containers; the discipline is up to you. You will put this together in Project: Sales Dashboard.

What is real and what is the stand-in

  • Real, read-only: the Plotly, Altair and Bokeh snippets for titles, color maps, annotations and facets.
  • Stand-in: the HTML pages. They draw plain SVG with JavaScript so you can see the design differences in the browser. They do not use any charting library, and real libraries add interactivity (hover, zoom) that these pictures lack.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which title follows the 'title as message' advice?

    A message title states the finding so the reader knows what to look for. The others only name the data.
  2. 2. You want the reader to focus on one series among five. What is the best first step?

    Muting the context and coloring only the subject lets the eye land on the one thing that matters.
  3. 3. A small-multiples grid gives every panel its own y-axis range. What is the risk?

    Independent scales stretch each series to fill its panel. Use one shared scale for comparison, or label each range clearly if you choose independent ones.
  4. 4. Where should the most important numbers on a dashboard go?

    Readers scan from the top left in left-to-right languages, so headline numbers go there and details follow.

Summary

  • Write the finding as one sentence first; use a message title and put details in a subtitle.
  • Remove clutter before adding anything: pale grids, no frames, fewer markers, direct labels instead of legends.
  • Emphasize with gray plus one strong color, and annotate at the spot that matters.
  • Use small multiples with shared scales when comparing sizes; label the range when scales are independent.
  • Lay out dashboards in groups with the key numbers top left, consistent colors and units, and few filters.
  • The library snippets are read-only here; the SVG stand-ins show the same design changes with hand-drawn charts.

Next: Large Datasets and Performance.