Edilitics | Data to Decisions

Stacked Line Chart

Track how multiple measures accumulate over time with lines stacked on top of each other - best for the combined total and each measure's contribution.

A stacked line chart - also called a cumulative line chart - shows multiple measures over time where each line's value is added on top of the previous one, so the topmost line represents the running total of all measures combined. Drop one date or ordered categorical field into Column and two or more numeric fields into Row. Use it when both the cumulative total and each measure's individual contribution to that total matter across a time series.

When to Use

A stacked line chart answers two questions at once: how does the total change over time, and how does each measure contribute to that total at each point? It works when the measures are additive - they all share the same unit and the sum is meaningful. Revenue from three product lines, support tickets across four teams, user signups from five acquisition channels.

Non-bottom series are hard to read in isolation. Only the bottom series has a zero baseline. Every other series floats at the cumulative height of all series below it - its visual position encodes the total, not its own value. Viewers can see the shape of each series' trend, but comparing exact values between non-adjacent series requires the tooltip. If precise per-series comparison is the goal, use multiple Line Charts or a Grouped Bar instead.

Switch to a different chart when:

  • You have only one measure - use Line Chart
  • The measures are independent and should not be added - use multiple Line Charts side by side
  • You want the area between lines filled to emphasize volume - use Stacked Area
  • The question is about proportion rather than total - consider Stacked Area in 100% mode
  • Your dimension is categorical, not time-based - use Stacked Bar
ScenarioDimensionMeasures
Weekly revenue by product lineWeekSum of product A revenue, Sum of product B revenue, Sum of product C revenue
Daily active users by platformDateCount of web users, Count of mobile users, Count of desktop users
Monthly support tickets by teamMonthCount of team A tickets, Count of team B tickets, Count of team C tickets
Quarterly headcount by departmentQuarterCount of engineering, Count of sales, Count of operations
Weekly signups by acquisition channelWeekCount of organic, Count of paid, Count of referral

Required Inputs

FieldTypeCount
DimensionDate or Ordered CategoricalExactly 1
MeasureNumeric2 to 10

All measures must share the same unit for the stacked total to be interpretable.

For step-by-step build instructions, see Build Your First Chart.

Formatting Options

The Format tab unlocks after at least one field is assigned. Once your chart is rendering, use these controls to define how it looks and how viewers interact with it.

Style

Use the chart title to state what the combined total represents and what the individual lines break it down by. Viewers need to understand what they are looking at the total of before they read the individual series lines.

ControlWhat it does
Show Chart TitleShows or hides the title. The text is preserved when hidden so you can toggle it back without re-entering.
Enter Chart TitleTitle text. Maximum 50 characters.
Font familyFont applied to the title.
Font size5 to 30.
Bold / ItalicWeight and style.
AlignmentLeft, center, or right within the chart container.

Gradient Line Styles sets the color palette applied across all series lines. The first series receives a color near the start color; the last series receives a color near the end color; intermediate series are interpolated between them. Individual per-series color control is not available.

ControlWhat it does
Gradient Start ColorThe color assigned to the first (bottom) series line.
Gradient End ColorThe color assigned to the last (top) series line. Set Start and End to contrasting colors so that series are visually distinct, especially when many measures are stacked.

Symbol Styles controls whether data point markers appear on the lines and how they look. The same symbol type and size applies to all series - per-series symbol control is not available.

ControlWhat it does
Show SymbolsShows or hides the marker at each data point across all series. Turn off when the time series is dense and markers clutter the lines.
Symbol TypeThe marker shape across all series: Circle, Rectangle, Triangle, Diamond, Pin, Arrow, or None.
Symbol SizeDiameter of each marker, 0 to 20. Default is 7. Reduce for dense time series where markers from adjacent lines overlap.

Data labels on a stacked line chart print values at each data point on each series. With multiple overlapping series, labels from different lines will collide unless the data is very sparse. Use data labels only on charts with 2 to 3 measures and fewer than 10 time periods.

