mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
Added Legend's textAutoColor to set the text color match with Serie color (#163)
This commit is contained in:
@@ -78,6 +78,7 @@ namespace XCharts
|
||||
[SerializeField] private float m_ItemHeight = 12.0f;
|
||||
[SerializeField] private float m_ItemGap = 10f;
|
||||
[SerializeField] private bool m_ItemAutoColor = true;
|
||||
[SerializeField] private bool m_TextAutoColor = false;
|
||||
[SerializeField] private string m_Formatter;
|
||||
[SerializeField] private TextStyle m_TextStyle = new TextStyle();
|
||||
[SerializeField] private List<string> m_Data = new List<string>();
|
||||
@@ -176,6 +177,16 @@ namespace XCharts
|
||||
set { if (PropertyUtil.SetStruct(ref m_ItemAutoColor, value)) SetComponentDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// Whether the legend text matches the color automatically.
|
||||
/// 图例标记的文本是否自动匹配颜色。
|
||||
/// [default:false]
|
||||
/// </summary>
|
||||
public bool textAutoColor
|
||||
{
|
||||
get { return m_TextAutoColor; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_TextAutoColor, value)) SetComponentDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// Legend content string template formatter. Support for wrapping lines with \n. Template:{name}.
|
||||
/// 图例内容字符串模版格式器。支持用 \n 换行。
|
||||
/// 模板变量为图例名称 {name}。
|
||||
|
||||
Reference in New Issue
Block a user