From e4e1a69e76fa6096a4127e80f9299e59afef01b9 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Sun, 16 Mar 2025 10:45:38 +0800 Subject: [PATCH] 3.14.0 --- Documentation~/en/api.md | 68 ++++++++++++++++++++++-------- Documentation~/en/changelog.md | 32 +++++++++++++- Documentation~/en/configuration.md | 24 +++++++++-- Documentation~/zh/api.md | 68 ++++++++++++++++++++++-------- Documentation~/zh/changelog.md | 14 ++++++ Documentation~/zh/configuration.md | 24 +++++++++-- Runtime/Internal/XChartsMgr.cs | 4 +- package.json | 6 +-- 8 files changed, 192 insertions(+), 48 deletions(-) diff --git a/Documentation~/en/api.md b/Documentation~/en/api.md index 4d333b91..8a063e9d 100644 --- a/Documentation~/en/api.md +++ b/Documentation~/en/api.md @@ -405,7 +405,7 @@ the delegate function of animation delay. ### AnimationInfo.duration public float duration -the duration of animation. +the duration of animation. Default is used to calculate the speed of animation. It can also be specified by speed. ### AnimationInfo.durationFunction @@ -432,6 +432,11 @@ the callback function of animation start. public bool reverse whether enable reverse animation. +### AnimationInfo.speed + +public float speed +the speed of animation. When speed is specified, duration will be invalid. Default is 0, which means no speed specified. + ### AnimationInfo.End public void End() @@ -1042,6 +1047,10 @@ public bool needAnimation public List<string> runtimeData the tick value of value axis. +### AxisContext.sortedDataIndices + +public List<int> sortedDataIndices + ## AxisHandler<T> class in XCharts / Inherits from: [MainComponentHandler](#maincomponenthandler) @@ -1170,7 +1179,7 @@ public void Copy(AxisLabel axisLabel) ### AxisLabel.GetFormatterContent -public override string GetFormatterContent(int labelIndex, double value, double minValue, double maxValue, bool isLog = false) +public override string GetFormatterContent(int labelIndex, int totalIndex, double value, double minValue, double maxValue, bool isLog = false) ### AxisLabel.IsNeedShowLabel @@ -1383,6 +1392,10 @@ public int containerIndex public int containterInstanceId +### Bar.useSortData + +public override bool useSortData + ### Bar.AddDefaultSerie public static Serie AddDefaultSerie(BaseChart chart, string serieName) @@ -1941,6 +1954,10 @@ public T GetOrAddChartComponent<T>() where T : MainComponent public Painter GetPainter(int index) +### BaseChart.GetRealtimeSortSerie + +public Serie GetRealtimeSortSerie(int gridIndex) + ### BaseChart.GetSerie public Serie GetSerie(int serieIndex) @@ -1953,19 +1970,19 @@ public T GetSerie<T>(int serieIndex) where T : Serie ### BaseChart.GetSerieBarGap<T> -public float GetSerieBarGap<T>() where T : Serie +public float GetSerieBarGap<T>(int gridIndex) where T : Serie ### BaseChart.GetSerieBarRealCount<T> -public int GetSerieBarRealCount<T>() where T : Serie +public int GetSerieBarRealCount<T>(int gridIndex) where T : Serie ### BaseChart.GetSerieIndexIfStack<T> -public int GetSerieIndexIfStack<T>(Serie currSerie) where T : Serie +public int GetSerieIndexIfStack<T>(Serie currSerie, int gridIndex) where T : Serie ### BaseChart.GetSerieSameStackTotalValue<T> -public double GetSerieSameStackTotalValue<T>(string stack, int dataIndex) where T : Serie +public double GetSerieSameStackTotalValue<T>(string stack, int dataIndex, int gridIndex) where T : Serie ### BaseChart.GetSeriesMinMaxValue @@ -1973,11 +1990,11 @@ public virtual void GetSeriesMinMaxValue(Axis axis, int axisIndex, out double te ### BaseChart.GetSerieTotalGap<T> -public float GetSerieTotalGap<T>(float categoryWidth, float gap, int index) where T : Serie +public float GetSerieTotalGap<T>(float categoryWidth, float gap, int index, int gridIndex) where T : Serie ### BaseChart.GetSerieTotalWidth<T> -public float GetSerieTotalWidth<T>(float categoryWidth, float gap, int realBarCount) where T : Serie +public float GetSerieTotalWidth<T>(float categoryWidth, float gap, int realBarCount, int gridIndex) where T : Serie ### BaseChart.GetTitlePosition @@ -2007,6 +2024,10 @@ public bool HasChartComponent(Type type) public bool HasChartComponent<T>() +### BaseChart.HasRealtimeSortSerie + +public bool HasRealtimeSortSerie(int gridIndex) + ### BaseChart.HasSerie public bool HasSerie(Type type) @@ -3082,6 +3103,10 @@ public static List<string> ParseStringFromString(string jsonData) public static void RemoveComponent<T>(GameObject gameObject) +### ChartHelper.RemoveTMPComponents + +public static void RemoveTMPComponents(GameObject gameObject) + ### ChartHelper.RotateRound public static Vector3 RotateRound(Vector3 position, Vector3 center, Vector3 axis, float angle) @@ -3434,10 +3459,9 @@ class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) comment of chart. -### CommentItem.content +### CommentItem.labelObject -public string content -content of comment. +public ChartLabel labelObject ### CommentItem.markRect @@ -3886,9 +3910,13 @@ public static bool NeedFormat(string content) ### FormatterHelper.ReplaceAxisLabelContent -public static void ReplaceAxisLabelContent(ref string content, string value) +public static void ReplaceAxisLabelContent(ref string content, string value, int index, int totalIndex) +### FormatterHelper.ReplaceIndexContent + +public static void ReplaceIndexContent(ref string content, int currIndex, int totalIndex) + ### FormatterHelper.TrimAndReplaceLine public static string TrimAndReplaceLine(string content) @@ -4399,7 +4427,7 @@ public override void ClearData() ### Indicator.GetFormatterIndicatorContent -public string GetFormatterIndicatorContent(string indicatorName) +public string GetFormatterIndicatorContent(string indicatorName, int index, int totalIndex) ### Indicator.GetIndicator @@ -4650,12 +4678,12 @@ public Color GetColor(Color defaultColor) ### LabelStyle.GetFormatterContent -public virtual string GetFormatterContent(int labelIndex, double value, double minValue, double maxValue, bool isLog = false) +public virtual string GetFormatterContent(int labelIndex, int totalIndex, double value, double minValue, double maxValue, bool isLog = false) ### LabelStyle.GetFormatterDateTime -public string GetFormatterDateTime(int labelIndex, double value, double minValue, double maxValue) +public string GetFormatterDateTime(int labelIndex, int totalIndex, double value, double minValue, double maxValue) ### LabelStyle.GetOffset @@ -6719,7 +6747,7 @@ public double GetData(int index, int dimension, DataZoom dataZoom = null) ### Serie.GetDataList -public List<SerieData> GetDataList(DataZoom dataZoom = null) +public List<SerieData> GetDataList(DataZoom dataZoom = null, bool sorted = false) 获得系列的数据列表 ### Serie.GetDataTotal @@ -7026,6 +7054,10 @@ public SelectStyle selectStyle public bool show [default:true] Whether the data item is showed. +### SerieData.sortIndex + +public int sortIndex + ### SerieData.state public SerieState state @@ -7172,7 +7204,7 @@ public void SetIconActive(bool flag) ### SerieData.SetLabelActive -public void SetLabelActive(bool flag) +public void SetLabelActive(bool flag, bool force = false) ### SerieData.SetPolygon @@ -7949,7 +7981,7 @@ class in XCharts.Runtime / Inherits from: [SymbolStyle](#symbolstyle),[ISerieDat ### SerieSymbol.GetSize -public float GetSize(List<double> data, float themeSize) +public float GetSize(SerieData serieData, float themeSize) 根据指定的sizeType获得标记的大小 ### SerieSymbol.Reset diff --git a/Documentation~/en/changelog.md b/Documentation~/en/changelog.md index 46057a4c..fa370256 100644 --- a/Documentation~/en/changelog.md +++ b/Documentation~/en/changelog.md @@ -6,6 +6,7 @@ slug: /changelog # Changelog [master](#master) +[v3.14.0](#v3140) [v3.13.0](#v3130) [v3.12.1](#v3121) [v3.12.0](#v3120) @@ -78,6 +79,36 @@ slug: /changelog ## master +## v3.14.0 + +**Key Highlights:** + +* Added real-time sorting functionality for `Bar` +* Added support for `\n` line breaks in `itemFormatter` for `Tooltip` +* Added support for `{index}` formatting in `AxisLabel` +* Added `speed` to `Animation` to specify animation speed +* Optimized column alignment in `Tooltip` + +**Detailed Changelog:** + +* (2025.03.15) Released version `v3.14.0` +* (2025.03.09) Fixed an issue where `Bar` displayed abnormally when placed in different `Grids` within the same `Chart` +* (2025.03.07) Added `speed` to `Animation` to specify animation speed +* (2025.03.06) Optimized the performance of newly added animations in `Animation` +* (2025.03.04) Fixed an issue where `label` in `Treemap` displayed abnormally +* (2025.03.02) Added `columnGapWidths` parameter to `Tooltip` to set the gap distance between column texts +* (2025.03.01) Optimized the refresh of `Comment` component +* (2025.02.23) Added support for `{index}`, `{index-1}`, `{-index}`, and `{-index-1}` wildcards in `formatter` for `Label` in `Axis` +* (2025.02.23) Added `realtimeSort` to `Bar` to support real-time sorting +* (2025.02.19) Added support for `\n` line breaks in `itemFormatter` for `Tooltip` +* (2025.02.18) Optimized the alignment of `Tooltip` +* (2025.02.09) Fixed an issue where `SaveAsImage` did not support transparency when saving images (#337) +* (2025.02.05) Added support for setting `data` styles separately in `GraphChart` +* (2025.02.05) Refactored the `sizeFunction` parameter in `SerieSymbol` +* (2025.01.23) Fixed an issue where `Label` in `Treemap` was not displayed +* (2025.01.15) Fixed an issue where dynamically adding `Component` to `Chart` at runtime caused exceptions (#339) +* (2025.01.08) Fixed an issue where residual components affected `Text` initialization when `TextMeshPro` was turned off + ## v3.13.0 Key Features: @@ -148,7 +179,6 @@ Log Details: * (2024.09.01) Added `radiusGradient` parameter for `Ring` to set the gradient direction * (2024.09.01) Optimized the position of the first Label when `Axis` is used as a time axis - ## v3.11.2 * (2024.08.01) Release `v3.11.2` diff --git a/Documentation~/en/configuration.md b/Documentation~/en/configuration.md index 3668730f..21d57578 100644 --- a/Documentation~/en/configuration.md +++ b/Documentation~/en/configuration.md @@ -276,7 +276,7 @@ the delay time before animation start. `float` `1000` `v3.8.0` -the duration of animation. +the duration of animation. Default is used to calculate the speed of animation. It can also be specified by speed. ### AnimationInfo.enable @@ -290,6 +290,12 @@ whether enable animation. whether enable reverse animation. +### AnimationInfo.speed + +`float` `0` `v3.14.0` + +the speed of animation. When speed is specified, duration will be invalid. Default is 0, which means no speed specified. + ## AnimationInteraction class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) @@ -2462,7 +2468,7 @@ the distance of label to axis line. `string` -label content string template formatter. \n line wrapping is supported. Formatters for some components will not take effect.
Template placeholder have the following, some of which apply only to fixed components:
`\{.\}` : indicates the dot mark.
`\{a\}` : indicates the series name.
`\{b\}` : category value of x axis or data name.
`\{c\}` : data value.
`\{d\}` : percentage.
`\{e\}` : indicates the data name.
`\{f\}` : data sum.
`\{g\}` : indicates the total number of data.
`\{h\}` : hexadecimal color value.
`\{y\}` : category value of y axis.
`\{value\}` : The value of the axis or legend.
The following placeholder apply to `UITable` components:
`\{name\}` : indicates the row name of the table.
`\{index\}` : indicates the row number of the table.
The following placeholder apply to `UIStatistc` components:
`\{title\}` : title text.
`\{dd\}` : day.
`\{hh\}` : hours.
`\{mm\}` : minutes.
`\{ss\}` : second.
`\{fff\}` : milliseconds.
`\{d\}` : day.
`\{h\}` : hours.
`\{m\}` : minutes.
`\{s\}` : second.
`\{f\}` : milliseconds.
Example :\{b\}:\{c\}
+label content string template formatter. \n line wrapping is supported. Formatters for some components will not take effect.
Template placeholder have the following, some of which apply only to fixed components:
`\{.\}` : indicates the dot mark.
`\{a\}` : indicates the series name.
`\{b\}` : category value of x axis or data name.
`\{c\}` : data value.
`\{d\}` : percentage.
`\{e\}` : indicates the data name.
`\{f\}` : data sum.
`\{g\}` : indicates the total number of data.
`\{h\}` : hexadecimal color value.
`\{y\}` : category value of y axis.
`\{value\}` : the value of the axis or legend.
`\{index\}` : the index of the axis.
The following placeholder apply to `UITable` components:
`\{name\}` : indicates the row name of the table.
`\{index\}` : indicates the row number of the table.
The following placeholder apply to `UIStatistc` components:
`\{title\}` : title text.
`\{dd\}` : day.
`\{hh\}` : hours.
`\{mm\}` : minutes.
`\{ss\}` : second.
`\{fff\}` : milliseconds.
`\{d\}` : day.
`\{h\}` : hours.
`\{m\}` : minutes.
`\{s\}` : second.
`\{f\}` : milliseconds.
Example :\{b\}:\{c\}
### LabelStyle.height @@ -3755,6 +3761,12 @@ Options: the radius of chart. +### Serie.realtimeSort + +`bool` `false` `v3.14.0` + +Whether to enable realtime sorting, which is used for bar-racing effect. Currently only available in Bar. + ### Serie.right `float` @@ -4816,11 +4828,17 @@ the color of tooltip border. the width of tooltip border. +### Tooltip.columnGapWidths + +`List` `v3.14.0` + +the column gap width of content. When there is only one column, it only represents the gap width of the second column. + ### Tooltip.contentLabelStyles `List` -the textstyle list of content. +the column text style list of content. The first represents the text style of the first column, and so on. ### Tooltip.fixedHeight diff --git a/Documentation~/zh/api.md b/Documentation~/zh/api.md index 2afbafb9..5de80ded 100644 --- a/Documentation~/zh/api.md +++ b/Documentation~/zh/api.md @@ -405,7 +405,7 @@ public AnimationDelayFunction delayFunction ### AnimationInfo.duration public float duration -动画的时长。 +动画的时长。默认用于计算动画的速度。也可以通过speed指定速度。 ### AnimationInfo.durationFunction @@ -432,6 +432,11 @@ public Action OnAnimationStart public bool reverse 是否开启反向动画效果。 +### AnimationInfo.speed + +public float speed +动画的速度。当指定speed时,duration将失效。默认为0,表示不指定速度。 + ### AnimationInfo.End public void End() @@ -1042,6 +1047,10 @@ public bool needAnimation public List<string> runtimeData 数值轴时每个tick的数值。 +### AxisContext.sortedDataIndices + +public List<int> sortedDataIndices + ## AxisHandler<T> class in XCharts / 继承自: [MainComponentHandler](#maincomponenthandler) @@ -1170,7 +1179,7 @@ public void Copy(AxisLabel axisLabel) ### AxisLabel.GetFormatterContent -public override string GetFormatterContent(int labelIndex, double value, double minValue, double maxValue, bool isLog = false) +public override string GetFormatterContent(int labelIndex, int totalIndex, double value, double minValue, double maxValue, bool isLog = false) ### AxisLabel.IsNeedShowLabel @@ -1383,6 +1392,10 @@ public int containerIndex public int containterInstanceId +### Bar.useSortData + +public override bool useSortData + ### Bar.AddDefaultSerie public static Serie AddDefaultSerie(BaseChart chart, string serieName) @@ -1941,6 +1954,10 @@ public T GetOrAddChartComponent<T>() where T : MainComponent public Painter GetPainter(int index) +### BaseChart.GetRealtimeSortSerie + +public Serie GetRealtimeSortSerie(int gridIndex) + ### BaseChart.GetSerie public Serie GetSerie(int serieIndex) @@ -1953,19 +1970,19 @@ public T GetSerie<T>(int serieIndex) where T : Serie ### BaseChart.GetSerieBarGap<T> -public float GetSerieBarGap<T>() where T : Serie +public float GetSerieBarGap<T>(int gridIndex) where T : Serie ### BaseChart.GetSerieBarRealCount<T> -public int GetSerieBarRealCount<T>() where T : Serie +public int GetSerieBarRealCount<T>(int gridIndex) where T : Serie ### BaseChart.GetSerieIndexIfStack<T> -public int GetSerieIndexIfStack<T>(Serie currSerie) where T : Serie +public int GetSerieIndexIfStack<T>(Serie currSerie, int gridIndex) where T : Serie ### BaseChart.GetSerieSameStackTotalValue<T> -public double GetSerieSameStackTotalValue<T>(string stack, int dataIndex) where T : Serie +public double GetSerieSameStackTotalValue<T>(string stack, int dataIndex, int gridIndex) where T : Serie ### BaseChart.GetSeriesMinMaxValue @@ -1973,11 +1990,11 @@ public virtual void GetSeriesMinMaxValue(Axis axis, int axisIndex, out double te ### BaseChart.GetSerieTotalGap<T> -public float GetSerieTotalGap<T>(float categoryWidth, float gap, int index) where T : Serie +public float GetSerieTotalGap<T>(float categoryWidth, float gap, int index, int gridIndex) where T : Serie ### BaseChart.GetSerieTotalWidth<T> -public float GetSerieTotalWidth<T>(float categoryWidth, float gap, int realBarCount) where T : Serie +public float GetSerieTotalWidth<T>(float categoryWidth, float gap, int realBarCount, int gridIndex) where T : Serie ### BaseChart.GetTitlePosition @@ -2007,6 +2024,10 @@ public bool HasChartComponent(Type type) public bool HasChartComponent<T>() +### BaseChart.HasRealtimeSortSerie + +public bool HasRealtimeSortSerie(int gridIndex) + ### BaseChart.HasSerie public bool HasSerie(Type type) @@ -3082,6 +3103,10 @@ public static List<string> ParseStringFromString(string jsonData) public static void RemoveComponent<T>(GameObject gameObject) +### ChartHelper.RemoveTMPComponents + +public static void RemoveTMPComponents(GameObject gameObject) + ### ChartHelper.RotateRound public static Vector3 RotateRound(Vector3 position, Vector3 center, Vector3 axis, float angle) @@ -3434,10 +3459,9 @@ class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 注解项。 -### CommentItem.content +### CommentItem.labelObject -public string content -注解的文本内容。支持模板参数,可以参考Tooltip的itemFormatter。 +public ChartLabel labelObject ### CommentItem.markRect @@ -3886,9 +3910,13 @@ public static bool NeedFormat(string content) ### FormatterHelper.ReplaceAxisLabelContent -public static void ReplaceAxisLabelContent(ref string content, string value) +public static void ReplaceAxisLabelContent(ref string content, string value, int index, int totalIndex) +### FormatterHelper.ReplaceIndexContent + +public static void ReplaceIndexContent(ref string content, int currIndex, int totalIndex) + ### FormatterHelper.TrimAndReplaceLine public static string TrimAndReplaceLine(string content) @@ -4399,7 +4427,7 @@ public override void ClearData() ### Indicator.GetFormatterIndicatorContent -public string GetFormatterIndicatorContent(string indicatorName) +public string GetFormatterIndicatorContent(string indicatorName, int index, int totalIndex) ### Indicator.GetIndicator @@ -4650,12 +4678,12 @@ public Color GetColor(Color defaultColor) ### LabelStyle.GetFormatterContent -public virtual string GetFormatterContent(int labelIndex, double value, double minValue, double maxValue, bool isLog = false) +public virtual string GetFormatterContent(int labelIndex, int totalIndex, double value, double minValue, double maxValue, bool isLog = false) ### LabelStyle.GetFormatterDateTime -public string GetFormatterDateTime(int labelIndex, double value, double minValue, double maxValue) +public string GetFormatterDateTime(int labelIndex, int totalIndex, double value, double minValue, double maxValue) ### LabelStyle.GetOffset @@ -6719,7 +6747,7 @@ public double GetData(int index, int dimension, DataZoom dataZoom = null) ### Serie.GetDataList -public List<SerieData> GetDataList(DataZoom dataZoom = null) +public List<SerieData> GetDataList(DataZoom dataZoom = null, bool sorted = false) 获得系列的数据列表 ### Serie.GetDataTotal @@ -7026,6 +7054,10 @@ public SelectStyle selectStyle public bool show 该数据项是否要显示。 +### SerieData.sortIndex + +public int sortIndex + ### SerieData.state public SerieState state @@ -7172,7 +7204,7 @@ public void SetIconActive(bool flag) ### SerieData.SetLabelActive -public void SetLabelActive(bool flag) +public void SetLabelActive(bool flag, bool force = false) ### SerieData.SetPolygon @@ -7949,7 +7981,7 @@ class in XCharts.Runtime / 继承自: [SymbolStyle](#symbolstyle),[ISerieDataCom ### SerieSymbol.GetSize -public float GetSize(List<double> data, float themeSize) +public float GetSize(SerieData serieData, float themeSize) 根据指定的sizeType获得标记的大小 ### SerieSymbol.Reset diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index 59f227e4..10313dce 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -6,6 +6,7 @@ slug: /changelog # 更新日志 [master](#master) +[v3.14.0](#v3140) [v3.13.0](#v3130) [v3.12.1](#v3121) [v3.12.0](#v3120) @@ -79,6 +80,19 @@ slug: /changelog ## master +## v3.14.0 + +版本要点: + +* 新增`Bar`的实时排序功能 +* 新增`Tooltip`的`itemFormatter`支持`\n`换行 +* 新增`AxisLabel`的格式化支持`{index}` +* 新增`Animation`的`speed`可指定动画速度 +* 优化`Tooltip`的列对齐方式 + +日志详情: + +* (2025.03.15) 发布`v3.14.0`版本 * (2025.03.09) 修复`Bar`在同一个`Chart`不同`Grid`里时绘制有些异常的问题 * (2025.03.07) 增加`Animation`的`speed`可指定动画速度 * (2025.03.06) 优化`Animation`的新增动画表现 diff --git a/Documentation~/zh/configuration.md b/Documentation~/zh/configuration.md index c0f85e72..6d096ac0 100644 --- a/Documentation~/zh/configuration.md +++ b/Documentation~/zh/configuration.md @@ -276,7 +276,7 @@ class in XCharts.Runtime / 子类: [AnimationFadeIn](#animationfadein), [Animati `float` `1000` `v3.8.0` -动画的时长。 +动画的时长。默认用于计算动画的速度。也可以通过speed指定速度。 ### AnimationInfo.enable @@ -290,6 +290,12 @@ class in XCharts.Runtime / 子类: [AnimationFadeIn](#animationfadein), [Animati 是否开启反向动画效果。 +### AnimationInfo.speed + +`float` `0` `v3.14.0` + +动画的速度。当指定speed时,duration将失效。默认为0,表示不指定速度。 + ## AnimationInteraction class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) @@ -2462,7 +2468,7 @@ class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerie `string` -标签内容字符串模版格式器。支持用 \n 换行。部分组件的格式器会不生效。
模板通配符有以下这些,部分只适用于固定的组件:
`\{.\}`:圆点标记。
`\{a\}`:系列名。
`\{b\}`:X轴类目名或数据名。
`\{c\}`:数据值。
`\{d\}`:百分比。
`\{e\}`:数据名。
`\{f\}`:数据和。
`\{g\}`:数据总个数。
`\{h\}`:十六进制颜色值。
`\{y\}`:Y轴的类目名。
`\{value\}`:坐标轴或图例的值。
以下通配符适用UITable组件:
`\{name\}`: 表格的行名。
`\{index\}`:表格的行号。
以下通配符适用UIStatistc组件:
`\{title\}`:标题文本。
`\{dd\}`:天。
`\{hh\}`:小时。
`\{mm\}`:分钟。
`\{ss\}`:秒。
`\{fff\}`:毫秒。
`\{d\}`:天。
`\{h\}`:小时。
`\{m\}`:分钟。
`\{s\}`:秒。
`\{f\}`:毫秒。
示例:“\{b\}:\{c\}” +标签内容字符串模版格式器。支持用 \n 换行。部分组件的格式器会不生效。
模板通配符有以下这些,部分只适用于固定的组件:
`\{.\}`:圆点标记。
`\{a\}`:系列名。
`\{b\}`:X轴类目名或数据名。
`\{c\}`:数据值。
`\{d\}`:百分比。
`\{e\}`:数据名。
`\{f\}`:数据和。
`\{g\}`:数据总个数。
`\{h\}`:十六进制颜色值。
`\{y\}`:Y轴的类目名。
`\{value\}`:坐标轴或图例的值。
`\{index\}`:坐标轴编号。
以下通配符适用UITable组件:
`\{name\}`: 表格的行名。
`\{index\}`:表格的行号。
以下通配符适用UIStatistc组件:
`\{title\}`:标题文本。
`\{dd\}`:天。
`\{hh\}`:小时。
`\{mm\}`:分钟。
`\{ss\}`:秒。
`\{fff\}`:毫秒。
`\{d\}`:天。
`\{h\}`:小时。
`\{m\}`:分钟。
`\{s\}`:秒。
`\{f\}`:毫秒。
示例:“\{b\}:\{c\}” ### LabelStyle.height @@ -3755,6 +3761,12 @@ class in XCharts.Runtime / 继承自: [BaseSerie](#baseserie), [IComparable](htt 半径。radius[0]表示内径,radius[1]表示外径。 +### Serie.realtimeSort + +`bool` `false` `v3.14.0` + +是否开启实时排序,用来实现动态排序图效果。目前仅在Bar中生效。 + ### Serie.right `float` @@ -4816,11 +4828,17 @@ class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) 边框线宽。 +### Tooltip.columnGapWidths + +`List` `v3.14.0` + +内容部分的列间距。当只有一列时,只表示第二列的间距。 + ### Tooltip.contentLabelStyles `List` -内容部分的文本样式列表。和列一一对应。 +内容部分的列文本样式列表。第一个表示第一列的文本样式,以此类推。 ### Tooltip.fixedHeight diff --git a/Runtime/Internal/XChartsMgr.cs b/Runtime/Internal/XChartsMgr.cs index b3c62458..dc7f09a1 100644 --- a/Runtime/Internal/XChartsMgr.cs +++ b/Runtime/Internal/XChartsMgr.cs @@ -21,8 +21,8 @@ namespace XCharts.Runtime [ExecuteInEditMode] public static class XChartsMgr { - public static readonly string version = "3.13.0"; - public static readonly int versionDate = 20250101; + public static readonly string version = "3.14.0"; + public static readonly int versionDate = 20250315; public static string fullVersion { get { return version + "-" + versionDate; } } internal static List chartList = new List(); diff --git a/package.json b/package.json index 68b52142..d485bb12 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "displayName": "XCharts", "author": "monitor1394", "license": "MIT", - "version": "3.13.0", - "date": "20250101", - "checkdate": "20250101", + "version": "3.14.0", + "date": "20250315", + "checkdate": "20250315", "unity": "2018.3", "description": "A charting and data visualization library for Unity. Support line chart, bar chart, pie chart, radar chart, scatter chart, heatmap chart, ring chart, candlestick chart, polar chart and parallel coordinates.", "keywords": [