graph chart引入&骑行结果弹窗

This commit is contained in:
lishuo committed 2021-04-22 19:29:59 +08:00
1 parent 40d118cea3
commit 96f3644b5b
2374 files changed
+485161 -2410

No files matched your search

@@ -0,0 +1,29 @@
#define Graph_And_Chart_PRO
using UnityEngine;
using System.Collections;
using ChartAndGraph;
using System;
public class SimpleGraphDemo : MonoBehaviour
{
public GraphChart Graph;
public int TotalPoints = 10;
void Start () {
if (Graph == null) // the ChartGraph info is obtained via the inspector
return;
DateTime x = DateTime.Now.AddDays(TotalPoints); // x is marked as a date
Graph.DataSource.StartBatch(); // calling StartBatch allows changing the graph data without redrawing the graph for every change
Graph.DataSource.ClearCategory("Achivments Per Day"); // clear the "test" category. this category is defined using the GraphChart inspector
for (int i=0; i< TotalPoints; i++) //add random points to the graph
{
Graph.DataSource.AddPointToCategory("Achivments Per Day", x, UnityEngine.Random.value*30f); // each time we call AddPointToCategory
x += TimeSpan.FromDays(1);
}
Graph.DataSource.EndBatch(); // finally we call EndBatch , this will cause the GraphChart to redraw itself
}
void Update () {
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 932bc7424c0ae484b9f7b8d1e8646e3f
timeCreated: 1480961870
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: