{"record":{"id":"6f63fb4389c2bc2c","repo":"iOfficeAI/OfficeCLI","slug":"chart-type-charttype-is-not-supported-ooxml-h","errorCode":null,"errorMessage":"Chart type '{chartType}' is not supported. OOXML has no Scatter3D or Radar3D variant — both CT_ScatterChart and CT_RadarChart are 2D-only. Use 'scatter' / 'radar' (optionally with radarStyle=filled|marker|standard).","messagePattern":"Chart type '(.+?)' is not supported\\. OOXML has no Scatter3D or Radar3D variant — both CT_ScatterChart and CT_RadarChart are 2D-only\\. Use 'scatter' / 'radar' \\(optionally with radarStyle=filled\\|marker\\|standard\\)\\.","errorType":"validation","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/officecli/Core/Chart/ChartHelper.cs","lineNumber":31,"sourceCode":"internal static partial class ChartHelper\n{\n    // ==================== Parse Helpers ====================\n\n    internal static (string kind, bool is3D, bool stacked, bool percentStacked) ParseChartType(string chartType)\n    {\n        var ct = SchemaKeyNormalizer.Normalize(chartType);\n        var is3D = ct.EndsWith(\"3d\") || ct.Contains(\"3d\");\n        ct = ct.Replace(\"3d\", \"\");\n\n        // OOXML has no Scatter3D or Radar3D variant — CT_ScatterChart and\n        // CT_RadarChart are 2D-only. Previously `scatter3d`/`radar3d` silently\n        // had the `3d` stripped and became plain scatter/radar, losing caller\n        // intent (round-trip returned `scatter`/`radar`, real PowerPoint\n        // rendered flat). Reject these forms explicitly with a helpful error\n        // pointing at the supported alternatives.\n        if (is3D && (ct == \"scatter\" || ct == \"xy\" || ct == \"radar\" || ct == \"spider\"))\n        {\n            throw new ArgumentException(\n                $\"Chart type '{chartType}' is not supported. \" +\n                \"OOXML has no Scatter3D or Radar3D variant — both CT_ScatterChart and CT_RadarChart \" +\n                \"are 2D-only. Use 'scatter' / 'radar' (optionally with radarStyle=filled|marker|standard).\");\n        }\n\n        var stacked = ct.Contains(\"stacked\") && !ct.Contains(\"percent\");\n        var percentStacked = ct.Contains(\"percentstacked\") || ct.Contains(\"pstacked\");\n        ct = ct.Replace(\"percentstacked\", \"\").Replace(\"pstacked\", \"\").Replace(\"stacked\", \"\");\n\n        var kind = ct switch\n        {\n            \"bar\" => \"bar\",\n            \"column\" or \"col\" => \"column\",\n            \"line\" => \"line\",\n            \"pie\" => \"pie\",\n            \"pieofpie\" => \"pieofpie\",\n            \"barofpie\" => \"barofpie\",\n            \"doughnut\" or \"donut\" => \"doughnut\",","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/iOfficeAI/OfficeCLI/blob/1ced45e900782c5083ed550ddf328ee974e425e7/src/officecli/Core/Chart/ChartHelper.cs#L13-L49","documentation":"Thrown by ParseChartType (ChartHelper.cs:31) when the chart type is 3D and the base type is scatter/xy or radar/spider. OOXML has no Scatter3D or Radar3D variant — both CT_ScatterChart and CT_RadarChart are strictly 2D. The pre-fix code silently stripped '3d' and produced a flat chart, losing caller intent (round-trip returned scatter/radar, PowerPoint rendered flat). The check runs after the '3d' substring is detected and stripped.","triggerScenarios":"Requesting type=scatter3d, type=radar3d, type=xy3d, type=spider3d, or any 3d-modified scatter/radar variant.","commonSituations":"Assuming every chart type has a 3D variant (column/bar/pie do, but scatter and radar do not); generically appending '3d' to a user-supplied type; migrating from a tool that offered a pseudo-3D scatter.","solutions":["Use 'scatter' or 'radar' (2D only) — there is no 3D variant in OOXML.","For radar, vary appearance with radarStyle=filled|marker|standard instead of a 3D modifier.","Pick a genuinely 3D-capable type (column3d, bar3d, pie3d) if 3D rendering is required."],"exampleFix":"// before\ntype=scatter3d\n// after\ntype=scatter","handlingStrategy":"validation","validationCode":"static readonly HashSet<string> No3DAllowed = new(StringComparer.OrdinalIgnoreCase) { \"scatter\",\"xy\",\"radar\",\"spider\" };\nstatic string ValidateChartType(string type)\n{\n    var lower = type.ToLowerInvariant();\n    var is3D = lower.Contains(\"3d\");\n    var base_ = lower.Replace(\"3d\",\"\");\n    if (is3D && No3DAllowed.Contains(base_)) throw new ArgumentException($\"no 3D variant for {base_}\");\n    return type;\n}","typeGuard":"static bool IsSupportedChartType(string type)\n{\n    var lower = type.ToLowerInvariant();\n    var is3D = lower.Contains(\"3d\");\n    var base_ = lower.Replace(\"3d\",\"\");\n    return !(is3D && No3DAllowed.Contains(base_));\n}","tryCatchPattern":"try { /* set chart type=... */ }\ncatch (ArgumentException ex) when (ex.Message.Contains(\"is not supported\") && ex.Message.Contains(\"Scatter3D\"))\n{ /* fall back to 2D scatter/radar */ }","preventionTips":["Remember scatter and radar are 2D-only in OOXML — never append '3d'.","Only column/bar/pie/area have 3D variants.","Use radarStyle for radar appearance variation instead of a 3D modifier."],"tags":["chart","chart-type","validation","ooxml"],"backgroundTag":null,"analyzedSha":"1ced45e900782c5083ed550ddf328ee974e425e7","analyzedAt":"2026-08-13T13:01:07.193Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}