增加AxisLabel和SerieLabel的formatter委托方法 #145

This commit is contained in:
monitor1394
2021-06-27 12:26:20 +08:00
parent 78923ede3a
commit e7be2adbc9
9 changed files with 86 additions and 16 deletions

View File

@@ -100,6 +100,7 @@ namespace XCharts
[SerializeField] private string m_NumericFormatter = "";
[SerializeField] private bool m_AutoOffset = false;
[SerializeField] private TextStyle m_TextStyle = new TextStyle();
private DelegateSerieLabelFormatter m_FormatterFunction;
public void Reset()
{
@@ -337,6 +338,12 @@ namespace XCharts
set { if (PropertyUtil.SetClass(ref m_TextStyle, value)) SetAllDirty(); }
}
public DelegateSerieLabelFormatter formatterFunction
{
get { return m_FormatterFunction; }
set { m_FormatterFunction = value; }
}
public bool IsInside()
{
return position == Position.Inside || position == Position.Center;