zoukankan      html  css  js  c++  java
  • Bar Chart _Study

    ---恢复内容开始---

    以“3D BarChart”为例。

    1.Select a theme.(选择一个主题模板)

    2.Set up categories and groups.(设置类型和组)

    3.You can set values from the inspector.(你可以从检查面板中设置值)

    4.Creat a new script.(创建一个新脚本) 

    Note:(1)Names should be as defined in the editor (名字应该在编辑器中被定义过)

               (2)Set the value of a bar using the category name and group that are defined in the inspector.(使用检查器中定义的类别名称和组设置栏的值)

    5.Creat an object with the sample script! (建立空物体挂在脚本)

    6.Experiment with setting view size in the editor.

    7.Experiment with values  customization.

    8.在Categories中设置Bar的样式。

    9.Bar Clickded

     1 using System.Collections;
     2 using System.Collections.Generic;
     3 using ChartAndGraph;
     4 using UnityEngine;
     5 
     6 public class MyBarSample : MonoBehaviour
     7 {
     8     public BarChart chart;
     9     // Start is called before the first frame update
    10     void Start()
    11     {
    12         
    13         chart.DataSource.SetValue("koko","one",8);
    14         chart.DataSource.SlideValue("koko","one",8,3f);
    15         chart.DataSource.SlideValue("juhnko","one",6,5f);
    16     }
    17     //lets handle a bar click event
    18     public void OnBarClick(BarChart.BarEventArgs args)
    19     {
    20         Debug.Log("点击的类型是:"+args.Category+"所在的组是:"+args.Group+"值为:"+args.Value);
    21     }
    22    
    23 }

       Hover can be handled the same way.

  • 相关阅读:
    阶梯式测试
    websocket协议
    性能指标
    环境变量
    解密断言+参数写入文本
    将参数进行URL编码
    日志级别
    对返回结果进行断言
    python小题目:循环/函数
    如果使用JSON提取器 和正则提取器
  • 原文地址:https://www.cnblogs.com/NBOWeb/p/11547447.html
Copyright © 2011-2022 走看看