This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch v6-doc-supplement-2 in repository https://gitbox.apache.org/repos/asf/echarts-doc.git
commit 05da6bf389c669f4e0eefcc054c3842d17bda9b7 Author: 100pah <sushuang0...@gmail.com> AuthorDate: Wed Aug 6 01:36:19 2025 +0800 Add graph embedded case (simple graph) --- zh/option/series/graph.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/zh/option/series/graph.md b/zh/option/series/graph.md index ba3a7bfb..460e1fb0 100644 --- a/zh/option/series/graph.md +++ b/zh/option/series/graph.md @@ -11,7 +11,7 @@ ~[600x400](${galleryViewPath}graph&reset=1&edit=1) -<ExampleBaseOption name="graph" title="复杂关系图" title="Complex Graph"> +<ExampleBaseOption name="complex_graph" title="复杂关系图" title-en="Complex Graph"> const option = {"title":{"text":"Les Miserables","subtext":"Default layout","top":"bottom","left":"right"},"tooltip":{},"legend":[{"data":["类目0","类目1","类目2","类目3","类目4","类目5","类目6","类目7","类目8"]}],"animationDuration":1500,"animationEasingUpdate":"quinticInOut","series":[{"name":"Les Miserables","type":"graph","layout":"none","data":[{"id":"0","name":"Myriel","symbolSize":19.12381,"x":-266.82776,"y":299.6904,"value":28.685715,"category":0},{"id":"1","name":"Napoleon","symbolSize":2.6666666 [...] option.series[0].data.forEach(function (item) { @@ -20,6 +20,35 @@ option.series[0].data.forEach(function (item) { }); </ExampleBaseOption> +<ExampleBaseOption name="simple_graph" title="简单关系图" title-en="Simple Graph"> +const option = { + tooltip: {}, + series: { + type: "graph", + id: "graph0", + symbolSize: 35, + label: {show: true}, + edgeSymbol: ["circle", "arrow"], + edgeSymbolSize: [4, 15], + lineStyle: {opacity: 1, width: 2,}, + data: [ + {name: "node_1", x: 300, y: 300}, + {name: "node_2", x: 800, y: 300}, + {name: "node_3", x: 550, y: 100}, + {name: "node_4", x: 550, y: 500}, + ], + edges: [ + {source: 0, target: 1, lineStyle: {width: 5, curveness: 0.2}}, + {source: "node_2", target: "node_1", lineStyle: {curveness: 0.2}}, + {source: "node_1", target: "node_3"}, + {source: "node_2", target: "node_3"}, + {source: "node_2", target: "node_4"}, + {source: "node_1", target: "node_4"}, + ], + }, +}; +</ExampleBaseOption> + ## type(string) = 'graph' {{ use: partial-component-id( --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org