完善数据操作接口

This commit is contained in:
monitor1394
2019-05-15 09:44:18 +08:00
parent 0b716adb5a
commit e72cfbdd3f
18 changed files with 1916 additions and 15087 deletions

View File

@@ -0,0 +1,34 @@
using UnityEngine;
using XCharts;
public class Demo_PieChart : MonoBehaviour
{
private PieChart chart;
private float time;
private int count = 0;
private void Awake()
{
chart = transform.GetComponent<PieChart>();
chart.ClearData();
}
private void Update()
{
time += Time.deltaTime;
if(time > 1 )
{
time = 0;
if(count < 5)
{
chart.AddData("time" + count, Random.Range(10, 100));
}
else
{
int index = count % 5;
chart.UpdateData("time" + index, Random.Range(10, 100));
}
count++;
}
}
}

View File

@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 1f0aafe148c9e4f4dbf24fc6542722fa
timeCreated: 1557832345
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: