accepted

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.

LineChartchart-apiwarningsdata-integrity

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:

  1. Hidden series — declare a normal series with hidden: true, reference it by id in the envelope. Series participates in compute but not in rendering.
  2. Envelope kind that skips the series layer entirely — already delivered as series-to-reference referencing a declared references entry, which has no rendered body by default if referencesStyle.show is 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, not dataSeriesCount.
  • meta.accessibleLabel counts visibleSeries — screen readers hear “Line chart, 2 series” not “Line chart, 4 series (2 hidden)”.
  • Palette allocation uses a visible-only counter: if series b is hidden between a and c, then c gets palette[1] (not palette[2]).
← All decisions