mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 02:10:16 +00:00
增加Bar的realtimeSort支持实时排序
This commit is contained in:
@@ -37,6 +37,7 @@ namespace XCharts.Runtime
|
||||
label.SetActive(comment.show && item.show, true);
|
||||
label.SetPosition(labelPos);
|
||||
label.text.SetLocalPosition(labelStyle.offset);
|
||||
item.labelObject = label;
|
||||
}
|
||||
};
|
||||
comment.refreshComponent();
|
||||
|
||||
@@ -15,7 +15,9 @@ namespace XCharts.Runtime
|
||||
[SerializeField] private Rect m_MarkRect;
|
||||
[SerializeField] private CommentMarkStyle m_MarkStyle = new CommentMarkStyle() { show = false };
|
||||
[SerializeField] private LabelStyle m_LabelStyle = new LabelStyle() { show = false };
|
||||
[SerializeField] [Since("v3.5.0")]private Location m_Location = new Location() { align = Location.Align.TopLeft, top = 0.125f };
|
||||
[SerializeField][Since("v3.5.0")] private Location m_Location = new Location() { align = Location.Align.TopLeft, top = 0.125f };
|
||||
|
||||
public ChartLabel labelObject { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -27,7 +29,18 @@ namespace XCharts.Runtime
|
||||
/// content of comment.
|
||||
/// ||注解的文本内容。支持模板参数,可以参考Tooltip的itemFormatter。
|
||||
/// </summary>
|
||||
public string content { get { return m_Content; } set { if (PropertyUtil.SetClass(ref m_Content, value)) SetComponentDirty(); } }
|
||||
public string content
|
||||
{
|
||||
get { return m_Content; }
|
||||
set
|
||||
{
|
||||
if (PropertyUtil.SetClass(ref m_Content, value))
|
||||
{
|
||||
if (labelObject != null) labelObject.SetText(value);
|
||||
else SetComponentDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// the mark rect of comment.
|
||||
/// ||注解区域。
|
||||
|
||||
Reference in New Issue
Block a user