 |
AirControl
1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
|
13 [DisallowMultipleComponent]
21 chart = gameObject.GetComponent<
PieChart>();
24 chart = gameObject.AddComponent<
PieChart>();
28 if (serie ==
null)
return;
35 if (Input.GetKeyDown(KeyCode.Space))
47 if (serie ==
null)
return;
48 for (
int i = 0; i < serie.dataCount; i++)
50 var value = Random.Range(10, 100);
60 if (serie ==
null)
return;
61 for (
int i = 0; i < serie.dataCount; i++)
67 void ClearAndAddData()
71 if (serie ==
null)
return;
74 for (
int i = 0; i < count; i++)
76 chart.
AddData(0, Random.Range(0, 100),
"pie" + i);
virtual SerieData AddData(string serieName, double data, string dataName=null)
Add a data to serie. If serieName doesn't exist in legend,will be add to legend. 添加一个数据到指定的系列中。
virtual bool UpdateDataName(string serieName, int dataIndex, string dataName)
Update serie data name. 更新指定系列中的指定索引数据名称。
SerieLabel label
Text label of graphic element,to explain some data information about graphic item like value,...
int dataCount
the count of data list. 数据项个数。
virtual bool UpdateData(string serieName, int dataIndex, double value)
Update serie data by serie name. 更新指定系列中的指定索引数据。
Serie GetSerie(string name)
获得指定系列名的第一个系列
bool show
Whether the label is showed. 是否显示文本标签。
Series series
The series setting of chart. 系列列表
Text label of chart, to explain some data information about graphic item like value,...
Position
The position of label. 标签的位置。