优化坐标绘制,支持大数据

This commit is contained in:
monitor1394
2019-03-31 09:11:35 +08:00
parent 49dfd59ff3
commit f9dd56fdc5
15 changed files with 29676 additions and 118 deletions

View File

@@ -295,6 +295,11 @@ namespace xcharts
RefreshChart();
}
public void AddData(int legend,float value)
{
seriesList[legend].AddData(value);
}
public void UpdateData(string legend, float value, int dataIndex = 0)
{
for (int i = 0; i < seriesList.Count; i++)
@@ -596,7 +601,7 @@ namespace xcharts
{
}
protected void RefreshChart()
public void RefreshChart()
{
int tempWid = (int)chartWid;
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, tempWid - 1);