@@ -49,20 +49,14 @@ describe('showcase coverage (introspected against the spec)', () => {
4949 } ) ;
5050
5151 it ( 'covers every distinctly-renderable ChartType' , ( ) => {
52- // The Chart Gallery demonstrates only chart families the renderer draws
53- // DISTINCTLY — advertising a type that renders as something else (a "sankey"
54- // that draws bars) is worse than not offering it. The families below have no
55- // distinct renderer yet and fall back to a near-relative, so the showcase
56- // intentionally does not duplicate them: grouped/stacked/bi-polar bars (→bar),
57- // stacked-area (→area), step-line/spline (→line), pyramid (→funnel), bubble
58- // (→scatter), and the dial-less performance variants kpi/gauge/solid-gauge/
59- // bullet (→ the same KPI value as `metric`). Follow-up: trim these from
60- // `ChartTypeSchema` so spec ↔ renderer ↔ showcase stay in lockstep.
61- const FALLBACK_ONLY = new Set ( [
62- 'grouped-bar' , 'stacked-bar' , 'bi-polar-bar' , 'stacked-area' , 'step-line' ,
63- 'spline' , 'pyramid' , 'bubble' , 'kpi' , 'gauge' , 'solid-gauge' , 'bullet' ,
64- ] ) ;
65- const expected = enumValues ( ui . ChartTypeSchema ) . filter ( ( t ) => ! FALLBACK_ONLY . has ( t ) ) ;
52+ // The fallback-only VARIANTS (grouped/stacked/bi-polar bar, stacked-area,
53+ // step-line, spline, pyramid, bubble) were removed from `ChartTypeSchema`, so
54+ // the enum now lists only families that render. The remaining exception is
55+ // the performance group: `metric` represents the single-value KPI, and
56+ // `kpi`/`gauge`/`solid-gauge`/`bullet` render the SAME value today (no dial),
57+ // so the gallery demonstrates `metric` once rather than duplicating them.
58+ const SAME_AS_METRIC = new Set ( [ 'kpi' , 'gauge' , 'solid-gauge' , 'bullet' ] ) ;
59+ const expected = enumValues ( ui . ChartTypeSchema ) . filter ( ( t ) => ! SAME_AS_METRIC . has ( t ) ) ;
6660 const used = new Set < string > ( ) ;
6761 for ( const w of ChartGalleryDashboard . widgets ?? [ ] ) if ( w . type ) used . add ( w . type ) ;
6862 expectFullCoverage ( 'ChartType' , expected , used ) ;
0 commit comments