mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
增加ItemStyle的tooltipFormatter参数可单独配置Serie的Tooltip显示
This commit is contained in:
@@ -45,6 +45,7 @@ namespace XCharts
|
||||
[SerializeField] private float m_BorderWidth = 0;
|
||||
[SerializeField] private Color m_BorderColor;
|
||||
[SerializeField] [Range(0, 1)] private float m_Opacity = 1;
|
||||
[SerializeField] private string m_TooltipFormatter;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用。
|
||||
@@ -136,6 +137,14 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_Opacity, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 提示框单项的字符串模版格式器。具体配置参考`Tooltip`的`formatter`
|
||||
/// </summary>
|
||||
public string tooltipFormatter
|
||||
{
|
||||
get { return m_TooltipFormatter; }
|
||||
set { if (PropertyUtility.SetClass(ref m_TooltipFormatter, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 实际边框宽。边框不显示时为0。
|
||||
/// </summary>
|
||||
public float runtimeBorderWidth { get { return NeedShowBorder() ? borderWidth : 0; } }
|
||||
|
||||
Reference in New Issue
Block a user