mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 15:00:08 +00:00
增加LineChart的普通折线图可通过设置ingore参数过滤数据的支持
This commit is contained in:
@@ -254,6 +254,8 @@ namespace XCharts
|
||||
[SerializeField] private bool m_ShowDataName;
|
||||
[SerializeField] private bool m_ShowDataIcon;
|
||||
[SerializeField] private bool m_Clip = true;
|
||||
[SerializeField] private bool m_Ingore = true;
|
||||
[SerializeField] private float m_IngoreValue = 0;
|
||||
|
||||
[SerializeField] private List<SerieData> m_Data = new List<SerieData>();
|
||||
|
||||
@@ -609,6 +611,22 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_RoundCap, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否开启忽略数据。当为 true 时,数据值为 ingoreValue 时不进行绘制。
|
||||
/// </summary>
|
||||
public bool ingore
|
||||
{
|
||||
get { return m_Ingore; }
|
||||
set { if (PropertyUtility.SetStruct(ref m_Ingore, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 忽略数据的默认值。当ingore为true才有效。
|
||||
/// </summary>
|
||||
public float ingoreValue
|
||||
{
|
||||
get { return m_IngoreValue; }
|
||||
set { if (PropertyUtility.SetStruct(ref m_IngoreValue, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 仪表盘轴线。
|
||||
/// </summary>
|
||||
public GaugeAxis gaugeAxis
|
||||
@@ -1538,6 +1556,11 @@ namespace XCharts
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsIngoreValue(float value)
|
||||
{
|
||||
return m_Ingore && Mathf.Approximately(value, m_IngoreValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新运行时中心点和半径
|
||||
/// </summary>
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace XCharts
|
||||
[SerializeField] private bool m_ForceENotation = false;
|
||||
[SerializeField] private float m_PaddingLeftRight = 5f;
|
||||
[SerializeField] private float m_PaddingTopBottom = 5f;
|
||||
[SerializeField] private string m_IngoreDataDefaultContent = "-";
|
||||
[SerializeField] private Sprite m_BackgroundImage;
|
||||
[SerializeField] private TextStyle m_TextStyle = new TextStyle(18, FontStyle.Normal);
|
||||
[SerializeField] private LineStyle m_LineStyle = new LineStyle(LineStyle.Type.Solid, 0.7f);
|
||||
@@ -166,6 +167,10 @@ namespace XCharts
|
||||
/// </summary>
|
||||
public float paddingTopBottom { get { return m_PaddingTopBottom; } set { m_PaddingTopBottom = value; } }
|
||||
/// <summary>
|
||||
/// 被忽略数据的默认显示字符信息。
|
||||
/// </summary>
|
||||
public string ingoreDataDefaultContent { get { return m_IngoreDataDefaultContent; } set { m_IngoreDataDefaultContent = value; } }
|
||||
/// <summary>
|
||||
/// The image of icon.
|
||||
/// 图标的图片。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user