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

File diff suppressed because it is too large. Load diff
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 126da8d26e13b1c40ba841bbac3c0a26
timeCreated: 1578946284
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,49 @@
#define Graph_And_Chart_PRO
using UnityEngine;
using System.Collections;
using ChartAndGraph;
using UnityEngine.UI;
public class MixedCharts : MonoBehaviour {
public BarChart Bar;
public GraphChartBase Graph;
// Use this for initialization
void Start () {
StartCoroutine(FillGraphWait());
}
/// <summary>
/// This method waits for the bar chart to fill up before filling the graph
/// </summary>
/// <returns></returns>
IEnumerator FillGraphWait()
{
yield return new WaitForEndOfFrame();
yield return new WaitForEndOfFrame();
FillGraph();
}
void FillGraph()
{
Graph.DataSource.ClearCategory("Category1");
for (int i=0; i<Bar.DataSource.TotalCategories; i++)
{
string categoryName = Bar.DataSource.GetCategoryName(i);
for(int j=0; j<Bar.DataSource.TotalGroups; j++)
{
string groupName = Bar.DataSource.GetGroupName(j);
Vector3 position;
Bar.GetBarTrackPosition(categoryName, groupName, out position); // find the position of the top of the bar chart
double x, y;
Graph.PointToClient(position, out x, out y); // convert it to graph coordinates
Graph.DataSource.AddPointToCategory("Category1", x, Random.value * 10f); // drop the y value and set your own value
}
}
}
// Update is called once per frame
void Update () {
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e2700c6cb7bf66e47a9ae50ef358ca22
timeCreated: 1564581733
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c790bfb25b5d5834b8fdf479b47977dd
timeCreated: 1564581490
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant: