LibreOffice Calc Β· Charts and visualization Β· Intermediate
Create and Compare Grouped Sparklines in LibreOffice Calc
Create one in-cell chart per data row, share a meaningful vertical scale, and test blank and hidden values without changing the source data.
Documentation-qualified; original example arithmetic checked, native sparkline rendering and save/reopen pending Β· Editorial standards
A sparkline is a small chart inside one cell. Create several together when each row needs its own trend, then use a shared scale when readers must compare magnitudes across rows. For a title, labelled axes and a legend, use a full chart instead.
Sparklines were introduced in LibreOffice 7.4, as confirmed by The Document Foundation’s UI report. This exercise uses the free desktop Calc application and English menu names from Calc Guide 26.2 and online Help labelled 26.8, checked on 23 October 2026. Earlier versions can differ. The data, extrema and arithmetic below were independently checked; native creation, appearance, grouping and save/reopen were not executed for this article. There is no simulated screenshot.
Enter three comparable series
Create a sheet named Trends. Enter this original fictional weekly-unit fixture in A1:E4. Leave C4 genuinely empty: do not type the word βblankβ, a dash, zero or a formula returning an empty string.
| Team | Week 1 | Week 2 | Week 3 | Week 4 |
|---|---|---|---|---|
| North | 10 | 20 | 15 | 25 |
| South | 100 | 200 | 150 | 250 |
| West | 10 | 30 | 20 |
Enter Trend in F1; leave F2:F4 empty for the sparklines. Make column F comfortably wide and rows 2:4 equally tall. Do not merge the output cells. Keep the numbers visible beside their trends so readers can check exact values.
Use H1:J4 for checks:
| Row | H: Numeric count | I: Total | J: Final value |
|---|---|---|---|
| 2 | =COUNT(B2:E2) β 4 |
=SUM(B2:E2) β 70 |
=E2 β 25 |
| 3 | =COUNT(B3:E3) β 4 |
=SUM(B3:E3) β 700 |
=E3 β 250 |
| 4 | =COUNT(B4:E4) β 3 |
=SUM(B4:E4) β 60 |
=E4 β 20 |
South is exactly ten times North at every week. West has an unknown Week 2, not an observed zero. These two facts make misleading scale and missing-data choices easy to spot.
Create all three sparklines together
- Select B2:E4, excluding the team names and week headers.
- Choose Insert β Sparkline.
- Verify Input range is
$Trends.$B$2:$E$4and Output range is$Trends.$F$2:$F$4. - Set Type to Line, Display empty cells as to Gap, leave Right-to-left off, and enable Display hidden for the initial test.
- Set both Vertical minimum and Vertical maximum to Group. Enable Marker so the actual observations are easier to distinguish, then click OK.
Calc Guide 26.2’s sparkline instructions explain that creating multiple sparklines at once places them in one group. Three input rows need three output cells. F2 should use B2:E2, F3 B3:E3, and F4 B4:E4. The group shares display settings; it does not merge the three data series.
Check each source via right-click the sparkline β Sparklines β Edit Sparkline. Verify those ranges without changing them. To change shared display settings, use Sparklines β Edit Sparkline Group instead. Selecting one sparkline should highlight its group members, according to the guide.
Decide what the vertical scale means
The observed minimum across this fixture is 10 and maximum 250. With both bounds set to Group, all three trends use those group extrema. South occupies the high-value region; North and West remain near the lower end. The same height does not mean βbest teamβ: all rows here use the same units, and the chart shows quantity, not a performance score.
Now open Edit Sparkline Group from F2 and change both bounds to Individual. North’s bounds are 10β25; South’s are 100β250. Their normalized patterns coincide because every South value is ten times the matching North value. Similar shapes therefore do not mean equal quantities.
Restore Group bounds for magnitude comparison. If you want a stable zero baseline, choose Custom minimum 0 and Custom maximum 250 for this exercise. Unlike automatic Group bounds, those fixed numbers will not express a new maximum of 300 unless you revise them. Sparkline Help distinguishes Individual, Group and Custom scaling.
Keep Line for this lesson. A Column sparkline can compare individual weekly amounts, while Stacked (win/loss) emphasizes sign rather than magnitude. With this all-positive fixture, equal positive win/loss bars would discard the tenfold difference you are trying to compare.
Test the missing value without inventing an observation
With F2:F4 still grouped, edit the group’s empty-cell setting and inspect West:
- Gap: the missing Week 2 breaks the line. Week 3 remains 30 and Week 4 remains 20.
- Zero: the display treats the missing position as zero. This is a display assumption, not evidence that West recorded zero units.
- Span: a line connects the known Week 1 value 10 to Week 3 value 30 across the missing position. It does not supply a measured Week 2 value.
These modes are documented in Sparkline Help. After each change, inspect C4 and the checks: C4 should remain empty, West’s count 3 and total 60. Those source checks are independent of how the graphic looks. Return the setting to Gap for the saved exercise.
Test hidden data separately
Hide column C, the Week 2 source column, using the column-header context menu. With Display hidden enabled, the sparkline is configured to include hidden source values. Turn that option off in Edit Sparkline Group and inspect North and South: their Week 2 observations, 20 and 200, are now excluded from the graphic.
The visible-source sequences for this comparison are North 10, 15, 25 and South 100, 150, 250. Their original source totals remain 70 and 700; hiding a column and changing a sparkline setting are not edits to its numbers. The highest and lowest values are still present, so this test isolates hidden-point inclusion rather than relying on an axis change. Unhide C and restore Display hidden before saving.
Separate one trend only when that is intentional
If West needs independent formatting, select F4 and choose Format β Sparklines β Ungroup Sparklines. Its settings can then diverge; a later Group scale applies only within its current group, not automatically across all three rows.
To restore common formatting in this fixture, click F2 first, then Shift-click F4 to include all three output cells, and choose Format β Sparklines β Group Sparklines. Recheck the resulting group and restore both vertical bounds to Group. The grouping workflow in Calc Guide 24.2 explains the first-selected formatting source; Guide 26.2 documents the same commands.
Troubleshoot and save
- OK is unavailable: confirm the output has three cells for the three source rows, not a single F2 or four cells including the header.
- All trends look alike: inspect Individual versus Group bounds before assuming equal quantities.
- The trend is reversed: inspect Right-to-left and the source column order.
- A format change affects other rows: they share a sparkline group. Use group editing deliberately, or ungroup the intended cell first.
- The chart is too small: enlarge column F or row height rather than merge output cells. The guide warns that merged sparkline cells lose formatting access until unmerged.
Save as an ODS workbook, close it, and reopen it. Verify the three source ranges, group membership, Gap setting, hidden-data setting and Group axis bounds, plus the counts and totals above. This final acceptance step remains for you to perform; no cross-application export or native round-trip compatibility is claimed here.