From 75bf6e0e6cb930070862e423ce844d9a2e84fea3 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Wed, 28 Sep 2022 08:20:10 +0800 Subject: [PATCH] v3.3.0 --- CHANGELOG.md | 5 ++- Documentation/CHANGELOG.md | 49 +++++++++++++++++++++++++++ Runtime/Component/Axis/AxisHandler.cs | 4 --- Runtime/Component/Axis/AxisHelper.cs | 14 ++++---- Runtime/Serie/SeriesHelper.cs | 4 ++- 5 files changed, 62 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a35c789a..9885877d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,7 +65,10 @@ * 优化图表细节,支持更多功能 * 增加大量的Demo示例 -* 完善Editor下的操作,完善文档 +* 完善文档,修复若干问题 +* 新增PolarChart对Bar、Heatmap的支持 +* 新增HeatmapChart热力图类型 +* 完善Tooltip显示 ### 日志详情 diff --git a/Documentation/CHANGELOG.md b/Documentation/CHANGELOG.md index 8e94df40..e20f04a6 100644 --- a/Documentation/CHANGELOG.md +++ b/Documentation/CHANGELOG.md @@ -2,6 +2,7 @@ # 更新日志 [master](#master) +[v3.3.0](#v3.3.0) [v3.2.0](#v3.2.0) [v3.1.0](#v3.1.0) [v3.0.1](#v3.0.1) @@ -58,6 +59,54 @@ ## master +## v3.3.0 + +### Main points + +* Optimized chart details to support more functions +* Add lots of Demo examples +* Improved documentation and fixed several issues +* Added PolarChart support for Bar and Heatmap +* Added a HeatmapChart type +* Improved Tooltip display + +### Log details + +* (2022.09.26) Optimizes the default number of segments for `Axis` at the category Axis +* (2022.09.25) Fixed the problem that some interfaces in the `API` document were not exported +* (2022.09.24) optimize `FunnelChart` +* (2022.09.23) Optimizes `ParallelChart` +* (2022.09.22) Added `SaveAsImage()` interface to save charts to images +* (2022.09.21) Fixed an issue where the `InsertSerie()` interface did not refresh the graph +* (2022.09.21) Optimized `PolarChart` for `Line` thermal map support +* (2022.09.20) Added `PolarChart` support for `Heatmap` +* (2022.09.19) Added `PolarChart` support for multi-bar graphs and stacked bar graphs +* (2022.09.16) Added `PolarChart` support for `Bar` histogram +* (2022.09.14) Added support for `PolarCoord` to set ring polar coordinates via `Radius` +* (2022.09.09) Fixed an issue where some components of edit parameters in `Editor` might not refresh in real time +* (2022.09.08) Added support for `RingChart` settable `LabelLine` bootline +* (2022.09.06) Added support for `SerieSymbol` `minSize` and `maxSize` parameters to set maximum and minimum sizes +* (2022.09.06) Added support for `showStartLine` and `showEndLine` parameters for `AxisSplitLine` to set whether to display the first splitter +* (2022.09.06) Added `Heatmap` support for different patterns via `symbol` +* (2022.09.05) added `Heatmap` `heatmapType` support for setting `Data` and `Count` two different mapping methods of Heatmap +* (2022.09.05) Optimizes `Tooltip` when indicating numerical axis in thermograph +* (2022.09.02) Added `onPointerEnterPie` callback support +* (2022.09.02) Optimize the HeatmapChart ` +* (2022.08.30) optimizes` RadarChart ` +* (2022.08.30) Fixed `DataZoom` calculation range inaccuracies in some cases (#221) +* (2022.08.29) optimizes the default behavior of `BarChart` when data is too dense +* (2022.08.29) optimizes `YAxis` Max/min calculations when `DataZoom` is enabled +* (2022.08.29) optimized `CandlestickChart` massive data rendering +* (2022.08.28) fixed an issue where `LineChart` does not appear properly in the case of stacking and custom Y-axis range +* (2022.08.26) added `Legend` new icon type `Candlestick` +* (2022.08.26) optimizes` CandlestickChart `performance and adjusts related` AddData() `interface parameters +* (2022.08.26) Added support for setting different display positions in Tooltip's `position` parameter +* (2022.08.26) Delete the `fixedXEnable` and `fixedYEnable` arguments of Tooltip +* (2022.08.25) EmphasisStyle `EmphasisStyle` has emphasised the support for `label` +* (2022.08.25) Added support for `formatter` for `{d3}` specified percentage of dimension data +* (2022.08.24) fixed the `label` of the `ScatterChart` not refreshing +* (2022.08.24) fixed abnormal display of `label` of `MarkLine` in some cases + ## v3.2.0 ### Main points diff --git a/Runtime/Component/Axis/AxisHandler.cs b/Runtime/Component/Axis/AxisHandler.cs index 47fc3c5e..22863c28 100644 --- a/Runtime/Component/Axis/AxisHandler.cs +++ b/Runtime/Component/Axis/AxisHandler.cs @@ -368,10 +368,6 @@ namespace XCharts ((inside && axis.IsLeft()) || (!inside && axis.IsRight()) ? TextAnchor.MiddleLeft : TextAnchor.MiddleRight); - - if (axis.IsCategory() && axis.boundaryGap) - splitNumber -= 1; - for (int i = 0; i < splitNumber; i++) { var labelWidth = AxisHelper.GetScaleWidth(axis, axisLength, i + 1, dataZoom); diff --git a/Runtime/Component/Axis/AxisHelper.cs b/Runtime/Component/Axis/AxisHelper.cs index 86490bd2..7171e826 100644 --- a/Runtime/Component/Axis/AxisHelper.cs +++ b/Runtime/Component/Axis/AxisHelper.cs @@ -65,9 +65,9 @@ namespace XCharts.Runtime if (axis.splitNumber <= 0) { var eachWid = coordinateWid / dataCount; - if (eachWid > 40) return dataCount; - for (int i = 2; i < dataCount / 2; i++) - if (eachWid * i > 40) return dataCount / i; + if (eachWid > 80) return dataCount; + var tick = Mathf.CeilToInt(80 / eachWid); + return (int) (dataCount / tick); } else { @@ -191,7 +191,8 @@ namespace XCharts.Runtime } else { - if (axis.boundaryGap && coordinateWidth / dataCount > 5) + var diff = newIndex - dataCount; + if (axis.boundaryGap && ((diff > 0 && diff / rate < 0.4f) || dataCount >= axis.data.Count)) return string.Empty; else return axis.axisLabel.GetFormatterContent(dataCount - 1, showData[dataCount - 1]); @@ -223,10 +224,7 @@ namespace XCharts.Runtime } else { - if (dataCount < splitNum) scaleNum = splitNum; - else scaleNum = dataCount > 2 && dataCount % splitNum == 0 ? - splitNum : - splitNum + 1; + scaleNum = splitNum + 1; } return scaleNum; } diff --git a/Runtime/Serie/SeriesHelper.cs b/Runtime/Serie/SeriesHelper.cs index 4055b8f1..d3e9c244 100644 --- a/Runtime/Serie/SeriesHelper.cs +++ b/Runtime/Serie/SeriesHelper.cs @@ -359,9 +359,11 @@ namespace XCharts.Runtime } else { + var performanceMode = serie.IsPerformanceMode(); foreach (var data in showData) { - var currData = data.GetCurrData(yValue ? 1 : 0, updateDuration, inverse); + var currData = performanceMode? data.GetData(yValue?1 : 0, inverse): + data.GetCurrData(yValue ? 1 : 0, updateDuration, inverse); if (!serie.IsIgnoreValue(currData)) { if (currData > max) max = currData;