{"record":{"id":"8e4e4c264f1313c1","repo":"apache/echarts","slug":"the-polyline-edgeshape-can-only-be-used-in-orthogo","errorCode":null,"errorMessage":"The polyline edgeShape can only be used in orthogonal layout","messagePattern":"The polyline edgeShape can only be used in orthogonal layout","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/chart/tree/TreeView.ts","lineNumber":543,"sourceCode":"                        shape: {\n                            parentPoint: [targetLayout.x, targetLayout.y],\n                            childPoints: [[targetLayout.x, targetLayout.y]],\n                            orient: orient,\n                            forkPosition: edgeForkPosition\n                        }\n                    });\n                }\n                graphic.updateProps(edge as Path, {\n                    shape: {\n                        parentPoint: [targetLayout.x, targetLayout.y],\n                        childPoints: childPoints\n                    }\n                }, seriesModel);\n            }\n        }\n        else {\n            if (__DEV__) {\n                throw new Error('The polyline edgeShape can only be used in orthogonal layout');\n            }\n        }\n    }\n\n    // show all edge when edgeShape is 'curve', filter node `isExpand` is false when edgeShape is 'polyline'\n    if (edge && !(edgeShape === 'polyline' && !node.isExpand)) {\n        edge.useStyle(zrUtil.defaults({\n            strokeNoScale: true, fill: null\n        }, lineStyle));\n\n        setStatesStylesFromModel(edge, itemModel, 'lineStyle');\n        setDefaultStateProxy(edge);\n\n        group.add(edge);\n    }\n}\n\nfunction removeNodeEdge(","sourceCodeStart":525,"sourceCodeEnd":561,"githubUrl":"https://github.com/apache/echarts/blob/30076aedcd7b7f65d8dd8e8d9ece46ce778133a3/src/chart/tree/TreeView.ts#L525-L561","documentation":"DEV-only guard in TreeView edge rendering: the 'polyline' edgeShape (right-angled orthogonal connectors) is only supported when the tree layout is 'orthogonal'. Using polyline with layout 'radial' or 'none' is rejected in dev. Stripped in production.","triggerScenarios":"tree series with edgeShape:'polyline' combined with a layout other than 'orthogonal' (e.g. 'radial').","commonSituations":"Switching a tree from orthogonal to radial but leaving edgeShape:'polyline'; copying a tree config across layouts.","solutions":["Use edgeShape:'polyline' only with layout:'orthogonal'","For radial or other layouts, use edgeShape:'curve'"],"exampleFix":"// before\n{ type: 'tree', layout: 'radial', edgeShape: 'polyline', data: [...] }\n\n// after\n{ type: 'tree', layout: 'orthogonal', edgeShape: 'polyline', data: [...] }\n// or\n{ type: 'tree', layout: 'radial', edgeShape: 'curve', data: [...] }","handlingStrategy":"validation","validationCode":"(option.series || []).forEach((s: any) => {\n  if (s.type === 'tree' && s.edgeShape === 'polyline' && s.layout && s.layout !== 'orthogonal') {\n    console.error('[tree] polyline edgeShape requires layout:orthogonal');\n  }\n});","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match edgeShape to the tree layout","Default to edgeShape:'curve' for radial trees","Audit tree config when switching layouts"],"tags":["tree","edge-shape","layout","dev-only"],"backgroundTag":null,"analyzedSha":"30076aedcd7b7f65d8dd8e8d9ece46ce778133a3","analyzedAt":"2026-08-12T12:42:28.134Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}