mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
增加更新Axis数据和图标的接口
This commit is contained in:
@@ -586,6 +586,24 @@ namespace XCharts
|
||||
SetAllDirty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新类目数据
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="category"></param>
|
||||
public void UpdateData(int index, string category)
|
||||
{
|
||||
if (index >= 0 && index < m_Data.Count)
|
||||
{
|
||||
m_Data[index] = category;
|
||||
SetComponentDirty();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加图标
|
||||
/// </summary>
|
||||
/// <param name="icon"></param>
|
||||
public void AddIcon(Sprite icon)
|
||||
{
|
||||
if (maxCache > 0)
|
||||
@@ -600,6 +618,20 @@ namespace XCharts
|
||||
SetAllDirty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新图标
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="icon"></param>
|
||||
public void UpdateIcon(int index, Sprite icon)
|
||||
{
|
||||
if (index >= 0 && index < m_Icons.Count)
|
||||
{
|
||||
m_Icons[index] = icon;
|
||||
SetComponentDirty();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得指定索引的类目数据
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user