diff --git a/Documentation~/en/api.md b/Documentation~/en/api.md
index 1e402b2a..6b53b7ce 100644
--- a/Documentation~/en/api.md
+++ b/Documentation~/en/api.md
@@ -129,9 +129,9 @@ Inherits or Implemented: [BaseGraph](#basegraph),[ISerializationCallbackReceiver
| ClearData() |public virtual void ClearData()
Clear all components and series data. Note: serie only empties the data and does not remove serie. |
| ClearSerieData() |public virtual void ClearSerieData()
Clear the data of all series. |
| ClickLegendButton() |public void ClickLegendButton(int legendIndex, string legendName, bool show)
点击图例按钮 |
-| CovertSerie() |public bool CovertSerie(Serie serie, Type type)|
-| CovertSerie<T>() |public bool CovertSerie<T>(Serie serie) where T : Serie|
-| CovertXYAxis() |public void CovertXYAxis(int index)
转换X轴和Y轴的配置 |
+| ConvertSerie() |public bool ConvertSerie(Serie serie, Type type)|
+| ConvertSerie<T>() |public bool ConvertSerie<T>(Serie serie) where T : Serie|
+| ConvertXYAxis() |public void ConvertXYAxis(int index)
转换X轴和Y轴的配置 |
| GenerateDefaultSerieName() |public string GenerateDefaultSerieName()|
| GetAllSerieDataCount() |public int GetAllSerieDataCount()|
| GetChartBackgroundColor() |public Color32 GetChartBackgroundColor()|
@@ -227,7 +227,6 @@ Inherits or Implemented: [BaseGraph](#basegraph),[ISerializationCallbackReceiver
| RemoveSerie<T>() |public void RemoveSerie<T>() where T : Serie|
| ReplaceSerie() |public bool ReplaceSerie(Serie oldSerie, Serie newSerie)|
| ResetDataIndex() |public bool ResetDataIndex(int serieIndex)
重置serie的数据项索引。避免数据项索引异常。 |
-| SaveAsImage() |public void SaveAsImage(string imageType = "png", string savePath = "")
保存图表为图片。 |
| SetBasePainterMaterial() |public void SetBasePainterMaterial(Material material)
设置Base Painter的材质球 |
| SetMaxCache() |public void SetMaxCache(int maxCache)
设置可缓存的最大数据量。当数据量超过该值时,会自动删除第一个值再加入最新值。 |
| SetPainterActive() |public void SetPainterActive(int index, bool flag)|
@@ -276,6 +275,7 @@ Inherits or Implemented: [MaskableGraphic](#maskablegraphic),[IPointerDownHandle
| RebuildChartObject() |public void RebuildChartObject()
移除并重新创建所有图表的Object。 |
| RefreshAllComponent() |public void RefreshAllComponent()|
| RefreshGraph() |public virtual void RefreshGraph()
Redraw graph in next frame. |
+| SaveAsImage() |public void SaveAsImage(string imageType = "png", string savePath = "")
保存图表为图片。 |
| ScreenPointToChartPoint() |public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)|
| SetPainterDirty() |public void SetPainterDirty()
重新初始化Painter |
| SetSize() |public virtual void SetSize(float width, float height)
设置图形的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform) |
@@ -312,7 +312,7 @@ Inherits or Implemented: [BaseChart](#basechart)
| CopyList<T>() |public static bool CopyList<T>(List<T> toList, List<T> fromList)|
| DestoryGameObject() |public static void DestoryGameObject(GameObject go)|
| DestoryGameObject() |public static void DestoryGameObject(Transform parent, string childName)|
-| DestoryGameObjectByMatch() |public static void DestoryGameObjectByMatch(Transform parent, string match)|
+| DestoryGameObjectByMatch() |public static void DestoryGameObjectByMatch(Transform parent, string containString)|
| DestroyAllChildren() |public static void DestroyAllChildren(Transform parent)|
| GetActualValue() |public static float GetActualValue(float valueOrRate, float total, float maxRate = 1.5f)|
| GetAngle360() |public static float GetAngle360(Vector2 from, Vector2 to)
获得0-360的角度(12点钟方向为0度) |
@@ -645,6 +645,7 @@ Inherits or Implemented: [MaskableGraphic](#maskablegraphic)
|public method|description|
|--|--|
+| CheckRefresh() |public void CheckRefresh()|
| Init() |public void Init()|
| Refresh() |public void Refresh()|
| SetActive() |public void SetActive(bool flag, bool isDebugMode = false)|
diff --git a/Documentation~/en/changelog.md b/Documentation~/en/changelog.md
index e353fe6b..d8b1a28a 100644
--- a/Documentation~/en/changelog.md
+++ b/Documentation~/en/changelog.md
@@ -610,7 +610,7 @@ Details:
* (2020.04.19) 优化`LineChart`折线图的区域填充渐变效果
* (2020.04.19) 增加`AxisLabel`的`onZero`参数可将`Label`显示在`0`刻度上
* (2020.04.19) 增加`Serie`和`AxisLabel`的`showAsPositiveNumber`参数将负数数值显示为正数
-* (2020.04.18) 增加`Covert XY Axis`互换XY轴配置
+* (2020.04.18) 增加`Convert XY Axis`互换XY轴配置
* (2020.04.17) 增加`Axis`可通过`inverse`参数设置坐标轴反转
* (2020.04.16) 修复`Check warning`在`Unity2019.3`上的显示问题
* (2020.04.16) 修复`PieChart`在设置`Space`参数后动画绘制异常的问题
diff --git a/Documentation~/zh/api.md b/Documentation~/zh/api.md
index 0406800f..4d722bc6 100644
--- a/Documentation~/zh/api.md
+++ b/Documentation~/zh/api.md
@@ -129,9 +129,9 @@ Inherits or Implemented: [BaseGraph](#basegraph),[ISerializationCallbackReceiver
| ClearData() |public virtual void ClearData()
清空所有组件和Serie的数据。注意:Serie只是清空数据,不会移除Serie。 |
| ClearSerieData() |public virtual void ClearSerieData()
清空所有serie的数据。 |
| ClickLegendButton() |public void ClickLegendButton(int legendIndex, string legendName, bool show)
点击图例按钮 |
-| CovertSerie() |public bool CovertSerie(Serie serie, Type type)|
-| CovertSerie<T>() |public bool CovertSerie<T>(Serie serie) where T : Serie|
-| CovertXYAxis() |public void CovertXYAxis(int index)
转换X轴和Y轴的配置 |
+| ConvertSerie() |public bool ConvertSerie(Serie serie, Type type)|
+| ConvertSerie<T>() |public bool ConvertSerie<T>(Serie serie) where T : Serie|
+| ConvertXYAxis() |public void ConvertXYAxis(int index)
转换X轴和Y轴的配置 |
| GenerateDefaultSerieName() |public string GenerateDefaultSerieName()|
| GetAllSerieDataCount() |public int GetAllSerieDataCount()|
| GetChartBackgroundColor() |public Color32 GetChartBackgroundColor()|
@@ -227,7 +227,6 @@ Inherits or Implemented: [BaseGraph](#basegraph),[ISerializationCallbackReceiver
| RemoveSerie<T>() |public void RemoveSerie<T>() where T : Serie|
| ReplaceSerie() |public bool ReplaceSerie(Serie oldSerie, Serie newSerie)|
| ResetDataIndex() |public bool ResetDataIndex(int serieIndex)
重置serie的数据项索引。避免数据项索引异常。 |
-| SaveAsImage() |public void SaveAsImage(string imageType = "png", string savePath = "")
保存图表为图片。 |
| SetBasePainterMaterial() |public void SetBasePainterMaterial(Material material)
设置Base Painter的材质球 |
| SetMaxCache() |public void SetMaxCache(int maxCache)
设置可缓存的最大数据量。当数据量超过该值时,会自动删除第一个值再加入最新值。 |
| SetPainterActive() |public void SetPainterActive(int index, bool flag)|
@@ -276,6 +275,7 @@ Inherits or Implemented: [MaskableGraphic](#maskablegraphic),[IPointerDownHandle
| RebuildChartObject() |public void RebuildChartObject()
移除并重新创建所有图表的Object。 |
| RefreshAllComponent() |public void RefreshAllComponent()|
| RefreshGraph() |public virtual void RefreshGraph()
在下一帧刷新图形。 |
+| SaveAsImage() |public void SaveAsImage(string imageType = "png", string savePath = "")
保存图表为图片。 |
| ScreenPointToChartPoint() |public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)|
| SetPainterDirty() |public void SetPainterDirty()
重新初始化Painter |
| SetSize() |public virtual void SetSize(float width, float height)
设置图形的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform) |
@@ -312,7 +312,7 @@ Inherits or Implemented: [BaseChart](#basechart)
| CopyList<T>() |public static bool CopyList<T>(List<T> toList, List<T> fromList)|
| DestoryGameObject() |public static void DestoryGameObject(GameObject go)|
| DestoryGameObject() |public static void DestoryGameObject(Transform parent, string childName)|
-| DestoryGameObjectByMatch() |public static void DestoryGameObjectByMatch(Transform parent, string match)|
+| DestoryGameObjectByMatch() |public static void DestoryGameObjectByMatch(Transform parent, string containString)|
| DestroyAllChildren() |public static void DestroyAllChildren(Transform parent)|
| GetActualValue() |public static float GetActualValue(float valueOrRate, float total, float maxRate = 1.5f)|
| GetAngle360() |public static float GetAngle360(Vector2 from, Vector2 to)
获得0-360的角度(12点钟方向为0度) |
@@ -645,6 +645,7 @@ Inherits or Implemented: [MaskableGraphic](#maskablegraphic)
|public method|description|
|--|--|
+| CheckRefresh() |public void CheckRefresh()|
| Init() |public void Init()|
| Refresh() |public void Refresh()|
| SetActive() |public void SetActive(bool flag, bool isDebugMode = false)|
diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md
index 20a467e2..d17fed35 100644
--- a/Documentation~/zh/changelog.md
+++ b/Documentation~/zh/changelog.md
@@ -65,7 +65,8 @@ slug: /changelog
## master
-* (2022.12.22) 修复`Covert XY Axis`后Y轴的`Label`显示异常的问题
+* (2022.12.22) 调整`Covert`重命名为`Convert`,涉及的接口有:`ConvertXYAxis()`,`CovertSerie()`等
+* (2022.12.22) 修复`Convert XY Axis`后Y轴的`Label`显示异常的问题
* (2022.12.12) 修复`Axis`的`Value`轴在某些情况下计算数值范围不准确的问题
* (2022.12.12) 优化`Legend`的`formatter`支持`{h}`通配符
* (2022.12.12) 修复`Legend`的`formatter`设置为固定值时显示不正常的问题
@@ -680,7 +681,7 @@ slug: /changelog
* (2020.04.19) 优化`LineChart`折线图的区域填充渐变效果
* (2020.04.19) 增加`AxisLabel`的`onZero`参数可将`Label`显示在`0`刻度上
* (2020.04.19) 增加`Serie`和`AxisLabel`的`showAsPositiveNumber`参数将负数数值显示为正数
-* (2020.04.18) 增加`Covert XY Axis`互换XY轴配置
+* (2020.04.18) 增加`Convert XY Axis`互换XY轴配置
* (2020.04.17) 增加`Axis`可通过`inverse`参数设置坐标轴反转
* (2020.04.16) 修复`Check warning`在`Unity2019.3`上的显示问题
* (2020.04.16) 修复`PieChart`在设置`Space`参数后动画绘制异常的问题
diff --git a/Editor/Charts/BaseChartEditor.cs b/Editor/Charts/BaseChartEditor.cs
index fc9f39d7..665e78f7 100644
--- a/Editor/Charts/BaseChartEditor.cs
+++ b/Editor/Charts/BaseChartEditor.cs
@@ -14,7 +14,7 @@ namespace XCharts.Editor
{
public static readonly GUIContent btnAddSerie = new GUIContent("Add Serie", "");
public static readonly GUIContent btnAddComponent = new GUIContent("Add Main Component", "");
- public static readonly GUIContent btnCovertXYAxis = new GUIContent("Covert XY Axis", "");
+ public static readonly GUIContent btnConvertXYAxis = new GUIContent("Convert XY Axis", "");
public static readonly GUIContent btnRebuildChartObject = new GUIContent("Rebuild Chart Object", "");
public static readonly GUIContent btnSaveAsImage = new GUIContent("Save As Image", "");
public static readonly GUIContent btnCheckWarning = new GUIContent("Check Warning", "");
@@ -273,8 +273,8 @@ namespace XCharts.Editor
{
if (m_Chart.HasChartComponent() && m_Chart.HasChartComponent())
{
- if (GUILayout.Button(Styles.btnCovertXYAxis))
- m_Chart.CovertXYAxis(0);
+ if (GUILayout.Button(Styles.btnConvertXYAxis))
+ m_Chart.ConvertXYAxis(0);
}
if (GUILayout.Button(Styles.btnRebuildChartObject))
{
diff --git a/Editor/Series/SerieListEditor.cs b/Editor/Series/SerieListEditor.cs
index 02e39e86..4ad75d3f 100644
--- a/Editor/Series/SerieListEditor.cs
+++ b/Editor/Series/SerieListEditor.cs
@@ -169,11 +169,11 @@ namespace XCharts.Editor
RefreshEditors();
}
}));
- foreach (var type in GetCovertToSerie(editor.serie.GetType()))
+ foreach (var type in GetConvertToSerie(editor.serie.GetType()))
{
- editor.menus.Add(new HeaderMenuInfo("Covert to " + type.Name, () =>
+ editor.menus.Add(new HeaderMenuInfo("Convert to " + type.Name, () =>
{
- CovertSerie(editor.serie, type);
+ ConvertSerie(editor.serie, type);
}));
}
if (editor.serie.GetType().IsDefined(typeof(SerieExtraComponentAttribute), false))
@@ -224,9 +224,9 @@ namespace XCharts.Editor
AssetDatabase.Refresh();
}
- public void CovertSerie(Serie serie, Type type)
+ public void ConvertSerie(Serie serie, Type type)
{
- chart.CovertSerie(serie, type);
+ chart.ConvertSerie(serie, type);
m_SeriesProperty = m_BaseEditor.RefreshSeries();
RefreshEditors();
}
@@ -254,7 +254,7 @@ namespace XCharts.Editor
AssetDatabase.Refresh();
}
- private List GetCovertToSerie(Type serie)
+ private List GetConvertToSerie(Type serie)
{
var list = new List();
var typeMap = RuntimeUtil.GetAllTypesDerivedFrom();
diff --git a/Runtime/Internal/BaseChart.API.cs b/Runtime/Internal/BaseChart.API.cs
index f51f8a5b..856f0687 100644
--- a/Runtime/Internal/BaseChart.API.cs
+++ b/Runtime/Internal/BaseChart.API.cs
@@ -464,7 +464,7 @@ namespace XCharts.Runtime
/// 转换X轴和Y轴的配置
///
/// 坐标轴索引,0或1
- public void CovertXYAxis(int index)
+ public void ConvertXYAxis(int index)
{
List m_XAxes;
List m_YAxes;
diff --git a/Runtime/Internal/BaseChart.Serie.cs b/Runtime/Internal/BaseChart.Serie.cs
index 99ec7bc4..27e39bc9 100644
--- a/Runtime/Internal/BaseChart.Serie.cs
+++ b/Runtime/Internal/BaseChart.Serie.cs
@@ -179,23 +179,23 @@ namespace XCharts.Runtime
RefreshChart();
}
- public bool CovertSerie(Serie serie) where T : Serie
+ public bool ConvertSerie(Serie serie) where T : Serie
{
- return CovertSerie(serie, typeof(T));
+ return ConvertSerie(serie, typeof(T));
}
- public bool CovertSerie(Serie serie, Type type)
+ public bool ConvertSerie(Serie serie, Type type)
{
try
{
- var newSerie = type.InvokeMember("CovertSerie",
+ var newSerie = type.InvokeMember("ConvertSerie",
BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.Public, null, null,
new object[] { serie }) as Serie;
return ReplaceSerie(serie, newSerie);
}
catch
{
- Debug.LogError(string.Format("CovertSerie Failed: can't found {0}.CovertSerie(Serie serie)", type.Name));
+ Debug.LogError(string.Format("ConvertSerie Failed: can't found {0}.ConvertSerie(Serie serie)", type.Name));
return false;
}
}
diff --git a/Runtime/Serie/Bar/Bar.cs b/Runtime/Serie/Bar/Bar.cs
index bd3c1031..0074102d 100644
--- a/Runtime/Serie/Bar/Bar.cs
+++ b/Runtime/Serie/Bar/Bar.cs
@@ -23,7 +23,7 @@ namespace XCharts.Runtime
return serie;
}
- public static Bar CovertSerie(Serie serie)
+ public static Bar ConvertSerie(Serie serie)
{
var newSerie = SerieHelper.CloneSerie(serie);
return newSerie;
diff --git a/Runtime/Serie/Bar/SimplifiedBar.cs b/Runtime/Serie/Bar/SimplifiedBar.cs
index 3eed9ff7..8a6c2a0b 100644
--- a/Runtime/Serie/Bar/SimplifiedBar.cs
+++ b/Runtime/Serie/Bar/SimplifiedBar.cs
@@ -32,7 +32,7 @@ namespace XCharts.Runtime
return serie;
}
- public static SimplifiedBar CovertSerie(Serie serie)
+ public static SimplifiedBar ConvertSerie(Serie serie)
{
var newSerie = serie.Clone();
return newSerie;
diff --git a/Runtime/Serie/Candlestick/SimplifiedCandlestick.cs b/Runtime/Serie/Candlestick/SimplifiedCandlestick.cs
index 4a8ca1a2..8bddbe28 100644
--- a/Runtime/Serie/Candlestick/SimplifiedCandlestick.cs
+++ b/Runtime/Serie/Candlestick/SimplifiedCandlestick.cs
@@ -30,7 +30,7 @@ namespace XCharts.Runtime
return serie;
}
- public static SimplifiedCandlestick CovertSerie(Serie serie)
+ public static SimplifiedCandlestick ConvertSerie(Serie serie)
{
var newSerie = serie.Clone();
return newSerie;
diff --git a/Runtime/Serie/Line/Line.cs b/Runtime/Serie/Line/Line.cs
index 3b13b9ef..a86c32e0 100644
--- a/Runtime/Serie/Line/Line.cs
+++ b/Runtime/Serie/Line/Line.cs
@@ -38,7 +38,7 @@ namespace XCharts.Runtime
return serie;
}
- public static Line CovertSerie(Serie serie)
+ public static Line ConvertSerie(Serie serie)
{
var newSerie = serie.Clone();
return newSerie;
diff --git a/Runtime/Serie/Line/SimplifiedLine.cs b/Runtime/Serie/Line/SimplifiedLine.cs
index 94470d90..3401218c 100644
--- a/Runtime/Serie/Line/SimplifiedLine.cs
+++ b/Runtime/Serie/Line/SimplifiedLine.cs
@@ -32,7 +32,7 @@ namespace XCharts.Runtime
return serie;
}
- public static SimplifiedLine CovertSerie(Serie serie)
+ public static SimplifiedLine ConvertSerie(Serie serie)
{
var newSerie = serie.Clone();
return newSerie;
diff --git a/Runtime/Serie/Pie/Pie.cs b/Runtime/Serie/Pie/Pie.cs
index a86fc07f..5d89a5dc 100644
--- a/Runtime/Serie/Pie/Pie.cs
+++ b/Runtime/Serie/Pie/Pie.cs
@@ -21,7 +21,7 @@ namespace XCharts.Runtime
return serie;
}
- public static Pie CovertSerie(Serie serie)
+ public static Pie ConvertSerie(Serie serie)
{
var newSerie = SerieHelper.CloneSerie(serie);
return newSerie;