From 96a49f2b110113a05117fd600dce314d46d9ccbb Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Tue, 12 Jul 2022 07:38:42 +0800 Subject: [PATCH] v3.1.0 --- CHANGELOG.md | 4 ++++ Documentation/CHANGELOG.md | 9 +++++++++ Documentation/XChartsAPI-EN.md | 10 +++++----- Documentation/XChartsAPI-ZH.md | 10 +++++----- Documentation/XChartsTutorial01-ZH.md | 1 + Runtime/Internal/XChartsMgr.cs | 4 ++-- package.json | 7 ++++--- 7 files changed, 30 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 700e2cb9..5175d041 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ # 更新日志 [master](#master) +[v3.1.0](#v3.1.0) [v3.0.1](#v3.0.1) [v3.0.0](#v3.0.0) [v3.0.0-preivew9](#v3.0.0-preivew9) @@ -56,6 +57,9 @@ ## master +## 3.1.0 + +* (2022.07.12) 发布`v3.1.0`版本 * (2022.07.12) 修复`Serie`的`ignoreLineBreak`不生效的问题 * (2022.07.07) 优化`Axis`的`minMaxType`指定为`MinMax`时支持精确到小数 * (2022.07.05) 修复`Chart`里有多个坐标系时绘制异常的问题 (#210) diff --git a/Documentation/CHANGELOG.md b/Documentation/CHANGELOG.md index 3e345436..cbf39439 100644 --- a/Documentation/CHANGELOG.md +++ b/Documentation/CHANGELOG.md @@ -2,6 +2,7 @@ # 更新日志 [master](#master) +[v3.1.0](#v3.1.0) [v3.0.1](#v3.0.1) [v3.0.0](#v3.0.0) [v3.0.0-preivew9](#v3.0.0-preivew9) @@ -56,6 +57,14 @@ ## master +## 3.1.0 + +* (2022.07.12) Release `v3.1.0` version +* (2022.07.12) Fixed `Serie` `ignoreLineBreak` not working +* (2022.07.07) Optimized `Axis` `minMaxType` to support precision to decimals when specified as `MinMax` +* (2022.07.05) Fixed drawing exception when there are multiple coordinate systems in `Chart` (#210) +* (2022.07.04) Added the axisMaxSplitNumber parameter of `Settings` to set the maximum number of partitions for `Axis` +* (2022.07.04) Fixed Axis` Tick `drawing position after setting `offset`(#209) * (2022.07.03) Optimize the `AxisLabel` formatterFunction custom delegate * (2022.07.03) added the `onZero` parameter of `AxisName` to support setting the coordinate AxisName and position to match the Y-axis 0 scale (#207) * (2022.07.02) Fixed bug where `Legend` was not working when `PieChart` was being created dynamically with code (#206) diff --git a/Documentation/XChartsAPI-EN.md b/Documentation/XChartsAPI-EN.md index 7752fdc9..0b26bdc4 100644 --- a/Documentation/XChartsAPI-EN.md +++ b/Documentation/XChartsAPI-EN.md @@ -121,7 +121,7 @@ Inherits or Implemented: [MainComponentHandler](#MainComponentHandler) |public method|description| |--|--| | `AdjustCircleLabelPos()` |public static void AdjustCircleLabelPos(ChartLabel txt, Vector3 pos, Vector3 cenPos, float txtHig, Vector3 offset)
| -| `AdjustMinMaxValue()` |public static void AdjustMinMaxValue(Axis axis, ref double minValue, ref double maxValue, bool needFormat, int ceilRate = 0)
调整最大最小值 | +| `AdjustMinMaxValue()` |public static void AdjustMinMaxValue(Axis axis, ref double minValue, ref double maxValue, bool needFormat, double ceilRate = 0)
调整最大最小值 | | `AdjustRadiusAxisLabelPos()` |public static void AdjustRadiusAxisLabelPos(ChartLabel txt, Vector3 pos, Vector3 cenPos, float txtHig, Vector3 offset)
| | `GetAxisLineArrowOffset()` |public static float GetAxisLineArrowOffset(Axis axis)
包含箭头偏移的轴线长度 | | `GetAxisPosition()` |public static float GetAxisPosition(GridCoord grid, Axis axis, double value, int dataCount = 0, DataZoom dataZoom = null)
| @@ -343,9 +343,9 @@ Inherits or Implemented: [BaseChart](#BaseChart) | `GetFullName()` |public static string GetFullName(Transform transform)
| | `GetHighlightColor()` |public static Color32 GetHighlightColor(Color32 color, float rate = 0.8f)
| | `GetLastValue()` |public static Vector3 GetLastValue(List list)
| -| `GetMaxDivisibleValue()` |public static double GetMaxDivisibleValue(double max, int ceilRate)
| +| `GetMaxDivisibleValue()` |public static double GetMaxDivisibleValue(double max, double ceilRate)
| | `GetMaxLogValue()` |public static double GetMaxLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)
| -| `GetMinDivisibleValue()` |public static double GetMinDivisibleValue(double min, int ceilRate)
| +| `GetMinDivisibleValue()` |public static double GetMinDivisibleValue(double min, double ceilRate)
| | `GetMinLogValue()` |public static double GetMinLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)
| | `GetPointList()` |public static void GetPointList(ref List posList, Vector3 sp, Vector3 ep, float k = 30f)
| | `GetPos()` |public static Vector3 GetPos(Vector3 center, float radius, float angle, bool isDegree = false)
| @@ -824,7 +824,7 @@ Inherits or Implemented: [Attribute](#Attribute) |public method|description| |--|--| | `CopySerie()` |public static void CopySerie(Serie oldSerie, Serie newSerie)
| -| `GetAllMinMaxData()` |public static void GetAllMinMaxData(Serie serie, int ceilRate = 0, DataZoom dataZoom = null)
| +| `GetAllMinMaxData()` |public static void GetAllMinMaxData(Serie serie, double ceilRate = 0, DataZoom dataZoom = null)
| | `GetAreaColor()` |public static Color32 GetAreaColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)
| | `GetAreaStyle()` |public static AreaStyle GetAreaStyle(Serie serie, SerieData serieData)
| | `GetAreaToColor()` |public static Color32 GetAreaToColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)
| @@ -858,7 +858,7 @@ Inherits or Implemented: [Attribute](#Attribute) | `IsDownPoint()` |public static bool IsDownPoint(Serie serie, int index)
| | `UpdateCenter()` |public static void UpdateCenter(Serie serie, Vector3 chartPosition, float chartWidth, float chartHeight)
更新运行时中心点和半径 | | `UpdateFilterData()` |public static void UpdateFilterData(Serie serie, DataZoom dataZoom)
根据dataZoom更新数据列表缓存 | -| `UpdateMinMaxData()` |public static void UpdateMinMaxData(Serie serie, int dimension, int ceilRate = 0, DataZoom dataZoom = null)
获得指定维数的最大最小值 | +| `UpdateMinMaxData()` |public static void UpdateMinMaxData(Serie serie, int dimension, double ceilRate = 0, DataZoom dataZoom = null)
获得指定维数的最大最小值 | | `UpdateRect()` |public static void UpdateRect(Serie serie, Vector3 chartPosition, float chartWidth, float chartHeight)
| | `UpdateSerieRuntimeFilterData()` |public static void UpdateSerieRuntimeFilterData(Serie serie, bool filterInvisible = true)
| diff --git a/Documentation/XChartsAPI-ZH.md b/Documentation/XChartsAPI-ZH.md index 09d1558b..bfba19fd 100644 --- a/Documentation/XChartsAPI-ZH.md +++ b/Documentation/XChartsAPI-ZH.md @@ -121,7 +121,7 @@ Inherits or Implemented: [MainComponentHandler](#MainComponentHandler) |public method|description| |--|--| | `AdjustCircleLabelPos()` |public static void AdjustCircleLabelPos(ChartLabel txt, Vector3 pos, Vector3 cenPos, float txtHig, Vector3 offset)
| -| `AdjustMinMaxValue()` |public static void AdjustMinMaxValue(Axis axis, ref double minValue, ref double maxValue, bool needFormat, int ceilRate = 0)
调整最大最小值 | +| `AdjustMinMaxValue()` |public static void AdjustMinMaxValue(Axis axis, ref double minValue, ref double maxValue, bool needFormat, double ceilRate = 0)
调整最大最小值 | | `AdjustRadiusAxisLabelPos()` |public static void AdjustRadiusAxisLabelPos(ChartLabel txt, Vector3 pos, Vector3 cenPos, float txtHig, Vector3 offset)
| | `GetAxisLineArrowOffset()` |public static float GetAxisLineArrowOffset(Axis axis)
包含箭头偏移的轴线长度 | | `GetAxisPosition()` |public static float GetAxisPosition(GridCoord grid, Axis axis, double value, int dataCount = 0, DataZoom dataZoom = null)
| @@ -343,9 +343,9 @@ Inherits or Implemented: [BaseChart](#BaseChart) | `GetFullName()` |public static string GetFullName(Transform transform)
| | `GetHighlightColor()` |public static Color32 GetHighlightColor(Color32 color, float rate = 0.8f)
| | `GetLastValue()` |public static Vector3 GetLastValue(List list)
| -| `GetMaxDivisibleValue()` |public static double GetMaxDivisibleValue(double max, int ceilRate)
| +| `GetMaxDivisibleValue()` |public static double GetMaxDivisibleValue(double max, double ceilRate)
| | `GetMaxLogValue()` |public static double GetMaxLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)
| -| `GetMinDivisibleValue()` |public static double GetMinDivisibleValue(double min, int ceilRate)
| +| `GetMinDivisibleValue()` |public static double GetMinDivisibleValue(double min, double ceilRate)
| | `GetMinLogValue()` |public static double GetMinLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)
| | `GetPointList()` |public static void GetPointList(ref List posList, Vector3 sp, Vector3 ep, float k = 30f)
| | `GetPos()` |public static Vector3 GetPos(Vector3 center, float radius, float angle, bool isDegree = false)
| @@ -824,7 +824,7 @@ Inherits or Implemented: [Attribute](#Attribute) |public method|description| |--|--| | `CopySerie()` |public static void CopySerie(Serie oldSerie, Serie newSerie)
| -| `GetAllMinMaxData()` |public static void GetAllMinMaxData(Serie serie, int ceilRate = 0, DataZoom dataZoom = null)
| +| `GetAllMinMaxData()` |public static void GetAllMinMaxData(Serie serie, double ceilRate = 0, DataZoom dataZoom = null)
| | `GetAreaColor()` |public static Color32 GetAreaColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)
| | `GetAreaStyle()` |public static AreaStyle GetAreaStyle(Serie serie, SerieData serieData)
| | `GetAreaToColor()` |public static Color32 GetAreaToColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)
| @@ -858,7 +858,7 @@ Inherits or Implemented: [Attribute](#Attribute) | `IsDownPoint()` |public static bool IsDownPoint(Serie serie, int index)
| | `UpdateCenter()` |public static void UpdateCenter(Serie serie, Vector3 chartPosition, float chartWidth, float chartHeight)
更新运行时中心点和半径 | | `UpdateFilterData()` |public static void UpdateFilterData(Serie serie, DataZoom dataZoom)
根据dataZoom更新数据列表缓存 | -| `UpdateMinMaxData()` |public static void UpdateMinMaxData(Serie serie, int dimension, int ceilRate = 0, DataZoom dataZoom = null)
获得指定维数的最大最小值 | +| `UpdateMinMaxData()` |public static void UpdateMinMaxData(Serie serie, int dimension, double ceilRate = 0, DataZoom dataZoom = null)
获得指定维数的最大最小值 | | `UpdateRect()` |public static void UpdateRect(Serie serie, Vector3 chartPosition, float chartWidth, float chartHeight)
| | `UpdateSerieRuntimeFilterData()` |public static void UpdateSerieRuntimeFilterData(Serie serie, bool filterInvisible = true)
| diff --git a/Documentation/XChartsTutorial01-ZH.md b/Documentation/XChartsTutorial01-ZH.md index 216e3e89..4adb80a2 100644 --- a/Documentation/XChartsTutorial01-ZH.md +++ b/Documentation/XChartsTutorial01-ZH.md @@ -172,6 +172,7 @@ XCharts内部有自动刷新机制,但也是在一定条件下。如果自己 1. `chart.RefreshAllComponent()`:刷新图表组件,会重新初始化所有组件,不建议频繁待用。 2. `chart.RefreshChart()`:刷新图表绘制,只刷新绘制部分,不会刷新组件文本,位置等部分。 +3. 各个组件也可以通过`SetAllDirty()`只刷新自己。 ## 使用TextMeshPro diff --git a/Runtime/Internal/XChartsMgr.cs b/Runtime/Internal/XChartsMgr.cs index 69b9c211..9a839481 100644 --- a/Runtime/Internal/XChartsMgr.cs +++ b/Runtime/Internal/XChartsMgr.cs @@ -20,8 +20,8 @@ namespace XCharts.Runtime [ExecuteInEditMode] public static class XChartsMgr { - public static readonly string version = "3.0.1"; - public static readonly int versionDate = 20220616; + public static readonly string version = "3.1.0"; + public static readonly int versionDate = 20220712; public static string fullVersion { get { return version + "-" + versionDate; } } internal static List chartList = new List(); diff --git a/package.json b/package.json index 5e21cefc..146a1bd0 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "com.monitor1394.xcharts", "displayName": "XCharts", - "version": "3.0.1", - "date": "20220616", - "checkdate": "20220616", + "version": "3.1.0", + "date": "20220712", + "checkdate": "20220712", "desc": "如果 XCharts 对您有帮助,希望您能在 Github 上点 Star 支持,非常感谢!", "unity": "2018.3", "description": "A charting and data visualization library for Unity.", @@ -11,6 +11,7 @@ "chart", "charts", "graph", + "unity-chart", "data-visualization" ], "category": "chart",