ControlWhat it does
Show Data LabelsShows or hides value labels at each data point.
Font familyFont applied to data labels.
Font sizeMaximum 18. Keep at 9 or 10 on stacked charts to reduce label collision.
Bold / Italic / ColorText styling.
PositionAlignment of the label relative to the data point. Top places the label above the point.
Number TypeDefault, Scientific, Decimal, or Percentage.
Display UnitNone, Thousand, Million, or Billion. Match to the Y-axis Display Unit.
Decimal Places0 to 6. Available when Number Type is not Default.

The legend is essential on a stacked line chart - without it, viewers cannot identify which line corresponds to which measure. Keep it visible and position it where it does not overlap the lines.

ControlWhat it does
Show LegendsShows or hides the legend. On by default.
Vertical positionTop, middle, or bottom alignment of the legend block.
Horizontal positionStart, center, or end alignment.
Show NameDefault: labels always visible. On Hover: labels appear only when viewer hovers the legend. Use Default on shared or exported dashboards.
OrientationVertical or Horizontal legend layout. Horizontal works best when measure names are short and there are 4 or fewer series.
Item GapSpacing between legend items.
Font SizeLegend label font size.
ColorLegend label text color.

Axes

The Y-axis on a stacked line represents the cumulative total at each time point - name it with the shared unit of all measures so viewers understand what the top line's height means.

Select X or Y before making changes. Settings apply to the selected axis only.

ControlWhat it does
Show Axis NameShows or hides the axis name label.
Axis name textLabel text. Maximum 20 characters. Defaults to the field name.
Font familyFont applied to the axis name.
Font size5 to 30.
Bold / ItalicWeight and style.
Offset (%)Distance between the axis name and the axis line. Increase if the name overlaps the axis labels.
AlignmentStart, center, or end along the axis.

Leave these at their defaults unless you are building a minimal dashboard layout.

Select X or Y before making changes.

ControlWhat it does
Show Axis LineShows or hides the axis line. Hiding it also hides ticks.
Line ColorColor of the axis line.
Line WidthThickness of the axis line, 0 to 5.
Line TypeSolid, Dashed, or Dotted.
Show TicksShows or hides tick marks on the axis line.
Tick ColorColor of the tick marks.
Tick LengthLength of the tick marks, 5 to 10.
Boundary GapWhen off, the lines start and end at the chart edges. Turn off for a clean edge-to-edge time series.

Select X or Y before making changes. Hiding axis labels also hides the axis name.

ControlWhat it does
Show Axis LabelShows or hides labels along the axis.
Font familyFont applied to axis labels.
Font sizeLabel font size.
Bold / Italic / ColorText styling.
RotationAngle of label text. Useful on X-axis when date labels are long and overlap.
Text caseTitle Case, Uppercase, or Lowercase. Available on the categorical axis (X) only.
Display UnitAuto, None, Thousand, Million, or Billion. Available on the value axis (Y) only. The Y-axis represents the cumulative total - set Display Unit to match the scale of that total, not individual series values.

Y-axis grid lines help viewers read cumulative values from the top line against the value scale. Keep them on.

Select X or Y before making changes.

ControlWhat it does
Show GridlinesShows or hides grid lines for the selected axis.
Grid ColorColor of the grid lines.
Left / Right / Top / BottomPlot area margins as a percentage. Increase Top when the topmost line's data labels are clipped. Increase Bottom when X-axis date labels overflow.

Interactivity

The tooltip is the most important interactivity control on a stacked line chart. Set Trigger to Axis - it shows all series values for the hovered time point in one pop-up, which is the only reliable way viewers can read exact values for non-bottom series.

ControlWhat it does
Show TooltipShows or hides the tooltip on hover. Keep on.
TriggerItem: tooltip shows data for the specific hovered line only. Axis: tooltip shows all series values for the hovered time point. Always use Axis on a stacked line chart.
PointerWhen Trigger is Axis: Line, Shadow, Cross, or None. Line draws a vertical rule at the hovered time point and is the clearest indicator on a time series.
Background ColorTooltip background color.
Headers / Values tabsSeparate styling for the time period label row (Headers) and the measure value rows (Values). The Values tab includes Number Type, Display Unit, and Decimal Places.

