mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 22:40:10 +00:00
增加SampleDist采样距离的配置,对过密的曲线开启采样,优化绘制效率
This commit is contained in:
@@ -43,6 +43,7 @@ namespace XCharts
|
||||
[SerializeField] protected int m_MaxShowDataNumber;
|
||||
[SerializeField] protected int m_MaxCacheDataNumber;
|
||||
[SerializeField] [Range(1, 8)] private float m_LineSmoothStyle = 2f;
|
||||
[SerializeField] protected float m_SampleDist;
|
||||
|
||||
[NonSerialized] private Theme m_CheckTheme = 0;
|
||||
[NonSerialized] private Title m_CheckTitle = Title.defaultTitle;
|
||||
|
||||
@@ -80,6 +80,13 @@ namespace XCharts
|
||||
/// <value></value>
|
||||
public float lineSmoothStyle { get { return m_LineSmoothStyle; } set { m_LineSmoothStyle = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// the min pixel dist of sample.
|
||||
/// 采样的最小像素距离,默认为0时不采样。当两个数据点间的像素距离小于改值时,开启采样,保证两点间的像素距离不小于改值。
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public float sampleDist { get { return m_SampleDist; } set { m_SampleDist = value < 0 ? 0 : value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Set the size of chart.
|
||||
/// 设置图表的大小。
|
||||
|
||||
Reference in New Issue
Block a user