{"record":{"id":"1234227efcab8ef4","repo":"iOfficeAI/OfficeCLI","slug":"unknown-chart-type-kind-supported-column-b","errorCode":null,"errorMessage":"Unknown chart type: '{kind}'. Supported: column, bar, line, pie, doughnut, area, scatter, bubble, radar, stock, combo, waterfall. Add 'stacked' or 'percentstacked' suffix for variants (e.g. columnstacked).","messagePattern":"Unknown chart type: '(.+?)'\\. Supported: column, bar, line, pie, doughnut, area, scatter, bubble, radar, stock, combo, waterfall\\. Add 'stacked' or 'percentstacked' suffix for variants \\(e\\.g\\. columnstacked\\)\\.","errorType":"validation","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/officecli/Core/Chart/ChartHelper.Builder.cs","lineNumber":382,"sourceCode":"                int gi = 0;\n                while (gi < seriesData.Count)\n                {\n                    var t = gi < comboTypes.Length ? comboTypes[gi] : \"line\";\n                    int gj = gi + 1;\n                    while (gj < seriesData.Count\n                           && gj < comboTypes.Length\n                           && comboTypes[gj] == t)\n                        gj++;\n                    BuildComboGroup(t, plotArea, seriesData, categories,\n                        startIdx: gi, endIdxExclusive: gj,\n                        catAxisId, valAxisId, colors, noFillSeries);\n                    gi = gj;\n                }\n                chartElement = null;\n                break;\n            }\n            default:\n                throw new ArgumentException(\n                    $\"Unknown chart type: '{kind}'. Supported: column, bar, line, pie, doughnut, area, scatter, bubble, radar, stock, combo, waterfall. \" +\n                    \"Add 'stacked' or 'percentstacked' suffix for variants (e.g. columnstacked).\");\n        }\n\n        if (chartElement != null)\n            plotArea.AppendChild(chartElement);\n\n        if (needsAxes)\n        {\n            if (kind == \"scatter\")\n            {\n                plotArea.AppendChild(BuildValueAxis(catAxisId, valAxisId, C.AxisPositionValues.Bottom));\n                plotArea.AppendChild(BuildValueAxis(valAxisId, catAxisId, C.AxisPositionValues.Left));\n            }\n            else\n            {\n                plotArea.AppendChild(BuildCategoryAxis(catAxisId, valAxisId));\n                plotArea.AppendChild(BuildValueAxis(valAxisId, catAxisId, C.AxisPositionValues.Left));","sourceCodeStart":364,"sourceCodeEnd":400,"githubUrl":"https://github.com/iOfficeAI/OfficeCLI/blob/1ced45e900782c5083ed550ddf328ee974e425e7/src/officecli/Core/Chart/ChartHelper.Builder.cs#L364-L400","documentation":"The chart builder dispatches on a 'kind' string to construct the appropriate OOXML chart element (column, bar, line, pie, doughnut, area, scatter, bubble, radar, stock, combo, waterfall). Any unrecognized kind reaches the default arm and throws. Stacked/percentStacked suffixes are handled within specific chart-type arms (column, bar, line, area), not by this dispatch.","triggerScenarios":"Creating a chart with an unrecognized type string: kind='histogram', kind='treemap', kind='sunburst', kind='colum'. The kind is matched against the switch arms before any chart element is built.","commonSituations":"Misspelling a chart type ('colunm', 'dognut', 'watterfall'). Using a chart type supported by newer Excel versions but not by this library (histogram, treemap, funnel). Using an OOXML internal name instead of the friendly name (e.g. 'barChart' instead of 'bar').","solutions":["Use one of the supported types: column, bar, line, pie, doughnut, area, scatter, bubble, radar, stock, combo, waterfall.","Append 'stacked' or 'percentstacked' for supported variants: columnstacked, barpercentstacked.","Check spelling — the error message lists all valid types."],"exampleFix":"// before\nkind: \"colunm\"\n// after\nkind: \"column\"\n// stacked variant\nkind: \"columnstacked\"","handlingStrategy":"validation","validationCode":"static readonly HashSet<string> ValidChartTypes = new(StringComparer.OrdinalIgnoreCase)\n{ \"column\", \"bar\", \"line\", \"pie\", \"doughnut\", \"area\", \"scatter\",\n  \"bubble\", \"radar\", \"stock\", \"combo\", \"waterfall\" };\n\nstatic bool IsValidChartKind(string kind)\n{\n    // Check base type (strip stacked/percentstacked suffix)\n    var baseKind = kind.EndsWith(\"percentstacked\", StringComparison.OrdinalIgnoreCase)\n        ? kind[..^14]\n        : kind.EndsWith(\"stacked\", StringComparison.OrdinalIgnoreCase)\n            ? kind[..^7] : kind;\n    return ValidChartTypes.Contains(baseKind);\n}","typeGuard":null,"tryCatchPattern":"try { ChartHelper.BuildChart(kind, ...); }\ncatch (ArgumentException ex) when (ex.Message.StartsWith(\"Unknown chart type\"))\n{\n    Console.Error.WriteLine($\"{ex.Message}\");\n}","preventionTips":["Validate the chart kind against the supported set before building.","Check spelling carefully (column, not colunm; doughnut, not donut).","Append stacked/percentstacked only to chart types that support variants."],"tags":["chart","chart-type","builder","invalid-value"],"backgroundTag":null,"analyzedSha":"1ced45e900782c5083ed550ddf328ee974e425e7","analyzedAt":"2026-08-13T13:01:07.193Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}