Keep animation on when presenting the chart for the first time - the progressive left-to-right draw reveals the accumulation over time. Turn it off on dashboards that auto-refresh.

ControlWhat it does
Enable AnimationTurns the draw animation on or off.
DurationHow long the animation runs, 0 to 3000ms. Default is 1000ms.
DelayTime before the animation starts after the chart loads, 0 to 2000ms.
Easing FunctionThe motion curve. Cubic Out (the default) gives a natural deceleration at the end of the draw.

Enable Data Zoom for time series with more than around 60 data points, or when viewers need to focus on a specific date range without changing the underlying query.

ControlWhat it does
Show Data ZoomShows or hides the zoom control.
Zoom TypeSlider: a draggable range bar below the chart. Inside: scroll-to-zoom on the plot area. Use Slider for dashboards.
Slider Size (px)Height of the slider bar, 10 to 100.
PositionPosition of the slider relative to the chart.
AlignmentAlignment of the slider control.
OrientationHorizontal for a stacked line chart - scrolls through the time axis.
Show Detail LabelShows the date or category values at the slider handles.
Background ColorSlider background.
Filler ColorColor of the selected range inside the slider.
Border ColorSlider border.
Handle ColorColor of the drag handles.
Brush SelectionEnables click-and-drag to zoom into a range.

Avoid Zoom Type "Inside" on dashboards that viewers scroll with a trackpad. Scroll events captured by the chart zoom the chart instead of scrolling the page.

Series focus is the most useful emphasis mode on a stacked line chart - it highlights one series at a time and dims the rest, letting viewers trace a single measure's path through the stack without losing it among adjacent lines.

ControlWhat it does
Show EmphasisEnables or disables the hover effect.
Focus TypeItem: highlights the hovered data point only. Series: highlights all points in the hovered series and dims all others - use this on a stacked line chart with more than 3 series. None: no visual change on hover.
Enable ScaleScales the hovered marker slightly larger.
Scale SizeHow much the marker scales. Keep at 1.2 or below.

Enable the Toolbox when viewers need to export the chart or inspect the exact values behind each series at a given time point.

ControlWhat it does
Show ToolboxShows or hides the toolbox icon bar.
Save as ImageAdds a download icon that saves the chart as a PNG.
Data ViewAdds an icon that opens the underlying data table in the chart area.

Best Practices

Only stack measures in the same unit. Adding revenue to headcount produces a top line that represents a meaningless number. All measures must share the same unit so the cumulative total the topmost line represents is interpretable.

Always use Axis tooltip trigger. Non-bottom series float at the cumulative height of all series below them - their visual position does not directly encode their own value. The tooltip is the only reliable way to read exact values for these series. Keep it on and set Trigger to Axis.

Keep measure count at 4 or fewer. Beyond 4 series, lines stack close together and the space between adjacent lines becomes too narrow to read. Series in the middle of the stack are especially hard to trace. Pre-aggregate minor series into an "Other" category in Transform if you have more than 4 measures.

Put the most important or most stable series at the bottom. The bottom series is the most readable because it has a zero baseline. Place the series that viewers most need to read precisely at the bottom. Place volatile or secondary series higher in the stack where they are read primarily through the tooltip.

Resolve null values before publishing - they distort every series above the gap. A null in one series does not just break that series' line; because every series above it stacks on the cumulative value below, a null shifts the visual position of all series stacked on top of it at that time point. The builder shows a null value prompt automatically - choose to filter, zero-fill, or fix the source data so the stack stays consistent across the full time range.

Use Series focus in Emphasis. With multiple stacked lines, hovering a single data point does not make it obvious which series you have selected. Series focus highlights the entire selected line and dims the others - much easier to trace across time.

FAQs

Need help? Email support@edilitics.com with your workspace, job ID, and context. We reply within one business day.

Last updated on

On this page