重构Component相关代码,调整API接口

This commit is contained in:
monitor1394
2023-02-12 21:22:53 +08:00
parent 22b167981b
commit 4964bca341
57 changed files with 349 additions and 185 deletions

View File

@@ -107,7 +107,7 @@ namespace XCharts.Example
{
chart.GetChartComponent<Title>().subText = "AreaStyle 面积图";
serie.AddExtraComponent<AreaStyle>();
serie.EnsureComponent<AreaStyle>();
serie.areaStyle.show = true;
chart.RefreshChart();
yield return new WaitForSeconds(1f);
@@ -136,7 +136,7 @@ namespace XCharts.Example
IEnumerator LineArrowSettings()
{
chart.GetChartComponent<Title>().subText = "LineArrow 头部箭头";
chart.GetSerie(0).AddExtraComponent<LineArrow>();
chart.GetSerie(0).EnsureComponent<LineArrow>();
serie.lineArrow.show = true;
serie.lineArrow.position = LineArrow.Position.Start;
chart.RefreshChart();
@@ -198,7 +198,7 @@ namespace XCharts.Example
IEnumerator LineLabelSettings()
{
chart.GetChartComponent<Title>().subText = "SerieLabel 文本标签";
serie.AddExtraComponent<LabelStyle>();
serie.EnsureComponent<LabelStyle>();
chart.RefreshChart();
while (serie.label.offset[1] < 20)
{