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. SpringBoot学习------SpringBoot使用Thymleaf模块访问不了静态页面

    SpringBoot使用Thymleaf模块访问不了静态页面 最近学习SpringBoot的过程中使用了Thymeleaf模块引擎,页面发送请求后老是无法显示静态页面,所有的步骤都是参考资料来执行,自 ...

  2. vim 基础配置

    最近在使用 python 搞服务, 简单配置了一个 vim, 配置了自动补全以及背景色 .(ps:搜狗输入法快捷键占用真是太坑爹,改用谷歌输入法,世界安静了) 具体配置如下: 一. 安装插件 1.克隆 ...

  3. Kafka 系列(三)—— Kafka 生产者详解

    一.生产者发送消息的过程 首先介绍一下 Kafka 生产者发送消息的过程: Kafka 会将发送消息包装为 ProducerRecord 对象, ProducerRecord 对象包含了目标主题和要发 ...

  4. Oracle中的字符函数

    Oracle中常用的字符串函数有以下几种: 1.upper()---将字符串的内容全部转换为大写.lower()---将字符串的内容全部转换为小写.具体用法: select  upper('test' ...

  5. C#_细说Cookie_Json Helper_Cookies封装

    阅读目录 开始 Cookie 概述 Cookie的写.读过程 使用Cookie保存复杂对象 Js中读写Cookie Cookie在Session中的应用 Cookie在身份验证中的应用 Cookie的 ...

  6. 如何使用人工智能保护API的安全

    数字转型是基于一种可驱动新的操作模型的API,提供对业务逻辑.应用程序和数据的直接访问.虽然这种访问对于员工,合作伙伴和客户来说非常方便,但它也使API成为黑客和恶意网络的攻击目标.随着越来越多的攻击 ...

  7. WebSocket实现数据库更新前台实时显示

    通过一个小实例来实现数据库更新后,推送消息给前台,让前台进行相应操作. 需求 数据库更新之后服务器推送消息给前台,让前台做操作.(数据库的数据不是由服务器写入的) 实现的话说到底都是用轮询,因为数据库 ...

  8. layui下拉框不显示的问题

    1.先检查有没有引入layui.js 2.然后看有没有被<form class="layui-form"></form>包住, 3.查看是否有以下代码 &l ...

  9. python基础知识补充

    set 集合 {} 无序 集合天然去重 增 : s.add s.update 迭代添加 删 : s.pop( ) 随机删除 返回删除值 s.clear( ) 清空 获取到的是 set( ) del s ...

  10. ForkJoinPool 分支/合并框架

    ForkJoinPool 分支/合并框架 一.Fork/Join框架简介 Fork/Join 框架就是在必要的情况下,将一个大任务,进行拆分(fork)成若干个小任务(拆到不可再拆时),再将一个个的小 ...