작업 조건 분석 기능 개발
This commit is contained in:
@@ -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:
|
||||
Reference in New Issue
Block a user