{"version":3,"sources":["../../src/gallery/regional-survey-data.ts","../../src/test-data/types.ts","../../src/gallery/regional-survey-tests.ts","../../src/test-data/real-world-tests.ts","../../src/gallery/bi-tests.ts","../../src/gallery/index.ts"],"names":[],"mappings":";;;AAsBA,SAAS,iBAAiB,GAAA,EAAqB;AAC3C,EAAA,OAAO,IAAI,KAAK,GAAA,GAAM,GAAI,EAAE,WAAA,EAAY,CAAE,KAAA,CAAM,CAAA,EAAG,EAAE,CAAA;AACzD;AAGO,IAAM,oBAAA,GAA4C;AAAA,EACrD,EAAE,MAAA,EAAQ,UAAA,EAAY,aAAa,gBAAA,CAAiB,UAAU,GAAG,MAAA,EAAQ,GAAA,EAAK,IAAA,EAAM,QAAA,EAAU,YAAY,EAAA,EAAI,KAAA,EAAO,MAAM,QAAA,EAAU,gBAAA,EAAkB,MAAM,CAAA,EAAE;AAAA,EAC/J,EAAE,MAAA,EAAQ,UAAA,EAAY,aAAa,gBAAA,CAAiB,UAAU,GAAG,MAAA,EAAQ,GAAA,EAAK,IAAA,EAAM,QAAA,EAAU,YAAY,EAAA,EAAI,KAAA,EAAO,MAAM,QAAA,EAAU,OAAA,EAAS,MAAM,CAAA,EAAE;AAAA,EACtJ,EAAE,MAAA,EAAQ,UAAA,EAAY,aAAa,gBAAA,CAAiB,UAAU,GAAG,MAAA,EAAQ,GAAA,EAAK,IAAA,EAAM,QAAA,EAAU,YAAY,EAAA,EAAI,KAAA,EAAO,MAAM,QAAA,EAAU,OAAA,EAAS,MAAM,CAAA,EAAE;AAAA,EACtJ,EAAE,MAAA,EAAQ,UAAA,EAAY,aAAa,gBAAA,CAAiB,UAAU,GAAG,MAAA,EAAQ,GAAA,EAAK,IAAA,EAAM,QAAA,EAAU,YAAY,EAAA,EAAI,KAAA,EAAO,KAAK,QAAA,EAAU,SAAA,EAAW,MAAM,CAAA,EAAE;AAAA,EACvJ,EAAE,MAAA,EAAQ,UAAA,EAAY,aAAa,gBAAA,CAAiB,UAAU,GAAG,MAAA,EA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AA,EACA,cAAA;AAAA,EACA,oBAAA;AAAA,EACA,gBAAA;AAAA,EACA,eAAA;AAAA,EACA;AACJ","file":"index.cjs","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Fixed regional survey dataset for the Chart Gallery tab.\n * Source columns: season, region, city, percentage, count, attitude, rank\n */\n\nexport interface RegionalSurveyRow {\n    /** Unix timestamp (seconds) */\n    season: number;\n    /** Stable categorical / temporal label for axes */\n    seasonLabel: string;\n    region: string;\n    city: string;\n    /** 0–100 */\n    percentage: number;\n    count: number;\n    attitude: string;\n    rank: number;\n}\n\nfunction labelFromUnixSec(sec: number): string {\n    return new Date(sec * 1000).toISOString().slice(0, 10);\n}\n\n/** Parsed rows (percentages as numbers). */\nexport const REGIONAL_SURVEY_ROWS: RegionalSurveyRow[] = [\n    { season: 1735689600, seasonLabel: labelFromUnixSec(1735689600), region: 'N', city: 'City A', percentage: 85, count: 1250, attitude: 'strongly agree', rank: 1 },\n    { season: 1735689600, seasonLabel: labelFromUnixSec(1735689600), region: 'E', city: 'City B', percentage: 78, count: 2100, attitude: 'agree', rank: 2 },\n    { season: 1735689600, seasonLabel: labelFromUnixSec(1735689600), region: 'S', city: 'City C', percentage: 65, count: 1540, attitude: 'agree', rank: 4 },\n    { season: 1735689600, seasonLabel: labelFromUnixSec(1735689600), region: 'W', city: 'City D', percentage: 42, count: 890, attitude: 'neutral', rank: 8 },\n    { season: 1743465600, seasonLabel: labelFromUnixSec(1743465600), region: 'N', city: 'City E', percentage: 55, count: 920, attitude: 'agree', rank: 6 },\n    { season: 1743465600, seasonLabel: labelFromUnixSec(1743465600), region: 'E', city: 'City F', percentage: 92, count: 1780, attitude: 'strongly agree', rank: 1 },\n    { season: 1743465600, seasonLabel: labelFromUnixSec(1743465600), region: 'S', city: 'City G', percentage: 88, count: 1950, attitude: 'strongly agree', rank: 2 },\n    { season: 1743465600, seasonLabel: labelFromUnixSec(1743465600), region: 'W', city: 'City H', percentage: 30, count: 1100, attitude: 'disagree', rank: 12 },\n    { season: 1751241600, seasonLabel: labelFromUnixSec(1751241600), region: 'N', city: 'City I', percentage: 15, count: 320, attitude: 'strongly disagree', rank: 20 },\n    { season: 1751241600, seasonLabel: labelFromUnixSec(1751241600), region: 'E', city: 'City J', percentage: 60, count: 880, attitude: 'agree', rank: 7 },\n    { season: 1751241600, seasonLabel: labelFromUnixSec(1751241600), region: 'S', city: 'City K', percentage: 72, count: 640, attitude: 'agree', rank: 5 },\n    { season: 1751241600, seasonLabel: labelFromUnixSec(1751241600), region: 'W', city: 'City L', percentage: 48, count: 760, attitude: 'neutral', rank: 9 },\n    { season: 1759017600, seasonLabel: labelFromUnixSec(1759017600), region: 'N', city: 'City M', percentage: 35, count: 540, attitude: 'disagree', rank: 15 },\n    { season: 1759017600, seasonLabel: labelFromUnixSec(1759017600), region: 'E', city: 'City N', percentage: 81, count: 1420, attitude: 'strongly agree', rank: 3 },\n    { season: 1759017600, seasonLabel: labelFromUnixSec(1759017600), region: 'S', city: 'City O', percentage: 58, count: 430, attitude: 'agree', rank: 10 },\n    { season: 1759017600, seasonLabel: labelFromUnixSec(1759017600), region: 'W', city: 'City P', percentage: 66, count: 720, attitude: 'agree', rank: 6 },\n    { season: 1766793600, seasonLabel: labelFromUnixSec(1766793600), region: 'N', city: 'City Q', percentage: 25, count: 310, attitude: 'disagree', rank: 18 },\n    { season: 1766793600, seasonLabel: labelFromUnixSec(1766793600), region: 'E', city: 'City R', percentage: 70, count: 980, attitude: 'agree', rank: 5 },\n    { season: 1766793600, seasonLabel: labelFromUnixSec(1766793600), region: 'S', city: 'City S', percentage: 44, count: 520, attitude: 'neutral', rank: 11 },\n    { season: 1766793600, seasonLabel: labelFromUnixSec(1766793600), region: 'W', city: 'City T', percentage: 20, count: 150, attitude: 'strongly disagree', rank: 19 },\n];\n\nconst SEASON_LABELS = [...new Set(REGIONAL_SURVEY_ROWS.map(r => r.seasonLabel))].sort();\nconst REGIONS = ['N', 'E', 'S', 'W'] as const;\nconst CITIES = [...new Set(REGIONAL_SURVEY_ROWS.map(r => r.city))];\nconst ATTITUDES = [...new Set(REGIONAL_SURVEY_ROWS.map(r => r.attitude))];\n\n/** Table shape expected by assemblers (`Record<string, unknown>[]`). */\nexport function regionalSurveyTable(): Record<string, unknown>[] {\n    return REGIONAL_SURVEY_ROWS.map(r => ({ ...r }));\n}\n\nexport const REGIONAL_SURVEY_AXIS_LEVELS = {\n    seasonLabels: SEASON_LABELS,\n    regions: [...REGIONS],\n    cities: CITIES,\n    attitudes: ATTITUDES,\n} as const;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Types and helper utilities for chart gallery test cases.\n * No React/UI dependencies — pure TypeScript.\n */\n\nimport { Type } from './df-types';\nimport { Channel, EncodingItem, FieldItem } from './df-types';\nimport { AssembleOptions } from '../core/types';\nimport type { SemanticAnnotation } from '../core/field-semantics';\n\n// ============================================================================\n// Test Case Definition\n// ============================================================================\n\nexport interface TestCase {\n    title: string;\n    description: string;\n    tags: string[];  // e.g., ['temporal', 'large-cardinality', 'color']\n    chartType: string;\n    data: Record<string, any>[];\n    fields: FieldItem[];\n    metadata: Record<string, { type: Type; semanticType: string; levels: any[] }>;\n    encodingMap: Partial<Record<Channel, EncodingItem>>;\n    chartProperties?: Record<string, any>;\n    assembleOptions?: AssembleOptions;\n    /**\n     * Enriched semantic annotations that override the plain semanticType strings\n     * in metadata. Use this when a field needs extra info like intrinsicDomain or unit.\n     * E.g., { rating: { semanticType: 'Score', intrinsicDomain: [1, 5] } }\n     */\n    semanticAnnotations?: Record<string, SemanticAnnotation>;\n}\n\n/** Date format definition for date stress tests */\nexport interface DateFormat {\n    label: string;\n    description: string;\n    values: any[];\n    fieldName: string;\n    expectedType: Type;\n    semanticType: string;\n}\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\nexport function makeField(name: string, tableRef = 'test'): FieldItem {\n    return { id: name, name, source: 'original', tableRef };\n}\n\nexport function makeEncodingItem(fieldID: string, opts?: Partial<EncodingItem>): EncodingItem {\n    return { fieldID, ...opts };\n}\n\nexport function inferType(values: any[]): Type {\n    if (values.length === 0) return Type.String;\n    const sample = values.find(v => v != null);\n    if (typeof sample === 'number') return Type.Number;\n    if (typeof sample === 'boolean') return Type.String;\n    if (sample instanceof Date) return Type.Date;\n    // Check if string looks like a date\n    if (typeof sample === 'string' && !isNaN(Date.parse(sample)) && sample.length > 4) return Type.Date;\n    return Type.String;\n}\n\nexport function buildMetadata(data: Record<string, any>[]): Record<string, { type: Type; semanticType: string; levels: any[] }> {\n    if (data.length === 0) return {};\n    const meta: Record<string, { type: Type; semanticType: string; levels: any[] }> = {};\n    for (const key of Object.keys(data[0])) {\n        const values = data.map(r => r[key]).filter(v => v != null);\n        const type = inferType(values);\n        const levels = [...new Set(values)];\n        // Assign semantic types heuristically\n        let semanticType = '';\n        if (type === Type.Date || type === Type.DateTime || type === Type.Time) semanticType = 'Date';\n        else if (type === Type.Number || type === Type.Duration) semanticType = 'Quantity';\n        else semanticType = 'Category';\n        meta[key] = { type, semanticType, levels };\n    }\n    return meta;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Gallery test cases: regional survey dataset × each Chart.js–aligned chart family.\n * Rendered with Vega-Lite + ECharts + Chart.js (TripleChart).\n */\n\nimport { Type } from '../test-data/df-types';\nimport { TestCase, makeField, makeEncodingItem } from '../test-data/types';\nimport {\n    REGIONAL_SURVEY_ROWS,\n    regionalSurveyTable,\n    REGIONAL_SURVEY_AXIS_LEVELS,\n} from './regional-survey-data';\n\nconst META_BASE: Record<string, { type: Type; semanticType: string; levels: any[] }> = {\n    seasonLabel: {\n        type: Type.String,\n        semanticType: 'Date',\n        levels: [...REGIONAL_SURVEY_AXIS_LEVELS.seasonLabels],\n    },\n    region: {\n        type: Type.String,\n        semanticType: 'Category',\n        levels: [...REGIONAL_SURVEY_AXIS_LEVELS.regions],\n    },\n    city: {\n        type: Type.String,\n        semanticType: 'Category',\n        levels: [...REGIONAL_SURVEY_AXIS_LEVELS.cities],\n    },\n    percentage: { type: Type.Number, semanticType: 'Percentage', levels: [] },\n    count: { type: Type.Number, semanticType: 'Quantity', levels: [] },\n    attitude: {\n        type: Type.String,\n        semanticType: 'Category',\n        levels: [...REGIONAL_SURVEY_AXIS_LEVELS.attitudes],\n    },\n    rank: { type: Type.Number, semanticType: 'Quantity', levels: [] },\n};\n\nfunction radarByRegionWave(): Record<string, unknown>[] {\n    return REGIONAL_SURVEY_ROWS.map(r => ({\n        Wave: r.seasonLabel,\n        Score: r.percentage,\n        Region: r.region,\n    }));\n}\n\nfunction pieByRegionTotals(): Record<string, unknown>[] {\n    const sums = new Map<string, number>();\n    for (const r of REGIONAL_SURVEY_ROWS) {\n        sums.set(r.region, (sums.get(r.region) ?? 0) + r.count);\n    }\n    return REGIONAL_SURVEY_AXIS_LEVELS.regions.map(region => ({\n        Region: region,\n        Total: sums.get(region) ?? 0,\n    }));\n}\n\nfunction roseByRegionAvgPct(): Record<string, unknown>[] {\n    const acc = new Map<string, { sum: number; n: number }>();\n    for (const r of REGIONAL_SURVEY_ROWS) {\n        const cur = acc.get(r.region) ?? { sum: 0, n: 0 };\n        cur.sum += r.percentage;\n        cur.n += 1;\n        acc.set(r.region, cur);\n    }\n    return REGIONAL_SURVEY_AXIS_LEVELS.regions.map(region => {\n        const cur = acc.get(region)!;\n        return { Direction: region, AvgPct: Math.round((cur.sum / cur.n) * 10) / 10 };\n    });\n}\n\nexport function genGalleryRegionalSurveyScatterTests(): TestCase[] {\n    const data = regionalSurveyTable();\n    return [{\n        title: 'Flint: Scatter — count × % (by region)',\n        description: 'Regional survey: sample size vs approval %, colored by compass region.',\n        tags: ['gallery', 'survey', 'scatter'],\n        chartType: 'Scatter Plot',\n        data,\n        fields: [makeField('count'), makeField('percentage'), makeField('region')],\n        metadata: {\n            count: META_BASE.count,\n            percentage: META_BASE.percentage,\n            region: META_BASE.region,\n        },\n        encodingMap: {\n            x: makeEncodingItem('count'),\n            y: makeEncodingItem('percentage'),\n            color: makeEncodingItem('region'),\n        },\n    }];\n}\n\nexport function genGalleryRegionalSurveyLineTests(): TestCase[] {\n    const data = regionalSurveyTable();\n    return [{\n        title: 'Flint: Line — % over survey waves (by region)',\n        description: 'Multi-series line: x = wave date, y = %, color = region.',\n        tags: ['gallery', 'survey', 'line', 'multi-series'],\n        chartType: 'Line Chart',\n        data,\n        fields: [makeField('seasonLabel'), makeField('percentage'), makeField('region')],\n        metadata: {\n            seasonLabel: META_BASE.seasonLabel,\n            percentage: META_BASE.percentage,\n            region: META_BASE.region,\n        },\n        encodingMap: {\n            x: makeEncodingItem('seasonLabel'),\n            y: makeEncodingItem('percentage'),\n            color: makeEncodingItem('region'),\n        },\n    }];\n}\n\nexport function genGalleryRegionalSurveyBarTests(): TestCase[] {\n    const data = regionalSurveyTable();\n    return [{\n        title: 'Flint: Bar — city × count',\n        description: 'One bar per city in the panel.',\n        tags: ['gallery', 'survey', 'bar'],\n        chartType: 'Bar Chart',\n        data,\n        fields: [makeField('city'), makeField('count')],\n        metadata: { city: META_BASE.city, count: META_BASE.count },\n        encodingMap: { x: makeEncodingItem('city'), y: makeEncodingItem('count') },\n    }];\n}\n\nexport function genGalleryRegionalSurveyStackedBarTests(): TestCase[] {\n    const data = regionalSurveyTable();\n    return [{\n        title: 'Flint: Stacked bar — wave × count (by region)',\n        description: 'Stacked counts per survey wave, colored by region.',\n        tags: ['gallery', 'survey', 'stacked-bar'],\n        chartType: 'Stacked Bar Chart',\n        data,\n        fields: [makeField('seasonLabel'), makeField('count'), makeField('region')],\n        metadata: {\n            seasonLabel: META_BASE.seasonLabel,\n            count: META_BASE.count,\n            region: META_BASE.region,\n        },\n        encodingMap: {\n            x: makeEncodingItem('seasonLabel'),\n            y: makeEncodingItem('count'),\n            color: makeEncodingItem('region'),\n        },\n    }];\n}\n\nexport function genGalleryRegionalSurveyGroupedBarTests(): TestCase[] {\n    const data = regionalSurveyTable();\n    return [{\n        title: 'Flint: Grouped bar — region × % (by wave)',\n        description: 'Side-by-side bars: region on x, % on y, grouped by wave.',\n        tags: ['gallery', 'survey', 'grouped-bar'],\n        chartType: 'Grouped Bar Chart',\n        data,\n        fields: [makeField('region'), makeField('percentage'), makeField('seasonLabel')],\n        metadata: {\n            region: META_BASE.region,\n            percentage: META_BASE.percentage,\n            seasonLabel: META_BASE.seasonLabel,\n        },\n        encodingMap: {\n            x: makeEncodingItem('region'),\n            y: makeEncodingItem('percentage'),\n            group: makeEncodingItem('seasonLabel'),\n        },\n    }];\n}\n\nexport function genGalleryRegionalSurveyAreaTests(): TestCase[] {\n    const data = regionalSurveyTable();\n    return [{\n        title: 'Flint: Area — count over waves (by region)',\n        description: 'Stacked area: survey wave vs count, colored by region.',\n        tags: ['gallery', 'survey', 'area', 'stacked'],\n        chartType: 'Area Chart',\n        data,\n        fields: [makeField('seasonLabel'), makeField('count'), makeField('region')],\n        metadata: {\n            seasonLabel: META_BASE.seasonLabel,\n            count: META_BASE.count,\n            region: META_BASE.region,\n        },\n        encodingMap: {\n            x: makeEncodingItem('seasonLabel'),\n            y: makeEncodingItem('count'),\n            color: makeEncodingItem('region'),\n        },\n    }];\n}\n\nexport function genGalleryRegionalSurveyPieTests(): TestCase[] {\n    const data = pieByRegionTotals();\n    return [{\n        title: 'Flint: Pie — total count by region',\n        description: 'Aggregated respondent counts summed across all waves.',\n        tags: ['gallery', 'survey', 'pie'],\n        chartType: 'Pie Chart',\n        data,\n        fields: [makeField('Region'), makeField('Total')],\n        metadata: {\n            Region: META_BASE.region,\n            Total: { type: Type.Number, semanticType: 'Quantity', levels: [] },\n        },\n        encodingMap: { color: makeEncodingItem('Region'), size: makeEncodingItem('Total') },\n    }];\n}\n\nexport function genGalleryRegionalSurveyHistogramTests(): TestCase[] {\n    const data = regionalSurveyTable();\n    return [{\n        title: 'Flint: Histogram — distribution of %',\n        description: 'Approval percentage across all city-wave rows.',\n        tags: ['gallery', 'survey', 'histogram'],\n        chartType: 'Histogram',\n        data,\n        fields: [makeField('percentage')],\n        metadata: { percentage: META_BASE.percentage },\n        encodingMap: { x: makeEncodingItem('percentage') },\n    }];\n}\n\nexport function genGalleryRegionalSurveyRadarTests(): TestCase[] {\n    const data = radarByRegionWave();\n    const waves = REGIONAL_SURVEY_AXIS_LEVELS.seasonLabels;\n    return [{\n        title: 'Flint: Radar — regions × waves (% )',\n        description: 'Each region is a series; each spoke is a survey wave.',\n        tags: ['gallery', 'survey', 'radar'],\n        chartType: 'Radar Chart',\n        data,\n        fields: [makeField('Wave'), makeField('Score'), makeField('Region')],\n        metadata: {\n            Wave: { type: Type.String, semanticType: 'Date', levels: [...waves] },\n            Score: { type: Type.Number, semanticType: 'Percentage', levels: [] },\n            Region: META_BASE.region,\n        },\n        encodingMap: {\n            x: makeEncodingItem('Wave'),\n            y: makeEncodingItem('Score'),\n            color: makeEncodingItem('Region'),\n        },\n    }];\n}\n\nexport function genGalleryRegionalSurveyRoseTests(): TestCase[] {\n    const data = roseByRegionAvgPct();\n    return [{\n        title: 'Flint: Rose — mean % by region',\n        description: 'Polar bars: N/E/S/W with average approval % across waves.',\n        tags: ['gallery', 'survey', 'rose'],\n        chartType: 'Rose Chart',\n        data,\n        fields: [makeField('Direction'), makeField('AvgPct')],\n        metadata: {\n            Direction: { type: Type.String, semanticType: 'Category', levels: [...REGIONAL_SURVEY_AXIS_LEVELS.regions] },\n            AvgPct: { type: Type.Number, semanticType: 'Percentage', levels: [] },\n        },\n        encodingMap: { x: makeEncodingItem('Direction'), y: makeEncodingItem('AvgPct') },\n        chartProperties: { alignment: 'center' },\n    }];\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Real-world gallery cases.\n *\n * A curated set of examples backed by **real, recognizable datasets** (public\n * domain / CC-BY / government facts) rather than synthetic random numbers. They\n * are appended into the per-chart-type gallery generators and tagged\n * `gallery-pin` so `selectVariants` always surfaces them on the wall, alongside\n * (or in place of) the synthetic coverage cases.\n *\n * Each case is built from a compact spec via {@link realCase}, which fills in\n * the `fields` / `metadata` / `encodingMap` boilerplate (metadata is inferred\n * with {@link buildMetadata}, then the given semantic types are applied).\n *\n * Provenance for every dataset is recorded in the case `description` and in\n * design-docs/gallery-data-audit.md (§6 licensing). Numbers are real values\n * transcribed from the cited source (small samples, re-keyed — facts are not\n * copyrightable).\n */\n\nimport { TestCase, makeField, makeEncodingItem, buildMetadata } from './types';\n\ninterface RealSpec {\n    chartType: string;\n    title: string;\n    description: string;\n    tags?: string[];\n    /** field name → semantic type override (applied over inferred metadata). */\n    semantic: Record<string, string>;\n    /** channel → field name (bare-field encodings). */\n    encodings: Record<string, string>;\n    data: Record<string, any>[];\n    chartProperties?: Record<string, any>;\n}\n\nfunction realCase(spec: RealSpec): TestCase {\n    const keys = Object.keys(spec.data[0] ?? {});\n    const metadata = buildMetadata(spec.data);\n    for (const [field, st] of Object.entries(spec.semantic)) {\n        if (metadata[field]) metadata[field].semanticType = st;\n    }\n    const encodingMap: TestCase['encodingMap'] = {};\n    for (const [channel, field] of Object.entries(spec.encodings)) {\n        (encodingMap as any)[channel] = makeEncodingItem(field);\n    }\n    return {\n        title: spec.title,\n        description: spec.description,\n        tags: ['real', 'gallery-pin', ...(spec.tags ?? [])],\n        chartType: spec.chartType,\n        data: spec.data,\n        fields: keys.map((k) => makeField(k)),\n        metadata,\n        encodingMap,\n        ...(spec.chartProperties ? { chartProperties: spec.chartProperties } : {}),\n    };\n}\n\n// ── Shared datasets (reused across a few chart types) ──────────────────────\n\nconst PENGUINS: [string, number, number][] = [\n    ['Adelie', 181, 3750], ['Adelie', 186, 3800], ['Adelie', 195, 3250], ['Adelie', 193, 3450],\n    ['Adelie', 190, 3650], ['Adelie', 181, 3625], ['Adelie', 195, 4675], ['Adelie', 182, 3200],\n    ['Adelie', 191, 3800], ['Adelie', 198, 4400], ['Adelie', 185, 3700],\n    ['Chinstrap', 192, 3500], ['Chinstrap', 196, 3900], ['Chinstrap', 193, 3650],\n    ['Chinstrap', 188, 3525], ['Chinstrap', 197, 3950], ['Chinstrap', 198, 3800],\n    ['Chinstrap', 178, 3300], ['Chinstrap', 207, 4800], ['Chinstrap', 201, 4050], ['Chinstrap', 191, 3550],\n    ['Gentoo', 211, 4500], ['Gentoo', 230, 5700], ['Gentoo', 210, 4450], ['Gentoo', 218, 5700],\n    ['Gentoo', 215, 5400], ['Gentoo', 219, 5550], ['Gentoo', 209, 4800], ['Gentoo', 215, 5000],\n    ['Gentoo', 214, 4650], ['Gentoo', 216, 5550], ['Gentoo', 221, 5950], ['Gentoo', 217, 5250],\n];\n\nconst FAITHFUL: number[] = [\n    3.6, 1.8, 3.333, 2.283, 4.533, 2.883, 4.7, 3.6, 1.95, 4.35, 1.833, 3.917, 4.2, 1.75,\n    4.7, 2.167, 1.75, 4.8, 1.6, 4.25, 1.8, 1.75, 3.45, 3.067, 4.533, 3.6, 1.967, 4.083,\n    3.85, 4.433, 4.3, 4.467, 3.367, 4.033, 3.833, 2.017,\n];\n\nconst DRIVING: [number, number, number][] = [\n    [1956, 3675, 2.38], [1957, 3706, 2.40], [1958, 3766, 2.26], [1959, 3905, 2.31], [1960, 3935, 2.27],\n    [1961, 3977, 2.25], [1962, 4085, 2.22], [1963, 4218, 2.12], [1964, 4369, 2.11], [1965, 4538, 2.14],\n    [1966, 4676, 2.14], [1967, 4827, 2.14], [1968, 5038, 2.13], [1969, 5207, 2.07], [1970, 5376, 2.01],\n    [1971, 5617, 1.93], [1972, 5973, 1.87], [1973, 6154, 1.90], [1974, 5943, 2.34], [1975, 6111, 2.31],\n    [1976, 6389, 2.32], [1977, 6630, 2.36], [1978, 6883, 2.23], [1979, 6744, 2.68], [1980, 6672, 3.30],\n    [1981, 6732, 3.30], [1982, 6835, 2.92], [1983, 6943, 2.66], [1984, 7130, 2.48], [1985, 7323, 2.36],\n    [1986, 7558, 1.76], [1987, 7770, 1.76], [1988, 8089, 1.68], [1989, 8397, 1.75], [1990, 8529, 1.88],\n    [1991, 8535, 1.78], [1992, 8662, 1.69], [1993, 8855, 1.60], [1994, 8909, 1.59], [1995, 9150, 1.60],\n    [1996, 9192, 1.67], [1997, 9416, 1.65], [1998, 9590, 1.39], [1999, 9687, 1.50], [2000, 9717, 1.89],\n    [2001, 9699, 1.77], [2002, 9814, 1.64], [2003, 9868, 1.86], [2004, 9994, 2.14], [2005, 10067, 2.53],\n    [2006, 10037, 2.79], [2007, 10025, 2.95], [2008, 9880, 3.31], [2009, 9657, 2.38], [2010, 9596, 2.61],\n];\n\n// ── Per-chart-type case builders ───────────────────────────────────────────\n\nexport function realConnectedScatterCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Connected Scatter Plot',\n            title: 'Driving Shifts Into Reverse — miles vs gas price (US, 1956–2010)',\n            description: 'Miles driven per capita vs the price of gas, connected in year order — the classic self-crossing connected scatterplot (NYT / Hannah Fairfield; FHWA + EIA data).',\n            tags: ['quantitative', 'temporal-order', 'self-crossing', 'large'],\n            semantic: { Year: 'Year', 'Miles/person': 'Quantity', 'Gas price': 'Quantity' },\n            encodings: { x: 'Miles/person', y: 'Gas price', order: 'Year' },\n            data: DRIVING.map(([Year, miles, gas]) => ({ Year, 'Miles/person': miles, 'Gas price': gas })),\n        }),\n    ];\n}\n\nexport function realScatterCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Scatter Plot',\n            title: 'Palmer Penguins — flipper length vs body mass',\n            description: 'Three species form crisp clusters — the modern replacement for the iris dataset (Palmer Station LTER, CC0).',\n            tags: ['quantitative', 'color', 'clusters'],\n            semantic: { Species: 'Category', 'Flipper length (mm)': 'Quantity', 'Body mass (g)': 'Quantity' },\n            encodings: { x: 'Flipper length (mm)', y: 'Body mass (g)', color: 'Species' },\n            data: PENGUINS.map(([Species, flip, mass]) => ({ Species, 'Flipper length (mm)': flip, 'Body mass (g)': mass })),\n        }),\n        realCase({\n            chartType: 'Scatter Plot',\n            title: 'Gapminder — life expectancy vs income per capita (2018)',\n            description: 'The Rosling bubble chart: wealth vs health, bubble size = population, colour = continent, on a log income axis (Gapminder / World Bank).',\n            tags: ['quantitative', 'color', 'size', 'log'],\n            semantic: { 'GDP per capita': 'Quantity', 'Life expectancy': 'Quantity', 'Population (M)': 'Quantity', Continent: 'Category' },\n            encodings: { x: 'GDP per capita', y: 'Life expectancy', size: 'Population (M)', color: 'Continent' },\n            chartProperties: { logScale_x: true },\n            data: [\n                ['Norway', 64800, 82.3, 5.3, 'Europe'], ['United States', 62600, 78.6, 327, 'Americas'],\n                ['Japan', 39300, 84.2, 127, 'Asia'], ['China', 16800, 76.7, 1393, 'Asia'],\n                ['India', 6900, 69.4, 1353, 'Asia'], ['Nigeria', 5300, 54.3, 196, 'Africa'],\n                ['Brazil', 15600, 75.7, 209, 'Americas'], ['Germany', 50900, 81.0, 83, 'Europe'],\n                ['Ethiopia', 2000, 66.2, 109, 'Africa'], ['Russia', 25800, 72.4, 145, 'Europe'],\n                ['Mexico', 19800, 75.0, 126, 'Americas'], ['Indonesia', 12400, 71.5, 268, 'Asia'],\n                ['Qatar', 116900, 80.1, 2.8, 'Asia'], ['South Africa', 13000, 63.9, 57, 'Africa'],\n                ['Bangladesh', 4200, 72.3, 161, 'Asia'],\n            ].map(([Country, gdp, life, pop, Continent]) => ({ Country, 'GDP per capita': gdp, 'Life expectancy': life, 'Population (M)': pop, Continent })),\n        }),\n    ];\n}\n\nexport function realRegressionCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Regression',\n            title: 'Auto MPG — horsepower vs fuel economy',\n            description: 'The classic inverse relationship: more horsepower, fewer miles per gallon (UCI / StatLib Auto MPG sample).',\n            tags: ['quantitative', 'trend'],\n            semantic: { Horsepower: 'Quantity', MPG: 'Quantity' },\n            encodings: { x: 'Horsepower', y: 'MPG' },\n            data: [[130, 18], [165, 15], [150, 18], [150, 16], [140, 17], [198, 15], [220, 14], [215, 14], [97, 22], [85, 26], [88, 25], [46, 26], [90, 25], [95, 24], [68, 29], [70, 27], [52, 30], [65, 31], [67, 30], [48, 43], [66, 32], [100, 22]].map(([Horsepower, MPG]) => ({ Horsepower, MPG })),\n        }),\n        realCase({\n            chartType: 'Regression',\n            title: \"Anscombe's Quartet — same stats, different shapes\",\n            description: 'Four datasets with identical means, variances and regression lines, but wildly different when plotted (Anscombe 1973).',\n            tags: ['quantitative', 'facet', 'teaching'],\n            semantic: { Dataset: 'Category', X: 'Quantity', Y: 'Quantity' },\n            encodings: { x: 'X', y: 'Y', column: 'Dataset' },\n            chartProperties: { facetColumns: 2 },\n            data: (() => {\n                const x1 = [10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5];\n                const sets: Record<string, { x: number[]; y: number[] }> = {\n                    I: { x: x1, y: [8.04, 6.95, 7.58, 8.81, 8.33, 9.96, 7.24, 4.26, 10.84, 4.82, 5.68] },\n                    II: { x: x1, y: [9.14, 8.14, 8.74, 8.77, 9.26, 8.10, 6.13, 3.10, 9.13, 7.26, 4.74] },\n                    III: { x: x1, y: [7.46, 6.77, 12.74, 7.11, 7.81, 8.84, 6.08, 5.39, 8.15, 6.42, 5.73] },\n                    IV: { x: [8, 8, 8, 8, 8, 8, 8, 19, 8, 8, 8], y: [6.58, 5.76, 7.71, 8.84, 8.47, 7.04, 5.25, 12.50, 5.56, 7.91, 6.89] },\n                };\n                const rows: Record<string, any>[] = [];\n                for (const [Dataset, { x, y }] of Object.entries(sets)) x.forEach((X, i) => rows.push({ Dataset, X, Y: y[i] }));\n                return rows;\n            })(),\n        }),\n    ];\n}\n\nexport function realLineCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Line Chart',\n            title: 'Keeling Curve — atmospheric CO₂ at Mauna Loa',\n            description: 'The defining climate record: annual-mean CO₂ rising from 316 ppm (1959) to 421 ppm (2023) (Scripps / NOAA).',\n            tags: ['temporal', 'single'],\n            semantic: { Year: 'Year', 'CO₂ (ppm)': 'Quantity' },\n            encodings: { x: 'Year', y: 'CO₂ (ppm)' },\n            data: [[1959, 315.98], [1965, 320.04], [1970, 325.68], [1975, 331.11], [1980, 338.80], [1985, 346.12], [1990, 354.45], [1995, 360.82], [2000, 369.71], [2005, 379.98], [2010, 389.90], [2015, 400.83], [2020, 414.24], [2023, 421.08]].map(([Year, ppm]) => ({ Year, 'CO₂ (ppm)': ppm })),\n        }),\n        realCase({\n            chartType: 'Line Chart',\n            title: 'US unemployment rate, 2000–2023 (%)',\n            description: 'The 2009 financial-crisis plateau and the sharp 2020 pandemic spike (US Bureau of Labor Statistics).',\n            tags: ['temporal', 'single'],\n            semantic: { Year: 'Year', 'Unemployment (%)': 'Quantity' },\n            encodings: { x: 'Year', y: 'Unemployment (%)' },\n            data: [[2000, 4.0], [2001, 4.7], [2002, 5.8], [2003, 6.0], [2004, 5.5], [2005, 5.1], [2006, 4.6], [2007, 4.6], [2008, 5.8], [2009, 9.3], [2010, 9.6], [2011, 8.9], [2012, 8.1], [2013, 7.4], [2014, 6.2], [2015, 5.3], [2016, 4.9], [2017, 4.4], [2018, 3.9], [2019, 3.7], [2020, 8.1], [2021, 5.3], [2022, 3.6], [2023, 3.6]].map(([Year, v]) => ({ Year, 'Unemployment (%)': v })),\n        }),\n    ];\n}\n\nexport function realAreaCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Area Chart',\n            title: 'Share of the world online, 1995–2023 (%)',\n            description: 'From ~1% to two-thirds of humanity in under three decades (Our World in Data / ITU).',\n            tags: ['temporal', 'single'],\n            semantic: { Year: 'Year', 'Internet users (%)': 'Quantity' },\n            encodings: { x: 'Year', y: 'Internet users (%)' },\n            data: [[1995, 1], [2000, 7], [2005, 16], [2010, 29], [2015, 43], [2018, 51], [2020, 60], [2023, 67]].map(([Year, v]) => ({ Year, 'Internet users (%)': v })),\n        }),\n    ];\n}\n\nexport function realBarCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Bar Chart',\n            title: 'Most populous countries, 2023 (millions)',\n            description: 'The year India overtook China (UN World Population Prospects / World Bank).',\n            tags: ['nominal', 'single', 'horizontal'],\n            semantic: { Country: 'Country', Population: 'Quantity' },\n            encodings: { y: 'Country', x: 'Population' },\n            data: [['India', 1428.6], ['China', 1425.7], ['United States', 339.9], ['Indonesia', 277.5], ['Pakistan', 240.5], ['Nigeria', 223.8], ['Brazil', 216.4], ['Bangladesh', 173.0], ['Russia', 144.4], ['Mexico', 128.5]].map(([Country, Population]) => ({ Country, Population })),\n        }),\n        realCase({\n            chartType: 'Bar Chart',\n            title: 'Global temperature anomaly by decade (°C vs 1951–1980)',\n            description: 'Bars cross zero — cool early decades below, rapid warming above (NASA GISTEMP).',\n            tags: ['nominal', 'diverging'],\n            semantic: { Decade: 'Category', 'Anomaly (°C)': 'Quantity' },\n            encodings: { x: 'Decade', y: 'Anomaly (°C)' },\n            data: [['1880s', -0.17], ['1900s', -0.16], ['1920s', -0.27], ['1940s', 0.12], ['1960s', -0.03], ['1980s', 0.26], ['2000s', 0.40], ['2010s', 0.72], ['2020s', 1.02]].map(([Decade, v]) => ({ Decade, 'Anomaly (°C)': v })),\n        }),\n    ];\n}\n\nexport function realLollipopCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Lollipop Chart',\n            title: 'CO₂ emissions per capita, 2022 (tonnes)',\n            description: 'Per-person emissions vary ~20× across countries (Our World in Data / Global Carbon Project).',\n            tags: ['nominal', 'single'],\n            semantic: { Country: 'Country', 'Tonnes/person': 'Quantity' },\n            encodings: { x: 'Country', y: 'Tonnes/person' },\n            data: [['Qatar', 37], ['UAE', 22], ['United States', 15], ['Canada', 14], ['Russia', 11], ['Japan', 8.5], ['China', 8.0], ['Germany', 8.0], ['UK', 5.0], ['France', 4.6], ['Brazil', 2.3], ['India', 2.0]].map(([Country, v]) => ({ Country, 'Tonnes/person': v })),\n        }),\n    ];\n}\n\nexport function realHistogramCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Histogram',\n            title: 'Old Faithful — distribution of eruption durations',\n            description: 'Two humps: short (~2 min) and long (~4.5 min) eruptions — a mean would hide this (R \"faithful\" sample).',\n            tags: ['quantitative', 'bimodal'],\n            semantic: { 'Duration (min)': 'Quantity' },\n            encodings: { x: 'Duration (min)' },\n            data: FAITHFUL.map((d) => ({ 'Duration (min)': d })),\n        }),\n    ];\n}\n\nexport function realDensityCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Density Plot',\n            title: 'Old Faithful — eruption duration density',\n            description: 'The same bimodal shape as a smooth density curve (R \"faithful\" sample).',\n            tags: ['quantitative', 'bimodal'],\n            semantic: { 'Duration (min)': 'Quantity' },\n            encodings: { x: 'Duration (min)' },\n            data: FAITHFUL.map((d) => ({ 'Duration (min)': d })),\n        }),\n    ];\n}\n\nexport function realBoxplotCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Boxplot',\n            title: 'Penguin body mass by species',\n            description: 'Gentoo penguins are markedly heavier than Adélie and Chinstrap (Palmer Station LTER, CC0).',\n            tags: ['quantitative', 'category'],\n            semantic: { Species: 'Category', 'Body mass (g)': 'Quantity' },\n            encodings: { x: 'Species', y: 'Body mass (g)' },\n            data: PENGUINS.map(([Species, , mass]) => ({ Species, 'Body mass (g)': mass })),\n        }),\n    ];\n}\n\nexport function realStripCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Strip Plot',\n            title: 'Iris petal length by species',\n            description: 'Setosa petals are tiny and tightly clustered; the other two overlap more (Fisher 1936 sample).',\n            tags: ['quantitative', 'category'],\n            semantic: { Species: 'Category', 'Petal length (cm)': 'Quantity' },\n            encodings: { x: 'Species', y: 'Petal length (cm)' },\n            data: (() => {\n                const t: Record<string, number[]> = { Setosa: [1.4, 1.4, 1.3, 1.5, 1.4, 1.7, 1.4, 1.5, 1.5, 1.6], Versicolor: [4.7, 4.5, 4.9, 4.0, 4.6, 4.5, 4.7, 3.3, 4.6, 3.9], Virginica: [6.0, 5.1, 5.9, 5.6, 5.8, 6.6, 4.5, 6.3, 5.8, 6.1] };\n                const rows: Record<string, any>[] = [];\n                for (const [Species, arr] of Object.entries(t)) for (const v of arr) rows.push({ Species, 'Petal length (cm)': v });\n                return rows;\n            })(),\n        }),\n    ];\n}\n\n// ── More shared datasets ───────────────────────────────────────────────────\n\nconst MO = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\nconst POP_REGION: Record<number, Record<string, number>> = {\n    1950: { Asia: 1404, Africa: 227, Europe: 549, Americas: 339, Oceania: 13 },\n    1970: { Asia: 2142, Africa: 365, Europe: 657, Americas: 512, Oceania: 20 },\n    1990: { Asia: 3226, Africa: 630, Europe: 721, Americas: 724, Oceania: 27 },\n    2010: { Asia: 4194, Africa: 1039, Europe: 736, Americas: 934, Oceania: 37 },\n    2020: { Asia: 4641, Africa: 1361, Europe: 748, Americas: 1023, Oceania: 45 },\n};\n\nexport function realEcdfCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'ECDF Plot',\n            title: 'Exam scores — cumulative distribution',\n            description: 'Read percentiles directly: the median is where the curve crosses 0.5.',\n            tags: ['quantitative'],\n            semantic: { Score: 'Quantity' },\n            encodings: { x: 'Score' },\n            data: [55, 62, 68, 71, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 85, 86, 87, 88, 88, 89, 90, 91, 92, 93, 94, 95, 97, 99].map((Score) => ({ Score })),\n        }),\n    ];\n}\n\nexport function realGroupedBarCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Grouped Bar Chart',\n            title: 'Titanic survival rate by class and sex',\n            description: '\"Women and children first\" — and first class — are stark in the numbers (Encyclopedia Titanica).',\n            tags: ['nominal', 'group'],\n            semantic: { Class: 'Category', Sex: 'Category', 'Survival (%)': 'Quantity' },\n            encodings: { x: 'Class', y: 'Survival (%)', group: 'Sex' },\n            data: (() => {\n                const t: Record<string, [number, number]> = { '1st': [97, 34], '2nd': [89, 15], '3rd': [49, 15] };\n                const rows: Record<string, any>[] = [];\n                for (const [Class, [fem, male]] of Object.entries(t)) { rows.push({ Class, Sex: 'Female', 'Survival (%)': fem }); rows.push({ Class, Sex: 'Male', 'Survival (%)': male }); }\n                return rows;\n            })(),\n        }),\n    ];\n}\n\nexport function realStackedBarCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Stacked Bar Chart',\n            title: 'Electricity generation mix by country, 2023',\n            description: 'How each country splits generation across sources (Our World in Data / Ember).',\n            tags: ['nominal', 'color'],\n            semantic: { Country: 'Country', Source: 'Category', Share: 'Quantity' },\n            encodings: { x: 'Country', y: 'Share', color: 'Source' },\n            data: (() => {\n                const t: Record<string, Record<string, number>> = { France: { Nuclear: 65, Renewables: 27, Fossil: 8 }, Germany: { Renewables: 52, Fossil: 45, Nuclear: 3 }, 'United States': { Fossil: 60, Nuclear: 18, Renewables: 22 }, China: { Fossil: 62, Renewables: 33, Nuclear: 5 }, Brazil: { Renewables: 89, Fossil: 9, Nuclear: 2 } };\n                const rows: Record<string, any>[] = [];\n                for (const [Country, by] of Object.entries(t)) for (const [Source, Share] of Object.entries(by)) rows.push({ Country, Source, Share });\n                return rows;\n            })(),\n        }),\n    ];\n}\n\nexport function realStreamgraphCases(): TestCase[] {\n    const rows: Record<string, any>[] = [];\n    for (const [yr, by] of Object.entries(POP_REGION)) for (const [Region, Population] of Object.entries(by)) rows.push({ Year: Number(yr), Region, Population });\n    return [\n        realCase({\n            chartType: 'Streamgraph',\n            title: 'World population by region, 1950–2020',\n            description: \"Asia's dominance and Africa's acceleration as a centre-stacked stream (UN World Population Prospects).\",\n            tags: ['temporal', 'color'],\n            semantic: { Year: 'Year', Region: 'Category', Population: 'Quantity' },\n            encodings: { x: 'Year', y: 'Population', color: 'Region' },\n            data: rows,\n        }),\n    ];\n}\n\nexport function realRangeAreaCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Range Area Chart',\n            title: 'Seattle average monthly temperature range',\n            description: 'The band spans the average daily low to high each month (NOAA climate normals).',\n            tags: ['temporal', 'band'],\n            semantic: { Month: 'Category', Low: 'Quantity', High: 'Quantity' },\n            encodings: { x: 'Month', y: 'Low', y2: 'High' },\n            data: (() => { const lo = [37, 37, 40, 43, 48, 53, 56, 57, 53, 46, 40, 36], hi = [47, 50, 54, 59, 65, 70, 76, 77, 71, 60, 51, 46]; return MO.map((Month, i) => ({ Month, Low: lo[i], High: hi[i] })); })(),\n        }),\n    ];\n}\n\nexport function realBumpCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Bump Chart',\n            title: 'Olympic medal-table rank, 2012–2024',\n            description: 'Rank across four Summer Games (1 = top of the table) (IOC medal tables).',\n            tags: ['temporal', 'color', 'rank'],\n            semantic: { Games: 'Year', Country: 'Country', Rank: 'Quantity' },\n            encodings: { x: 'Games', y: 'Rank', color: 'Country' },\n            data: (() => {\n                const games = [2012, 2016, 2020, 2024];\n                const t: Record<string, number[]> = { 'United States': [1, 1, 1, 1], China: [2, 3, 2, 2], 'Great Britain': [3, 2, 4, 7], Japan: [6, 6, 5, 3] };\n                const rows: Record<string, any>[] = [];\n                for (const [Country, ranks] of Object.entries(t)) games.forEach((Games, i) => rows.push({ Games, Country, Rank: ranks[i] }));\n                return rows;\n            })(),\n        }),\n    ];\n}\n\nexport function realSparklineCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Sparkline',\n            title: 'Monthly KPIs — revenue, users, churn',\n            description: 'Three business metrics as mini trend lines, one per row.',\n            tags: ['temporal', 'multi-series'],\n            semantic: { Month: 'Category', Metric: 'Category', Value: 'Quantity' },\n            encodings: { x: 'Month', y: 'Value', color: 'Metric' },\n            data: (() => {\n                const t: Record<string, number[]> = { 'Revenue ($k)': [120, 125, 130, 128, 140, 145, 150, 148, 160, 165, 170, 180], 'Active users (k)': [40, 42, 45, 47, 50, 52, 55, 58, 60, 63, 66, 70], 'Churn (%)': [5.2, 5.0, 4.8, 4.9, 4.6, 4.5, 4.3, 4.4, 4.1, 4.0, 3.9, 3.8] };\n                const rows: Record<string, any>[] = [];\n                for (const [Metric, arr] of Object.entries(t)) arr.forEach((Value, i) => rows.push({ Month: MO[i], Metric, Value }));\n                return rows;\n            })(),\n        }),\n    ];\n}\n\nexport function realPieCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Pie Chart',\n            title: 'Desktop browser market share, 2024',\n            description: 'Chrome dominates; Safari and Edge trail (StatCounter).',\n            tags: ['nominal'],\n            semantic: { Browser: 'Category', Share: 'Quantity' },\n            encodings: { size: 'Share', color: 'Browser' },\n            data: [['Chrome', 65], ['Safari', 12], ['Edge', 12], ['Firefox', 6], ['Other', 5]].map(([Browser, Share]) => ({ Browser, Share })),\n        }),\n    ];\n}\n\nexport function realDonutCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Donut Chart',\n            title: 'Mobile OS market share, 2024',\n            description: 'Android vs iOS worldwide (StatCounter).',\n            tags: ['nominal'],\n            semantic: { OS: 'Category', Share: 'Quantity' },\n            encodings: { size: 'Share', color: 'OS' },\n            data: [['Android', 71], ['iOS', 28], ['Other', 1]].map(([OS, Share]) => ({ OS, Share })),\n        }),\n    ];\n}\n\nexport function realRoseCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Rose Chart',\n            title: 'Seattle monthly rainfall',\n            description: 'Wet winters, dry midsummer — as polar bars around the year (NOAA climate normals).',\n            tags: ['nominal', 'cyclic'],\n            semantic: { Month: 'Category', 'Rainfall (mm)': 'Quantity' },\n            encodings: { x: 'Month', y: 'Rainfall (mm)' },\n            data: (() => { const r = [140, 90, 95, 70, 50, 40, 18, 25, 40, 100, 165, 155]; return MO.map((Month, i) => ({ Month, 'Rainfall (mm)': r[i] })); })(),\n        }),\n    ];\n}\n\nexport function realRadarCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Radar Chart',\n            title: 'Nutrition profile per 100 g — almonds vs oats vs yogurt',\n            description: 'Compare three foods across five nutrients; each traces a distinct polygon (USDA FoodData Central).',\n            tags: ['nominal', 'color'],\n            semantic: { Nutrient: 'Category', Food: 'Category', 'Grams/100g': 'Quantity' },\n            encodings: { x: 'Nutrient', y: 'Grams/100g', color: 'Food' },\n            data: (() => {\n                const table: Record<string, Record<string, number>> = { Almonds: { Protein: 21, Fat: 50, Carbs: 22, Fiber: 12, Sugar: 4 }, Oats: { Protein: 17, Fat: 7, Carbs: 66, Fiber: 11, Sugar: 1 }, 'Greek yogurt': { Protein: 10, Fat: 5, Carbs: 4, Fiber: 0, Sugar: 4 } };\n                const rows: Record<string, any>[] = [];\n                for (const [Food, by] of Object.entries(table)) for (const [Nutrient, g] of Object.entries(by)) rows.push({ Food, Nutrient, 'Grams/100g': g });\n                return rows;\n            })(),\n        }),\n    ];\n}\n\nexport function realWaterfallCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Waterfall Chart',\n            title: 'World population growth 1950 → 2020, by region',\n            description: 'A bridge from 2.5B to ~7.8B people, broken down by each region\\'s addition (UN World Population Prospects).',\n            tags: ['nominal', 'change'],\n            semantic: { Step: 'Category', 'Population (M)': 'Quantity' },\n            encodings: { x: 'Step', y: 'Population (M)' },\n            chartProperties: { totals: 'last' },\n            data: [\n                { Step: '1950', 'Population (M)': 2536 },\n                { Step: 'Asia', 'Population (M)': 3237 },\n                { Step: 'Africa', 'Population (M)': 1134 },\n                { Step: 'Americas', 'Population (M)': 684 },\n                { Step: 'Europe', 'Population (M)': 199 },\n                { Step: 'Oceania', 'Population (M)': 32 },\n            ],\n        }),\n    ];\n}\n\nexport function realCandlestickCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Candlestick Chart',\n            title: 'Daily stock OHLC over two weeks',\n            description: 'Open-high-low-close candles over ~10 trading days.',\n            tags: ['temporal', 'ohlc'],\n            semantic: { Date: 'Date', Open: 'Quantity', High: 'Quantity', Low: 'Quantity', Close: 'Quantity' },\n            encodings: { x: 'Date', open: 'Open', high: 'High', low: 'Low', close: 'Close' },\n            data: [['2024-01-02', 187, 188, 183, 185], ['2024-01-03', 184, 185, 182, 184], ['2024-01-04', 182, 183, 180, 182], ['2024-01-05', 182, 182, 179, 181], ['2024-01-08', 182, 186, 182, 185], ['2024-01-09', 184, 185, 183, 185], ['2024-01-10', 184, 186, 183, 186], ['2024-01-11', 186, 187, 183, 186], ['2024-01-12', 186, 188, 185, 185]].map(([Date, Open, High, Low, Close]) => ({ Date, Open, High, Low, Close })),\n        }),\n    ];\n}\n\nexport function realHeatmapCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Heatmap',\n            title: 'Average monthly temperature by city',\n            description: 'Warm bands for the tropics, cold winters for Moscow (climate normals).',\n            tags: ['grid'],\n            semantic: { Month: 'Category', City: 'Category', 'Temp (°C)': 'Quantity' },\n            encodings: { x: 'Month', y: 'City', color: 'Temp (°C)' },\n            data: (() => {\n                const t: Record<string, number[]> = { Singapore: [26, 27, 28, 28, 28, 28, 27, 27, 27, 27, 26, 26], Cairo: [14, 15, 18, 22, 26, 28, 29, 29, 27, 24, 20, 16], Moscow: [-9, -7, -1, 7, 13, 17, 19, 17, 11, 5, -1, -6], Seattle: [5, 6, 8, 10, 13, 16, 19, 19, 16, 11, 7, 4] };\n                const rows: Record<string, any>[] = [];\n                for (const [City, arr] of Object.entries(t)) arr.forEach((v, i) => rows.push({ City, Month: MO[i], 'Temp (°C)': v }));\n                return rows;\n            })(),\n        }),\n    ];\n}\n\nexport function realPyramidCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Pyramid Chart',\n            title: 'US population by age and sex, 2020',\n            description: 'A classic population pyramid — male vs female by age band (US Census 2020).',\n            tags: ['nominal', 'diverging'],\n            semantic: { Age: 'Category', Sex: 'Category', Population: 'Quantity' },\n            encodings: { x: 'Population', y: 'Age', color: 'Sex' },\n            data: (() => {\n                const ages = ['0–14', '15–29', '30–44', '45–59', '60–74', '75+'];\n                const m = [31, 34, 33, 30, 26, 10], f = [30, 32, 33, 31, 28, 15];\n                const rows: Record<string, any>[] = [];\n                ages.forEach((Age, i) => { rows.push({ Age, Sex: 'Male', Population: m[i] }); rows.push({ Age, Sex: 'Female', Population: f[i] }); });\n                return rows;\n            })(),\n        }),\n    ];\n}\n\nexport function realBarTableCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Bar Table',\n            title: 'GDP by country, 2023 (trillion USD)',\n            description: 'Compact ranked bars with value labels (IMF / World Bank 2023).',\n            tags: ['nominal'],\n            semantic: { Country: 'Country', 'GDP ($T)': 'Quantity' },\n            encodings: { y: 'Country', x: 'GDP ($T)' },\n            data: [['United States', 27.4], ['China', 17.8], ['Germany', 4.5], ['Japan', 4.2], ['India', 3.9], ['UK', 3.3], ['France', 3.0], ['Brazil', 2.2]].map(([Country, v]) => ({ Country, 'GDP ($T)': v })),\n        }),\n    ];\n}\n\nexport function realRangedDotCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Ranged Dot Plot',\n            title: 'Life expectancy gap, male vs female (2021)',\n            description: 'The dumbbell length is the female–male gap in years (World Bank 2021).',\n            tags: ['nominal', 'color'],\n            semantic: { Country: 'Country', Sex: 'Category', 'Life expectancy': 'Quantity' },\n            encodings: { x: 'Life expectancy', y: 'Country', color: 'Sex' },\n            data: (() => {\n                const t: Record<string, number[]> = { Japan: [81.5, 87.6], 'United States': [73.5, 79.3], India: [66.0, 69.0], Brazil: [69.0, 76.0], Nigeria: [51.0, 54.0], Germany: [78.5, 83.4] };\n                const rows: Record<string, any>[] = [];\n                for (const [Country, [mm, ff]] of Object.entries(t)) { rows.push({ Country, Sex: 'Male', 'Life expectancy': mm }); rows.push({ Country, Sex: 'Female', 'Life expectancy': ff }); }\n                return rows;\n            })(),\n        }),\n    ];\n}\n\nexport function realGanttCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Gantt Chart',\n            title: 'Software release schedule',\n            description: 'Overlapping phases from planning to launch.',\n            tags: ['temporal', 'schedule'],\n            semantic: { Task: 'Category', Start: 'Date', End: 'Date' },\n            encodings: { y: 'Task', x: 'Start', x2: 'End' },\n            data: [['Planning', '2024-01-01', '2024-01-14'], ['Design', '2024-01-15', '2024-02-04'], ['Implementation', '2024-02-05', '2024-03-17'], ['Testing', '2024-03-11', '2024-04-07'], ['Launch', '2024-04-08', '2024-04-15']].map(([Task, Start, End]) => ({ Task, Start, End })),\n        }),\n    ];\n}\n\nexport function realBulletCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'Bullet Chart',\n            title: 'Renewable electricity share vs 2030 target',\n            description: 'Each bar is the current share; the tick marks the 2030 target (OWID / Ember).',\n            tags: ['nominal', 'target'],\n            semantic: { Country: 'Country', Share: 'Quantity', Target: 'Quantity' },\n            encodings: { y: 'Country', x: 'Share', goal: 'Target' },\n            data: [['Norway', 98.6, 100], ['Brazil', 89.2, 95], ['Germany', 51.6, 80], ['World', 30.3, 60], ['United States', 22.7, 50]].map(([Country, Share, Target]) => ({ Country, Share, Target })),\n        }),\n    ];\n}\n\nexport function realKpiCases(): TestCase[] {\n    return [\n        realCase({\n            chartType: 'KPI Card',\n            title: 'Global clean-energy progress vs 2030 targets',\n            description: 'Headline climate & connectivity metrics against their 2030 targets, with progress bars (OWID / IEA / ITU).',\n            tags: ['bi', 'goal', 'progress'],\n            semantic: { Metric: 'Category', Value: 'Quantity', Goal: 'Quantity' },\n            encodings: { metric: 'Metric', value: 'Value', goal: 'Goal' },\n            chartProperties: { layout: 'horizontal' },\n            data: [\n                { Metric: 'Renewable electricity (%)', Value: 30.3, Goal: 45 },\n                { Metric: 'EV share of car sales (%)', Value: 18, Goal: 40 },\n                { Metric: 'World online (%)', Value: 67, Goal: 90 },\n                { Metric: 'Electricity access (%)', Value: 91, Goal: 100 },\n            ],\n        }),\n    ];\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Gallery test cases for BI-style chart prototypes (Vega-Lite only).\n *\n * KPI Card contract\n * ─────────────────\n * One row per tile. Channels:\n *   - `metric` (required) → caption\n *   - `value`  (required) → big number (numeric or pre-formatted string)\n *   - `goal`   (optional) → comparison value (numeric or string)\n *\n * Formatting is delegated to upstream data transformation. The template\n * applies only a trivial `toLocaleString` default to numeric values.\n * For currency / SI / percent formatting, format the column upstream\n * and pass strings.\n *\n * Progress bar appears when both `value` and `goal` are finite numbers.\n * Otherwise the goal renders as a small \"Goal: <goal>\" line.\n */\n\nimport { Type } from '../test-data/df-types';\nimport { TestCase, makeField, makeEncodingItem } from '../test-data/types';\nimport { realKpiCases } from '../test-data/real-world-tests';\n\nexport function genGalleryKpiCardTests(): TestCase[] {\n    return [\n        // ── Single tile, numeric ──────────────────────────────────────────\n        {\n            title: 'KPI: Single tile (Numeric)',\n            description:\n                'One row, only `value` bound. Caption defaults to the value field name. ' +\n                'Numeric value rendered via `toLocaleString`.',\n            tags: ['gallery', 'bi', 'kpi'],\n            chartType: 'KPI Card',\n            data: [{ Revenue: 1_184_320 }],\n            fields: [makeField('Revenue')],\n            metadata: {\n                Revenue: { type: Type.Number, semanticType: 'Quantity', levels: [] },\n            },\n            encodingMap: { value: makeEncodingItem('Revenue') },\n            chartProperties: { layout: 'horizontal' },\n        },\n\n        // ── Single tile, pre-formatted string ─────────────────────────────\n        {\n            title: 'KPI: Single tile (pre-formatted string)',\n            description:\n                'Agent formatted upstream. Template renders verbatim.',\n            tags: ['gallery', 'bi', 'kpi', 'preformatted'],\n            chartType: 'KPI Card',\n            data: [{ Metric: 'Revenue', Display: '$1.18M' }],\n            fields: [makeField('Metric'), makeField('Display')],\n            metadata: {\n                Metric:  { type: Type.String, semanticType: 'Category', levels: [] },\n                Display: { type: Type.String, semanticType: 'Category', levels: [] },\n            },\n            encodingMap: {\n                metric: makeEncodingItem('Metric'),\n                value:  makeEncodingItem('Display'),\n            },\n            chartProperties: { layout: 'horizontal' },\n        },\n\n        // ── Multi-tile, numeric ───────────────────────────────────────────\n        {\n            title: 'KPI: Multi-tile (Numeric quantities)',\n            description:\n                'Four tiles, plain numeric values with default `toLocaleString`.',\n            tags: ['gallery', 'bi', 'kpi', 'multi-metric'],\n            chartType: 'KPI Card',\n            data: [\n                { Metric: 'Active Users',  Value: 12_402 },\n                { Metric: 'New Signups',   Value:  1_182 },\n                { Metric: 'Churn',         Value:    214 },\n                { Metric: 'Power Users',   Value:    876 },\n            ],\n            fields: [makeField('Metric'), makeField('Value')],\n            metadata: {\n                Metric: { type: Type.String, semanticType: 'Category', levels: [] },\n                Value:  { type: Type.Number, semanticType: 'Quantity', levels: [] },\n            },\n            encodingMap: {\n                metric: makeEncodingItem('Metric'),\n                value:  makeEncodingItem('Value'),\n            },\n            chartProperties: { layout: 'horizontal' },\n        },\n\n        // ── Multi-tile, pre-formatted heterogeneous ───────────────────────\n        {\n            title: 'KPI: Multi-tile (heterogeneous, pre-formatted)',\n            description:\n                'Per-tile units handled by the agent formatting each `Value` ' +\n                'upstream. Template renders verbatim.',\n            tags: ['gallery', 'bi', 'kpi', 'multi-metric', 'preformatted'],\n            chartType: 'KPI Card',\n            data: [\n                { Metric: 'Revenue',  Value: '$1.23M'  },\n                { Metric: 'Orders',   Value: '5,682'   },\n                { Metric: 'Avg Cart', Value: '$217.45' },\n                { Metric: 'Refunds',  Value: '312'     },\n            ],\n            fields: [makeField('Metric'), makeField('Value')],\n            metadata: {\n                Metric: { type: Type.String, semanticType: 'Category', levels: [] },\n                Value:  { type: Type.String, semanticType: 'Category', levels: [] },\n            },\n            encodingMap: {\n                metric: makeEncodingItem('Metric'),\n                value:  makeEncodingItem('Value'),\n            },\n            chartProperties: { layout: 'horizontal' },\n        },\n\n        // ── Multi-tile with numeric goal (progress bar) ───────────────────\n        {\n            title: 'KPI: With goal (progress bar)',\n            description:\n                'Both value and goal are numeric → small \"X% of goal\" line + ' +\n                'progress bar beneath the big number.',\n            tags: ['gallery', 'bi', 'kpi', 'goal', 'progress'],\n            chartType: 'KPI Card',\n            data: [\n                { Metric: 'Q1 Revenue', Value: 1_184_320, Goal: 1_500_000 },\n                { Metric: 'Signups',    Value:     1_182, Goal:     2_000 },\n                { Metric: 'NPS',        Value:        47, Goal:        60 },\n                { Metric: 'Stretch',    Value:       128, Goal:       100 }, // overshoot\n            ],\n            fields: [makeField('Metric'), makeField('Value'), makeField('Goal')],\n            metadata: {\n                Metric: { type: Type.String, semanticType: 'Category', levels: [] },\n                Value:  { type: Type.Number, semanticType: 'Quantity', levels: [] },\n                Goal:   { type: Type.Number, semanticType: 'Quantity', levels: [] },\n            },\n            encodingMap: {\n                metric: makeEncodingItem('Metric'),\n                value:  makeEncodingItem('Value'),\n                goal:   makeEncodingItem('Goal'),\n            },\n            chartProperties: { layout: 'horizontal' },\n        },\n\n        // ── Multi-tile with string goal (no progress bar) ─────────────────\n        {\n            title: 'KPI: With goal (string, no progress bar)',\n            description:\n                'String value or string goal → progress bar suppressed; ' +\n                'goal renders as a \"Goal: …\" line.',\n            tags: ['gallery', 'bi', 'kpi', 'goal'],\n            chartType: 'KPI Card',\n            data: [\n                { Metric: 'Revenue',  Value: '$1.18M', Goal: '$1.50M' },\n                { Metric: 'Headcount',Value: '142',    Goal: '160'    },\n            ],\n            fields: [makeField('Metric'), makeField('Value'), makeField('Goal')],\n            metadata: {\n                Metric: { type: Type.String, semanticType: 'Category', levels: [] },\n                Value:  { type: Type.String, semanticType: 'Category', levels: [] },\n                Goal:   { type: Type.String, semanticType: 'Category', levels: [] },\n            },\n            encodingMap: {\n                metric: makeEncodingItem('Metric'),\n                value:  makeEncodingItem('Value'),\n                goal:   makeEncodingItem('Goal'),\n            },\n            chartProperties: { layout: 'horizontal' },\n        },\n\n        // ── Vertical layout ───────────────────────────────────────────────\n        {\n            title: 'KPI: Vertical layout',\n            description: 'Same data as multi-tile numeric, stacked vertically.',\n            tags: ['gallery', 'bi', 'kpi', 'multi-metric', 'vertical'],\n            chartType: 'KPI Card',\n            data: [\n                { Metric: 'Active Users',  Value: 12_402 },\n                { Metric: 'New Signups',   Value:  1_182 },\n                { Metric: 'Churn',         Value:    214 },\n                { Metric: 'Power Users',   Value:    876 },\n            ],\n            fields: [makeField('Metric'), makeField('Value')],\n            metadata: {\n                Metric: { type: Type.String, semanticType: 'Category', levels: [] },\n                Value:  { type: Type.Number, semanticType: 'Quantity', levels: [] },\n            },\n            encodingMap: {\n                metric: makeEncodingItem('Metric'),\n                value:  makeEncodingItem('Value'),\n            },\n            chartProperties: { layout: 'vertical' },\n        },\n        ...realKpiCases(),\n    ];\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Chart Gallery–only assets (fixed datasets + test generators).\n */\n\nexport {\n    REGIONAL_SURVEY_ROWS,\n    regionalSurveyTable,\n    REGIONAL_SURVEY_AXIS_LEVELS,\n    type RegionalSurveyRow,\n} from './regional-survey-data';\n\nexport {\n    genGalleryRegionalSurveyScatterTests,\n    genGalleryRegionalSurveyLineTests,\n    genGalleryRegionalSurveyBarTests,\n    genGalleryRegionalSurveyStackedBarTests,\n    genGalleryRegionalSurveyGroupedBarTests,\n    genGalleryRegionalSurveyAreaTests,\n    genGalleryRegionalSurveyPieTests,\n    genGalleryRegionalSurveyHistogramTests,\n    genGalleryRegionalSurveyRadarTests,\n    genGalleryRegionalSurveyRoseTests,\n} from './regional-survey-tests';\n\nexport { genGalleryKpiCardTests } from './bi-tests';\n\n/** Keys registered in `TEST_GENERATORS` for the Regional Survey gallery tab. */\nexport const GALLERY_REGIONAL_SURVEY_GENERATOR_KEYS = [\n    'Gallery: Scatter',\n    'Gallery: Line',\n    'Gallery: Bar',\n    'Gallery: Stacked Bar',\n    'Gallery: Grouped Bar',\n    'Gallery: Area',\n    'Gallery: Pie',\n    'Gallery: Histogram',\n    'Gallery: Radar',\n    'Gallery: Rose',\n    'Gallery: Stress Tests',\n] as const;\n"]}