Skip to content

Commit

Permalink
[bug] Fix pie color
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed Apr 7, 2022
1 parent 1ed0ff3 commit 621bc3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Runtime/Helper/SeriesHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ public static void UpdateSerieNameList(BaseChart chart, ref List<string> serieNa
{
for (int i = 0; i < serie.data.Count; i++)
{
if (serie is Pie && serie.IsIgnoreValue(serie.data[i])) continue;
if (string.IsNullOrEmpty(serie.data[i].name))
var serieData = serie.data[i];
if (serie is Pie && serie.IsIgnoreValue(serieData)) continue;
if (string.IsNullOrEmpty(serieData.name))
serieNameList.Add(ChartCached.IntToStr(i));
else if (!serieNameList.Contains(serie.data[i].name))
serieNameList.Add(serie.data[i].name);
else if (!serieNameList.Contains(serieData.name))
serieNameList.Add(serieData.name);
}
}
else
Expand Down
1 change: 1 addition & 0 deletions Runtime/Serie/SerieHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public override void Update()
}
if (serie.dataDirty)
{
SeriesHelper.UpdateSerieNameList(chart, ref chart.m_LegendRealShowName);
serie.OnDataUpdate();
serie.dataDirty = false;
}
Expand Down

0 comments on commit 621bc3d

Please sign in to comment.