mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
调整Covert重命名为Convert
This commit is contained in:
@@ -129,9 +129,9 @@ Inherits or Implemented: [BaseGraph](#basegraph),[ISerializationCallbackReceiver
|
||||
| ClearData() |public virtual void ClearData()<br/>Clear all components and series data. Note: serie only empties the data and does not remove serie. |
|
||||
| ClearSerieData() |public virtual void ClearSerieData()<br/>Clear the data of all series. |
|
||||
| ClickLegendButton() |public void ClickLegendButton(int legendIndex, string legendName, bool show)<br/>点击图例按钮 |
|
||||
| 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)<br/>转换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)<br/>转换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)<br/>重置serie的数据项索引。避免数据项索引异常。 |
|
||||
| SaveAsImage() |public void SaveAsImage(string imageType = "png", string savePath = "")<br/>保存图表为图片。 |
|
||||
| SetBasePainterMaterial() |public void SetBasePainterMaterial(Material material)<br/>设置Base Painter的材质球 |
|
||||
| SetMaxCache() |public void SetMaxCache(int maxCache)<br/>设置可缓存的最大数据量。当数据量超过该值时,会自动删除第一个值再加入最新值。 |
|
||||
| SetPainterActive() |public void SetPainterActive(int index, bool flag)|
|
||||
@@ -276,6 +275,7 @@ Inherits or Implemented: [MaskableGraphic](#maskablegraphic),[IPointerDownHandle
|
||||
| RebuildChartObject() |public void RebuildChartObject()<br/>移除并重新创建所有图表的Object。 |
|
||||
| RefreshAllComponent() |public void RefreshAllComponent()|
|
||||
| RefreshGraph() |public virtual void RefreshGraph()<br/>Redraw graph in next frame. |
|
||||
| SaveAsImage() |public void SaveAsImage(string imageType = "png", string savePath = "")<br/>保存图表为图片。 |
|
||||
| ScreenPointToChartPoint() |public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)|
|
||||
| SetPainterDirty() |public void SetPainterDirty()<br/>重新初始化Painter |
|
||||
| SetSize() |public virtual void SetSize(float width, float height)<br/>设置图形的宽高(在非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)<br/>获得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)|
|
||||
|
||||
@@ -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`参数后动画绘制异常的问题
|
||||
|
||||
@@ -129,9 +129,9 @@ Inherits or Implemented: [BaseGraph](#basegraph),[ISerializationCallbackReceiver
|
||||
| ClearData() |public virtual void ClearData()<br/>清空所有组件和Serie的数据。注意:Serie只是清空数据,不会移除Serie。 |
|
||||
| ClearSerieData() |public virtual void ClearSerieData()<br/>清空所有serie的数据。 |
|
||||
| ClickLegendButton() |public void ClickLegendButton(int legendIndex, string legendName, bool show)<br/>点击图例按钮 |
|
||||
| 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)<br/>转换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)<br/>转换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)<br/>重置serie的数据项索引。避免数据项索引异常。 |
|
||||
| SaveAsImage() |public void SaveAsImage(string imageType = "png", string savePath = "")<br/>保存图表为图片。 |
|
||||
| SetBasePainterMaterial() |public void SetBasePainterMaterial(Material material)<br/>设置Base Painter的材质球 |
|
||||
| SetMaxCache() |public void SetMaxCache(int maxCache)<br/>设置可缓存的最大数据量。当数据量超过该值时,会自动删除第一个值再加入最新值。 |
|
||||
| SetPainterActive() |public void SetPainterActive(int index, bool flag)|
|
||||
@@ -276,6 +275,7 @@ Inherits or Implemented: [MaskableGraphic](#maskablegraphic),[IPointerDownHandle
|
||||
| RebuildChartObject() |public void RebuildChartObject()<br/>移除并重新创建所有图表的Object。 |
|
||||
| RefreshAllComponent() |public void RefreshAllComponent()|
|
||||
| RefreshGraph() |public virtual void RefreshGraph()<br/>在下一帧刷新图形。 |
|
||||
| SaveAsImage() |public void SaveAsImage(string imageType = "png", string savePath = "")<br/>保存图表为图片。 |
|
||||
| ScreenPointToChartPoint() |public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)|
|
||||
| SetPainterDirty() |public void SetPainterDirty()<br/>重新初始化Painter |
|
||||
| SetSize() |public virtual void SetSize(float width, float height)<br/>设置图形的宽高(在非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)<br/>获得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)|
|
||||
|
||||
@@ -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`参数后动画绘制异常的问题
|
||||
|
||||
@@ -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<XAxis>() && m_Chart.HasChartComponent<YAxis>())
|
||||
{
|
||||
if (GUILayout.Button(Styles.btnCovertXYAxis))
|
||||
m_Chart.CovertXYAxis(0);
|
||||
if (GUILayout.Button(Styles.btnConvertXYAxis))
|
||||
m_Chart.ConvertXYAxis(0);
|
||||
}
|
||||
if (GUILayout.Button(Styles.btnRebuildChartObject))
|
||||
{
|
||||
|
||||
@@ -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<Type> GetCovertToSerie(Type serie)
|
||||
private List<Type> GetConvertToSerie(Type serie)
|
||||
{
|
||||
var list = new List<Type>();
|
||||
var typeMap = RuntimeUtil.GetAllTypesDerivedFrom<Serie>();
|
||||
|
||||
@@ -464,7 +464,7 @@ namespace XCharts.Runtime
|
||||
/// 转换X轴和Y轴的配置
|
||||
/// </summary>
|
||||
/// <param name="index">坐标轴索引,0或1</param>
|
||||
public void CovertXYAxis(int index)
|
||||
public void ConvertXYAxis(int index)
|
||||
{
|
||||
List<MainComponent> m_XAxes;
|
||||
List<MainComponent> m_YAxes;
|
||||
|
||||
@@ -179,23 +179,23 @@ namespace XCharts.Runtime
|
||||
RefreshChart();
|
||||
}
|
||||
|
||||
public bool CovertSerie<T>(Serie serie) where T : Serie
|
||||
public bool ConvertSerie<T>(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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<Bar>(serie);
|
||||
return newSerie;
|
||||
|
||||
@@ -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<SimplifiedBar>();
|
||||
return newSerie;
|
||||
|
||||
@@ -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<SimplifiedCandlestick>();
|
||||
return newSerie;
|
||||
|
||||
@@ -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<Line>();
|
||||
return newSerie;
|
||||
|
||||
@@ -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<SimplifiedLine>();
|
||||
return newSerie;
|
||||
|
||||
@@ -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<Pie>(serie);
|
||||
return newSerie;
|
||||
|
||||
Reference in New Issue
Block a user