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.

  • 相关阅读:
    pyqy5——控件2
    pyqt5——自定义控件
    pyqt5——绘图
    pyqt5——菜单和工具栏
    pyqt5——拖拽
    nodejs运行的时候报错:Error: write EIO以及乱码解决方式
    windows设置控制台编码格式为UTF-8
    eclipse删除的文件如何恢复。
    crobtab不执行定时任务的原因及解决办法
    springmvc找不到对应的requestmapping
  • 原文地址:https://www.cnblogs.com/NBOWeb/p/11547447.html
Copyright © 2011-2022 走看看