1.选择主题 “Themes”,以"Graph"——“preset7” 为例;

2.选择“Canvas”——“GraphChart”预制体,1.Set data categories  即“设置数据类型”,each category has it's own visual settings 每个类别都有自己的视觉设置,Line Thickness等‘

3.Now lets feed the chart with data _现在让我们用数据填充图表;   Use category names from the inspector(使用检查器中的类别名称)

4.Drag the chart in to  the script property(将图表拖到script属性中)

  

 using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using ChartAndGraph; public class MyGraphSample : MonoBehaviour
{
public GraphChart chart; private float Timer = 1f; private float X = 10f;
// Start is called before the first frame update
void Start()
{
//It is also best practice to enclose graph changes in StartBatch and EndBatch calls chart.DataSource.StartBatch(); //It is best practice to clear a category before filing it with new data
chart.DataSource.ClearCategory("KOKO");
chart.DataSource.AddPointToCategory("KOKO",,);
chart.DataSource.AddPointToCategory("KOKO", , );
chart.DataSource.AddPointToCategory("KOKO",,);
chart.DataSource.AddPointToCategory("KOKO", , ); ////now we do the same for the second category
//chart.DataSource.ClearCategory("Juhnko");
//chart.DataSource.AddPointToCategory("KOKO", 0, 0);
//chart.DataSource.AddPointToCategory("KOKO", 5, 5);
//chart.DataSource.AddPointToCategory("KOKO", 8, 7);
//chart.DataSource.AddPointToCategory("KOKO", 15, 10); //now we do the same for the three category
chart.DataSource.ClearCategory("liang");
chart.DataSource.AddPointToCategory("liang", , );
chart.DataSource.AddPointToCategory("liang", , );
chart.DataSource.AddPointToCategory("liang", , );
chart.DataSource.AddPointToCategory("liang", , ); //each startBatch call must be matched with an EndBath call !!!
chart.DataSource.EndBatch(); //graph is redrawn after EndBath is called
}
//lets handle a click event
public void OnItemClick(GraphChartBase.GraphEventArgs args)
{
Debug.Log("点击的类型是:"+args.Category+" 索引点为:"+args.Index);
} // Update is called once per frame
void Update()
{
//now let's add a streaming data update the goes every 1 second.
Timer -= Time.deltaTime;
if (Timer<=0f)
{
Timer = 1f;
chart.DataSource.AddPointToCategory("KOKO",X, Random.value);
chart.DataSource.AddPointToCategory("liang", X, Random.value);
X++;
}
}
}

Graph and Chart Study的更多相关文章

  1. How To Build Compelling Stories From Your Data Sets

    How To Build Compelling Stories From Your Data Sets Every number has a story. As a data scientist, y ...

  2. github上所有大于800 star OC框架

    https://github.com/XCGit/awesome-objc-frameworks#awesome-objc-frameworks awesome-objc-frameworks ID ...

  3. Jmeter_初步认识随笔

    1. 简介 Apache JMeter是100%纯java桌面应用程序,被设计用来测试客户端/服务器结构的软件(例如web应用程序).它可以用来测试包括基于静态和动态资源程序的性能,例如静态文件,Ja ...

  4. amchart

    amchart能够根据提供的数据便捷的生成好看的图标,曾在项目中遇到使用falsh版以支持对js支持不好的低版本浏览器,但是现在官网上都是js版本的,flash版的文档都没有,搜索结果一般都是链接到博 ...

  5. extjs+amcharts生成3D柱状图和数据表格使用总结

    废话不多说,使用extjs+amcharts创建3d柱状图和数据表实例,如下: 1.首先定义一个数据模型 Ext.define("cacheHijack", { extend : ...

  6. IAB303 Data Analytics Assessment Task

    Assessment TaskIAB303 Data Analyticsfor Business InsightSemester I 2019Assessment 2 – Data Analytics ...

  7. vba编程基础2

    安装office2010的时候, 最好是 完全安装/完整安装 , 这样可以查阅 excel的 "帮助文档" 帮助文档中包含了更多的/更详细的 参考信息. 普通模块无事件, 只有 子 ...

  8. 创建XML的用法

    注意:在实际开发中,注意createElement().createAttribute().createTextNode().appendchild()等方法的具体使用. // root根节点的属性数 ...

  9. FusionCharts之我用

    fusioncharts:(此控件需flash支持) 介绍:http://baike.baidu.com/link?url=SOheR7sQlb93S5TqYmeI7FhtJ0V9ABNwH6OsAa ...

随机推荐

  1. android ——ListView

    谷歌官方文档的介绍:https://developer.android.com/reference/android/widget/ListView.html 显示可垂直滚动的视图集合,其中每个视图都立 ...

  2. 【CodeForces - 1200A】Hotelier(水题、模拟)

    Hotelier 直接翻译了 Descriptions Amugae的酒店由10人组成10客房.房间从0开始编号0到99 从左到右. 酒店有两个入口 - 一个来自左端,另一个来自右端.当顾客通过左入口 ...

  3. PCB学习总结

    一.电子设计流程概述:项目立项------元件创库----------原理图设计-----------封装绘制-------pcb设计--------生产文件的输出--------pcb文件加工 二. ...

  4. spring-boot-plus集成Spring Boot Admin管理和监控应用(十一)

    spring-boot-plus集成Spring Boot Admin管理和监控应用 spring boot admin Spring Boot Admin用来管理和监控Spring Boot应用程序 ...

  5. 《Java 8 in Action》Chapter 1:为什么要关心Java 8

    自1998年 JDK 1.0(Java 1.0) 发布以来,Java 已经受到了学生.项目经理和程序员等一大批活跃用户的欢迎.这一语言极富活力,不断被用在大大小小的项目里.从 Java 1.1(199 ...

  6. python3.6.6在CentOS7上的安装

    Python官网:https://www.python.org/ 下载指定版本的软件包: [root@General data]# yum clean all  &&  yum rep ...

  7. 关于Python虚拟环境与包管理你应该知道的事

    关于我 一个有思想的程序猿,终身学习实践者,目前在一个创业团队任team lead,技术栈涉及Android.Python.Java和Go,这个也是我们团队的主要技术栈. Github:https:/ ...

  8. Java中访问修饰符public、private、protecte、default

    Java中访问修饰符public.private.protecte.default的意义讲解:public: Java语言中访问限制最宽的修饰符,一般称之为“公共的”.被其修饰的类.属性以及方法不 仅 ...

  9. 启xin宝app的token算法破解——frida篇(四)

    前两篇文章分析该APP的抓包.的逆向: 启xin宝app的token算法破解--抓包分析篇(一) 启xin宝app的token算法破解--逆向篇(二) 启xin宝app的token算法破解--toke ...

  10. poium测试库之JavaScript API封装原理

    poium一直我在维护的一个开源项目,它的定位是以极简的方式在自动化项目中Page Objects设计模式.我在之前的文章中也有介绍. 本篇文章主要介绍一个JavaScript元素操作的封装原理. 为 ...