重构Legend图例,改变样式,增加自定义图标等设置

This commit is contained in:
monitor1394
2020-02-26 22:52:57 +08:00
parent 31355b047f
commit ade587a478
20 changed files with 661 additions and 136 deletions

View File

@@ -32,6 +32,7 @@ namespace XCharts
{
base.Reset();
m_Title.text = "PieChart";
m_Legend.show = true;
RemoveData();
AddSerie(SerieType.Pie, "serie1");
AddData(0, 70, "pie1");
@@ -484,9 +485,8 @@ namespace XCharts
protected override void OnLegendButtonClick(int index, string legendName, bool show)
{
bool active = CheckDataShow(legendName, show);
var bgColor1 = active ? m_ThemeInfo.GetColor(index) : m_ThemeInfo.legendUnableColor;
m_Legend.UpdateButtonColor(legendName, bgColor1);
CheckDataShow(legendName, show);
UpdateLegendColor(legendName, show);
RefreshChart();
}