增加AnimationExchange排序交换动画

This commit is contained in:
monitor1394
2025-03-26 08:28:27 +08:00
parent 9e07617cc4
commit 0b218f6dfe
11 changed files with 365 additions and 28 deletions

View File

@@ -13,6 +13,7 @@ slug: /api
- [AnimationAddition](#animationaddition)
- [AnimationChange](#animationchange)
- [AnimationEasing](#animationeasing)
- [AnimationExchange](#animationexchange)
- [AnimationFadeIn](#animationfadein)
- [AnimationFadeOut](#animationfadeout)
- [AnimationHiding](#animationhiding)
@@ -70,6 +71,7 @@ slug: /api
- [ColorUtil](#colorutil)
- [Comment](#comment)
- [CommentItem](#commentitem)
- [CommentLayer](#commentlayer)
- [CommentMarkStyle](#commentmarkstyle)
- [ComponentHandlerAttribute](#componenthandlerattribute)
- [ComponentHelper](#componenthelper)
@@ -360,6 +362,14 @@ class in XCharts.Runtime
- `Linear`:
## AnimationExchange
class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo)
> 从 `v3.15.0` 开始支持
数据交换动画。一般用于图表数据排序时顺序变化的动画。
## AnimationFadeIn
class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo)
@@ -386,7 +396,7 @@ class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo)
## AnimationInfo
class in XCharts.Runtime / 子类: [AnimationFadeIn](#animationfadein),[AnimationFadeOut](#animationfadeout),[AnimationChange](#animationchange),[AnimationAddition](#animationaddition),[AnimationHiding](#animationhiding),[AnimationInteraction](#animationinteraction)
class in XCharts.Runtime / 子类: [AnimationFadeIn](#animationfadein),[AnimationFadeOut](#animationfadeout),[AnimationChange](#animationchange),[AnimationAddition](#animationaddition),[AnimationHiding](#animationhiding),[AnimationInteraction](#animationinteraction),[AnimationExchange](#animationexchange)
> 从 `v3.8.0` 开始支持
@@ -531,7 +541,7 @@ public float GetWidth(float width)
class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent)
动画组件用于控制图表的动画播放。支持配置五种动画表现FadeIn渐入动画FadeOut渐出动画Change变更动画Addition新增动画Interaction交互动画。 按作用的对象可以分为两类SerieAnimation系列动画和DataAnimation数据动画
动画组件用于控制图表的动画播放。支持配置五种动画表现FadeIn渐入动画FadeOut渐出动画Change变更动画Addition新增动画Interaction交互动画Exchange交换动画。 按作用的对象可以分为两类SerieAnimation系列动画和DataAnimation数据动画
### AnimationStyle.addition
@@ -548,6 +558,11 @@ public AnimationChange change
public bool enable
是否开启动画效果。
### AnimationStyle.exchange
public AnimationExchange exchange
交换动画配置。如在排序柱图中有效。
### AnimationStyle.fadeIn
public AnimationFadeIn fadeIn
@@ -639,6 +654,10 @@ public int GetCurrIndex()
public float GetCurrRate()
### AnimationStyle.GetExchangeDuration
public float GetExchangeDuration()
### AnimationStyle.GetInteractionDuration
public float GetInteractionDuration()
@@ -1097,7 +1116,7 @@ public static float GetAxisValueDistance(GridCoord grid, Axis axis, float scaleW
### AxisHelper.GetAxisValueLength
public static float GetAxisValueLength(GridCoord grid, Axis axis, float scaleWidth, double value)
public static float GetAxisValueLength(GridCoord grid, Axis axis, float scaleWidth, double value, float gap = 0)
获得数值value在坐标轴上对应的长度
### AxisHelper.GetAxisValuePosition
@@ -1674,6 +1693,10 @@ public Settings settings
public ThemeStyle theme
### BaseChart.topPainter
public Painter topPainter
### BaseChart.typeListForComponent
public Dictionary<Type, FieldInfo> typeListForComponent
@@ -3428,13 +3451,20 @@ public static Color32 GetColor(string hexColorStr)
class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent),[IPropertyChanged](#ipropertychanged)
图表注解组件。
> 从 `v3.15.0` 开始支持
图表注解组件。用于标注图表中的特殊信息。
### Comment.items
public List<CommentItem> items
注解项。每个注解组件可以设置多个注解项。
### Comment.layer
public CommentLayer layer
注解的显示层级。
### Comment.show
public bool show
@@ -3443,10 +3473,12 @@ public bool show
### Comment.GetLabelStyle
public LabelStyle GetLabelStyle(int index)
获取注解项的文本样式。
### Comment.GetMarkStyle
public CommentMarkStyle GetMarkStyle(int index)
获取注解项的标记样式。
### Comment.OnChanged
@@ -3478,6 +3510,17 @@ public CommentMarkStyle markStyle
public bool show
是否显示当前注解项。
## CommentLayer
class in XCharts.Runtime
注解的显示层级。
可选:
- `Lower`: 注解在系列下方。
- `Upper`: 注解在系列上方。
## CommentMarkStyle
class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent)
@@ -7257,6 +7300,10 @@ class in XCharts.Runtime
public void Reset()
### SerieDataContext.UpdateExchangePosition
public void UpdateExchangePosition(ref float x, ref float y, float totalTime)
## SerieDataExtraFieldAttribute
class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute)
@@ -7685,6 +7732,10 @@ public override void RefreshLabelInternal()
public override void RefreshLabelNextFrame()
### SerieHandler<T>.RefreshTitleLabelInternal
public void RefreshTitleLabelInternal()
### SerieHandler<T>.RemoveComponent
public override void RemoveComponent()

View File

@@ -80,6 +80,7 @@ slug: /changelog
## master
* (2025.03.26) 增加`Animation``Exchange`排序交换动画
* (2025.03.22) 增加`Comment``layer`设置层级
* (2025.03.21) 优化`Comment`的坐标刷新
* (2025.03.19) 增加`Serie``Label``formatter`支持`{index}`通配符

View File

@@ -176,6 +176,7 @@ slug: /configuration
- [AnimationAddition](#animationaddition)
- [AnimationChange](#animationchange)
- [AnimationExchange](#animationexchange)
- [AnimationFadeIn](#animationfadein)
- [AnimationFadeOut](#animationfadeout)
- [AnimationHiding](#animationhiding)
@@ -234,6 +235,14 @@ class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo)
数据变更动画。
## AnimationExchange
class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo)
> 从 `v3.15.0` 开始支持
数据交换动画。一般用于图表数据排序时顺序变化的动画。
## AnimationFadeIn
class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo)
@@ -260,7 +269,7 @@ class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo)
## AnimationInfo
class in XCharts.Runtime / 子类: [AnimationFadeIn](#animationfadein), [AnimationFadeOut](#animationfadeout), [AnimationChange](#animationchange), [AnimationAddition](#animationaddition), [AnimationHiding](#animationhiding), [AnimationInteraction](#animationinteraction)
class in XCharts.Runtime / 子类: [AnimationFadeIn](#animationfadein), [AnimationFadeOut](#animationfadeout), [AnimationChange](#animationchange), [AnimationAddition](#animationaddition), [AnimationHiding](#animationhiding), [AnimationInteraction](#animationinteraction), [AnimationExchange](#animationexchange)
> 从 `v3.8.0` 开始支持
@@ -326,7 +335,7 @@ class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo)
class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent)
动画组件用于控制图表的动画播放。支持配置五种动画表现FadeIn渐入动画FadeOut渐出动画Change变更动画Addition新增动画Interaction交互动画。 按作用的对象可以分为两类SerieAnimation系列动画和DataAnimation数据动画
动画组件用于控制图表的动画播放。支持配置五种动画表现FadeIn渐入动画FadeOut渐出动画Change变更动画Addition新增动画Interaction交互动画Exchange交换动画。 按作用的对象可以分为两类SerieAnimation系列动画和DataAnimation数据动画
### AnimationStyle.addition
@@ -356,6 +365,12 @@ class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent)
是否开启动画效果。
### AnimationStyle.exchange
[AnimationExchange](#animationexchange) `v3.15.0`
交换动画配置。如在排序柱图中有效。
### AnimationStyle.fadeIn
[AnimationFadeIn](#animationfadein) `v3.8.0`
@@ -1247,7 +1262,9 @@ class in XCharts.Runtime / 子类: [AnimationStyle](#animationstyle), [AxisAnima
class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged)
图表注解组件。
> 从 `v3.15.0` 开始支持
图表注解组件。用于标注图表中的特殊信息。
### Comment.items
@@ -1261,6 +1278,17 @@ class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent), [IPropert
所有组件的文本样式。
### Comment.layer
[CommentLayer](#commentlayer) `v3.15.0`
注解的显示层级。
可选:
- `Lower`: 注解在系列下方。
- `Upper`: 注解在系列上方。
### Comment.markStyle
[CommentMarkStyle](#commentmarkstyle)
@@ -2238,6 +2266,12 @@ class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerie
数据项背景颜色。
### ItemStyle.backgroundGap
`float` `v3.15.0`
数据项背景间隙。
### ItemStyle.backgroundWidth
`float`
@@ -2464,6 +2498,18 @@ class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerie
距离轴线的距离。
### LabelStyle.fixedX
`float` `0` `v3.15.0`
固定的X值。不为0时会固定在指定的X值上。
### LabelStyle.fixedY
`float` `0` `v3.15.0`
固定的Y值。不为0时会固定在指定的Y值上。
### LabelStyle.formatter
`string`