Hidden series participate in x/y-domain inference and always emit an `[extends-*]` warning
`series[].hidden: true` suppresses rendering but keeps the series in domain inference, palette skipping, and envelope targetability. When a hidden series widens the domain, `[hidden.extends-x-domain]` / `[hidden.extends-y-domain]` always fires — consumers filter by warning code if the behaviour is intentional.
Context
The series-to-reference envelope kind needs a way to reference a bound
that isn’t drawn as a visible series (e.g. the equality diagonal in a
Lorenz curve). Two patterns considered:
- Hidden series — declare a normal series with
hidden: true, reference it by id in the envelope. Series participates in compute but not in rendering. - Envelope kind that skips the series layer entirely — already
delivered as
series-to-referencereferencing a declaredreferencesentry, which has no rendered body by default ifreferencesStyle.showis false.
We ship both — option 2 is the canonical single-source-of-truth for Lorenz; option 1 exists for scenarios where the hidden bound is not a straight line.
Decision
hidden: true semantics locked as:
| Concern | Behaviour |
|---|---|
| Point validation | Runs normally — [series.dropped-points] fires |
| X-domain inference | Participates — [hidden.extends-x-domain] always fires when widened |
| Y-domain inference | Participates — [hidden.extends-y-domain] always fires when widened |
| Palette allocation | Skipped — visible series still get palette[0..] densely |
| Series rendering | Suppressed — no path, markers, or hover |
| Trendline | Not computed even if trendline: true |
| End label + legend | Excluded |
meta.totalSeries | Counted |
meta.dataSeries | Counted (has ≥1 valid point) |
meta.visibleSeries | Not counted |
highlightSeries → hidden id | Ignored + [highlight.hidden-target] warning |
| Envelope targetability | Yes — the canonical pattern for series-pair |
The [hidden.extends-*-domain] warning always fires when a hidden
series widens the domain — no suppression flag. Rationale: hidden series
referenced by one envelope can silently squash another. Over-warning is
cheaper than silent data loss. Consumers who expect the extension filter
by warning code — the [code] bracket prefix is designed for exactly
this.
Consequences
- All-hidden charts fall through to empty-state (rather than rendering
axes with no data). The empty-state gate checks
visibleSeriesCount, notdataSeriesCount. meta.accessibleLabelcountsvisibleSeries— screen readers hear “Line chart, 2 series” not “Line chart, 4 series (2 hidden)”.- Palette allocation uses a visible-only counter: if series
bis hidden betweenaandc, thencgetspalette[1](notpalette[2]).