mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 22:40:10 +00:00
增加控制显示数据个数参数showDataNumber
This commit is contained in:
@@ -151,7 +151,7 @@ namespace xcharts
|
||||
public class Series
|
||||
{
|
||||
public string legendKey;
|
||||
public int maxCount = 0;
|
||||
public int showDataNumber = 0;
|
||||
public List<SeriesData> dataList = new List<SeriesData>();
|
||||
|
||||
public float Max
|
||||
@@ -185,7 +185,7 @@ namespace xcharts
|
||||
|
||||
public void AddData(string key, float value)
|
||||
{
|
||||
if (dataList.Count >= maxCount && maxCount != 0)
|
||||
if (dataList.Count >= showDataNumber && showDataNumber != 0)
|
||||
{
|
||||
dataList.RemoveAt(0);
|
||||
}
|
||||
@@ -209,9 +209,9 @@ namespace xcharts
|
||||
[SerializeField]
|
||||
protected Coordinate coordinate;
|
||||
[SerializeField]
|
||||
public XAxis xAxis;
|
||||
protected XAxis xAxis;
|
||||
[SerializeField]
|
||||
public YAxis yAxis;
|
||||
protected YAxis yAxis;
|
||||
[SerializeField]
|
||||
protected Legend legend;
|
||||
[SerializeField]
|
||||
|
||||
Reference in New Issue
Block a user