From c2e050ef74b309fa5930d6255aab0266196f52cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Tue, 15 Oct 2024 09:39:19 +0800 Subject: [PATCH] Legend --- NewLife.CubeNC/Charts/ECharts.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NewLife.CubeNC/Charts/ECharts.cs b/NewLife.CubeNC/Charts/ECharts.cs index 18da6602..c368f154 100644 --- a/NewLife.CubeNC/Charts/ECharts.cs +++ b/NewLife.CubeNC/Charts/ECharts.cs @@ -562,6 +562,8 @@ public Series AddGraph(GraphViewModel model) graph["links"] = model.Links; graph["categories"] = model.Categories; + Legend = new { Data = model.Categories.Select(e => e.Name).ToArray() }; + return graph; } #endregion