From 7465bb760d4823d03a934e4c9fc658f871101d75 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 5 Mar 2020 20:25:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=90=E8=A1=8C=E6=97=B6?= =?UTF-8?q?=E5=92=8C=E9=9D=9E=E8=BF=90=E8=A1=8C=E6=97=B6=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + Demo/Runtime/Demo13_LineSimple.cs | 2 + Demo/Runtime/Demo_Test.cs | 51 ++-- Editor/PropertyDrawers/SerieDrawer.cs | 3 + Runtime/API/CoordinateChart_API.cs | 2 - Runtime/API/RadarChart_API.cs | 1 - Runtime/Component/ChartComponent.cs | 48 ++- Runtime/Component/Main/Axis.cs | 260 ++++++++-------- Runtime/Component/Main/DataZoom.cs | 112 +++++-- Runtime/Component/Main/Legend.cs | 173 ++++++----- Runtime/Component/Main/Radar.cs | 190 +++--------- Runtime/Component/Main/Serie.cs | 370 +++++++++++++++++++---- Runtime/Component/Main/Series.cs | 72 ++++- Runtime/Component/Main/Settings.cs | 45 ++- Runtime/Component/Main/Theme.cs | 124 +++----- Runtime/Component/Main/Title.cs | 95 ++---- Runtime/Component/Main/Tooltip.cs | 40 ++- Runtime/Component/Main/VisualMap.cs | 121 ++++++-- Runtime/Component/Main/XGrid.cs | 100 ++---- Runtime/Component/Sub/AreaStyle.cs | 48 ++- Runtime/Component/Sub/AxisLabel.cs | 111 ++++--- Runtime/Component/Sub/AxisLine.cs | 50 ++- Runtime/Component/Sub/AxisName.cs | 82 +++-- Runtime/Component/Sub/AxisSplitArea.cs | 12 +- Runtime/Component/Sub/AxisSplitLine.cs | 48 ++- Runtime/Component/Sub/AxisTick.cs | 24 +- Runtime/Component/Sub/Emphasis.cs | 35 ++- Runtime/Component/Sub/GaugeAxis.cs | 1 - Runtime/Component/Sub/GaugePointer.cs | 18 +- Runtime/Component/Sub/ItemStyle.cs | 36 ++- Runtime/Component/Sub/LineArrow.cs | 36 ++- Runtime/Component/Sub/LineStyle.cs | 32 +- Runtime/Component/Sub/Location.cs | 93 ++---- Runtime/Component/Sub/SerieLabel.cs | 147 +++++++-- Runtime/Component/Sub/SerieSymbol.cs | 90 +++++- Runtime/Component/Sub/TextLimit.cs | 50 ++- Runtime/Component/Sub/TextStyle.cs | 48 ++- Runtime/Component/Sub/TitleStyle.cs | 3 - Runtime/Helper/LegendHelper.cs | 2 - Runtime/Internal/BaseChart.cs | 171 +++++------ Runtime/Internal/CoordinateChart.cs | 143 +++++---- Runtime/Internal/PropertyUtility.cs | 52 ++++ Runtime/Internal/PropertyUtility.cs.meta | 11 + Runtime/RadarChart.cs | 45 ++- 44 files changed, 1989 insertions(+), 1209 deletions(-) create mode 100644 Runtime/Internal/PropertyUtility.cs create mode 100644 Runtime/Internal/PropertyUtility.cs.meta diff --git a/CHANGELOG.md b/CHANGELOG.md index ba40b0db..33e1a615 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 更新日志 +* (2020.03.05) 增加运行时和非运行时参数变更自动刷新图表 * (2020.02.26) 重构`Legend`图例,改变样式,增加自定义图标等设置 * (2020.02.23) 增加`BaseChart.AnimationFadeOut()`渐出动画,重构动画系统 * (2020.02.13) 增加`BaseChart.RefreshTooltip()`接口立即重新初始化`Tooltip`组件 diff --git a/Demo/Runtime/Demo13_LineSimple.cs b/Demo/Runtime/Demo13_LineSimple.cs index a157d443..950246d2 100644 --- a/Demo/Runtime/Demo13_LineSimple.cs +++ b/Demo/Runtime/Demo13_LineSimple.cs @@ -38,10 +38,12 @@ namespace XCharts chart.RemoveData(); chart.AddSerie(SerieType.Line); + chart.AddSerie(SerieType.Line); for (int i = 0; i < 10; i++) { chart.AddXAxisData("x" + i); chart.AddData(0, Random.Range(10, 20)); + chart.AddData(1, Random.Range(10, 20)); } } } diff --git a/Demo/Runtime/Demo_Test.cs b/Demo/Runtime/Demo_Test.cs index a7c32bcc..09d9ce4e 100644 --- a/Demo/Runtime/Demo_Test.cs +++ b/Demo/Runtime/Demo_Test.cs @@ -19,30 +19,41 @@ namespace XCharts void Awake() { chart = gameObject.GetComponent(); + var btnTrans = transform.parent.Find("Button"); + if (btnTrans) + { + btnTrans.gameObject.GetComponent