AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
XCharts.VisualMap Class Reference

VisualMap component. Mapping data to visual elements such as colors. 视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。 More...

Inheritance diagram for XCharts.VisualMap:
Collaboration diagram for XCharts.VisualMap:

Classes

class  Pieces
 

Public Types

enum  Type { Type.Continuous, Type.Piecewise }
 类型。分为连续型和分段型。 More...
 
enum  SelectedMode { SelectedMode.Multiple, SelectedMode.Single }
 选择模式 More...
 

Public Member Functions

override void ClearVerticesDirty ()
 
override void ClearComponentDirty ()
 
Color32 GetColor (double value)
 
int GetIndex (double value)
 
bool IsPiecewise ()
 
bool IsInSelectedValue (double value)
 
double GetValue (Vector3 pos, Rect chartRect)
 
bool IsInRect (Vector3 local, Rect chartRect, float triangleLen=20)
 
bool IsInRangeRect (Vector3 local, Rect chartRect)
 
bool IsInRangeMinRect (Vector3 local, Rect chartRect, float triangleLen)
 
bool IsInRangeMaxRect (Vector3 local, Rect chartRect, float triangleLen)
 
- Public Member Functions inherited from XCharts.ChartComponent
virtual void SetVerticesDirty ()
 
virtual void SetComponentDirty ()
 
virtual void ClearDirty ()
 
virtual void SetAllDirty ()
 

Properties

bool enable [get, set]
 Whether enable visualMap component. More...
 
bool show [get, set]
 Whether to display components. If set to false, it will not show up, but the data mapping function still exists. More...
 
Type type [get, set]
 the type of visualmap component. 组件类型。 More...
 
SelectedMode selectedMode [get, set]
 the selected mode for Piecewise visualMap. 选择模式。 More...
 
double min [get, set]
 The minimum allowed. 'min' must be user specified. [visualmap.min, visualmap.max] forms the "domain" of the visualMap. More...
 
double? max [get, set]
 The maximum allowed. 'max' must be user specified. [visualmap.min, visualmap.max] forms the "domain" of the visualMap. More...
 
double[] range [get]
 Specifies the position of the numeric value corresponding to the handle. Range should be within the range of [min,max]. More...
 
string[] text [get]
 Text on both ends. 两端的文本,如 ['High', 'Low']。 More...
 
float[] textGap [get]
 The distance between the two text bodies. 两端文字主体之间的距离,单位为px。 More...
 
int splitNumber [get, set]
 For continuous data, it is automatically evenly divided into several segments and automatically matches the size of inRange color list when the default is 0. More...
 
bool calculable [get, set]
 Whether the handle used for dragging is displayed (the handle can be dragged to adjust the selected range). More...
 
bool realtime [get, set]
 Whether to update in real time while dragging. More...
 
float itemWidth [get, set]
 The width of the figure, that is, the width of the color bar. More...
 
float itemHeight [get, set]
 The height of the figure, that is, the height of the color bar. More...
 
float itemGap [get, set]
 每个图元之间的间隔距离。 More...
 
float borderWidth [get, set]
 Border line width. More...
 
int dimension [get, set]
 Specifies "which dimension" of the data to map to the visual element. "Data" is series.data. Starting at 1, the default is 0 to take the last dimension in data. More...
 
bool hoverLink [get, set]
 When the hoverLink function is turned on, when the mouse hovers over the visualMap component, the corresponding value of the mouse position is highlighted in the corresponding graphic element in the diagram. Conversely, when the mouse hovers over a graphic element in a diagram, the corresponding value of the visualMap component is triangulated in the corresponding position. More...
 
bool autoMinMax [get, set]
 Automatically set min, Max value 自动设置min,max的值 More...
 
Orient orient [get, set]
 Specify whether the layout of component is horizontal or vertical. More...
 
Location location [get, set]
 The location of component. 组件显示的位置。 More...
 
List< Color32 > inRange [get, set]
 Defines the visual color in the selected range. 定义 在选中范围中 的视觉颜色。 More...
 
List< Color32 > outOfRange [get, set]
 Defines a visual color outside of the selected range. 定义 在选中范围外 的视觉颜色。 More...
 
List< Piecespieces [get, set]
 分段式每一段的相关配置。 More...
 
override bool vertsDirty [get]
 
int runtimeSelectedIndex [get, set]
 鼠标悬停选中的index More...
 
double runtimeSelectedValue [get, set]
 
Vector2 runtimePointerPos [get, set]
 the current pointer position. 当前鼠标位置。 More...
 
bool runtimeIsVertical [get]
 
double rangeMin [get, set]
 
double rangeMax [get, set]
 
int runtimeSplitNumber [get]
 
float runtimeRangeMinHeight [get]
 
float runtimeRangeMaxHeight [get]
 
bool runtimeMinDrag [get, set]
 
bool runtimeMaxDrag [get, set]
 
List< Color32 > runtimeInRange [get]
 
- Properties inherited from XCharts.ChartComponent
virtual bool vertsDirty [get]
 图表重绘标记。 More...
 
virtual bool componentDirty [get]
 组件重新初始化标记。 More...
 
bool anyDirty [get]
 需要重绘图表或重新初始化组件。 More...
 
Painter painter [get, set]
 
Action refreshComponent [get, set]
 
GameObject gameObject [get, set]
 

Additional Inherited Members

- Protected Attributes inherited from XCharts.ChartComponent
bool m_VertsDirty
 
bool m_ComponentDirty
 
Painter m_Painter
 

Detailed Description

VisualMap component. Mapping data to visual elements such as colors. 视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。

Definition at line 21 of file VisualMap.cs.

Member Enumeration Documentation

◆ SelectedMode

选择模式

Enumerator
Multiple 

多选。

Single 

单选。

Definition at line 41 of file VisualMap.cs.

42  {
46  Multiple,
50  Single
51  }

◆ Type

类型。分为连续型和分段型。

Enumerator
Continuous 

连续型。

Piecewise 

分段型。

Definition at line 26 of file VisualMap.cs.

27  {
31  Continuous,
35  Piecewise
36  }

Property Documentation

◆ autoMinMax

bool XCharts.VisualMap.autoMinMax
getset

Automatically set min, Max value 自动设置min,max的值

Definition at line 291 of file VisualMap.cs.

291  {
292  get { return m_AutoMinMax; }
293  set { if (PropertyUtil.SetStruct(ref m_AutoMinMax, value)) SetVerticesDirty(); }
294  }

◆ borderWidth

float XCharts.VisualMap.borderWidth
getset

Border line width.

边框线宽,单位px。

Definition at line 256 of file VisualMap.cs.

256  {
257  get { return m_BorderWidth; }
258  set { if (PropertyUtil.SetStruct(ref m_BorderWidth, value)) SetVerticesDirty(); }
259  }

◆ calculable

bool XCharts.VisualMap.calculable
getset

Whether the handle used for dragging is displayed (the handle can be dragged to adjust the selected range).

是否显示拖拽用的手柄(手柄能拖拽调整选中范围)。

Definition at line 208 of file VisualMap.cs.

208  {
209  get { return m_Calculable; }
210  set { if (PropertyUtil.SetStruct(ref m_Calculable, value)) SetVerticesDirty(); }
211  }

◆ dimension

int XCharts.VisualMap.dimension
getset

Specifies "which dimension" of the data to map to the visual element. "Data" is series.data. Starting at 1, the default is 0 to take the last dimension in data.

指定用数据的『哪个维度』,映射到视觉元素上。『数据』即 series.data。从1开始,默认为0取 data 中最后一个维度。

Definition at line 267 of file VisualMap.cs.

267  {
268  get { return m_Dimension; }
269  set { if (PropertyUtil.SetStruct(ref m_Dimension, value)) SetVerticesDirty(); }
270  }

◆ enable

bool XCharts.VisualMap.enable
getset

Whether enable visualMap component.

是否开启组件功能。

[default: false]

Definition at line 120 of file VisualMap.cs.

120  {
121  get { return m_Enable; }
122  set { if (PropertyUtil.SetStruct(ref m_Enable, value)) SetVerticesDirty(); }
123  }

◆ hoverLink

bool XCharts.VisualMap.hoverLink
getset

When the hoverLink function is turned on, when the mouse hovers over the visualMap component, the corresponding value of the mouse position is highlighted in the corresponding graphic element in the diagram. Conversely, when the mouse hovers over a graphic element in a diagram, the corresponding value of the visualMap component is triangulated in the corresponding position.

打开 hoverLink 功能时,鼠标悬浮到 visualMap 组件上时,鼠标位置对应的数值 在 图表中对应的图形元素,会高亮。 反之,鼠标悬浮到图表中的图形元素上时,在 visualMap 组件的相应位置会有三角提示其所对应的数值。

Definition at line 282 of file VisualMap.cs.

282  {
283  get { return m_HoverLink; }
284  set { if (PropertyUtil.SetStruct(ref m_HoverLink, value)) SetVerticesDirty(); }
285  }

◆ inRange

List<Color32> XCharts.VisualMap.inRange
getset

Defines the visual color in the selected range. 定义 在选中范围中 的视觉颜色。

Definition at line 319 of file VisualMap.cs.

319  {
320  get { return m_InRange; }
321  set { if (value != null) { m_InRange = value; SetVerticesDirty(); } }
322  }

◆ itemGap

float XCharts.VisualMap.itemGap
getset

每个图元之间的间隔距离。

Definition at line 246 of file VisualMap.cs.

246  {
247  get { return m_ItemGap; }
248  set { if (PropertyUtil.SetStruct(ref m_ItemGap, value)) SetVerticesDirty(); }
249  }

◆ itemHeight

float XCharts.VisualMap.itemHeight
getset

The height of the figure, that is, the height of the color bar.

图形的高度,即颜色条的高度。

Definition at line 238 of file VisualMap.cs.

238  {
239  get { return m_ItemHeight; }
240  set { if (PropertyUtil.SetStruct(ref m_ItemHeight, value)) SetVerticesDirty(); }
241  }

◆ itemWidth

float XCharts.VisualMap.itemWidth
getset

The width of the figure, that is, the width of the color bar.

图形的宽度,即颜色条的宽度。

Definition at line 228 of file VisualMap.cs.

228  {
229  get { return m_ItemWidth; }
230  set { if (PropertyUtil.SetStruct(ref m_ItemWidth, value)) SetVerticesDirty(); }
231  }

◆ location

Location XCharts.VisualMap.location
getset

The location of component. 组件显示的位置。

Definition at line 310 of file VisualMap.cs.

310  {
311  get { return m_Location; }
312  set { if (PropertyUtil.SetClass(ref m_Location, value)) SetVerticesDirty(); }
313  }

◆ max

double? XCharts.VisualMap.max
getset

The maximum allowed. 'max' must be user specified. [visualmap.min, visualmap.max] forms the "domain" of the visualMap.

允许的最大值。autoMinMaxfalse时必须指定。[visualMap.min, visualMax.max] 形成了视觉映射的『定义域』。

Definition at line 170 of file VisualMap.cs.

170  {
171  get { return m_Max; }
172  set { m_Max = (value < min ? min + 1 : value); SetVerticesDirty(); }
173  }

◆ min

double XCharts.VisualMap.min
getset

The minimum allowed. 'min' must be user specified. [visualmap.min, visualmap.max] forms the "domain" of the visualMap.

允许的最小值。autoMinMaxfalse时必须指定。[visualMap.min, visualMap.max] 形成了视觉映射的『定义域』。

Definition at line 160 of file VisualMap.cs.

160  {
161  get { return m_Min; }
162  set { if (PropertyUtil.SetStruct(ref m_Min, value)) SetVerticesDirty(); }
163  }

◆ orient

Orient XCharts.VisualMap.orient
getset

Specify whether the layout of component is horizontal or vertical.

布局方式是横还是竖。

Definition at line 301 of file VisualMap.cs.

301  {
302  get { return m_Orient; }
303  set { if (PropertyUtil.SetStruct(ref m_Orient, value)) SetVerticesDirty(); }
304  }

◆ outOfRange

List<Color32> XCharts.VisualMap.outOfRange
getset

Defines a visual color outside of the selected range. 定义 在选中范围外 的视觉颜色。

Definition at line 328 of file VisualMap.cs.

328  {
329  get { return m_OutOfRange; }
330  set { if (value != null) { m_OutOfRange = value; SetVerticesDirty(); } }
331  }

◆ pieces

List<Pieces> XCharts.VisualMap.pieces
getset

分段式每一段的相关配置。

Definition at line 336 of file VisualMap.cs.

336  {
337  get { return m_Pieces; }
338  set { if (value != null) { m_Pieces = value; SetVerticesDirty(); } }
339  }

◆ range

double [] XCharts.VisualMap.range
get

Specifies the position of the numeric value corresponding to the handle. Range should be within the range of [min,max].

指定手柄对应数值的位置。range 应在[min,max]范围内。

Definition at line 179 of file VisualMap.cs.

179 { get { return m_Range; } }

◆ realtime

bool XCharts.VisualMap.realtime
getset

Whether to update in real time while dragging.

拖拽时,是否实时更新。

Definition at line 218 of file VisualMap.cs.

218  {
219  get { return m_Realtime; }
220  set { if (PropertyUtil.SetStruct(ref m_Realtime, value)) SetVerticesDirty(); }
221  }

◆ runtimePointerPos

Vector2 XCharts.VisualMap.runtimePointerPos
getset

the current pointer position. 当前鼠标位置。

Definition at line 364 of file VisualMap.cs.

364 { get; set; }

◆ runtimeSelectedIndex

int XCharts.VisualMap.runtimeSelectedIndex
getset

鼠标悬停选中的index

Definition at line 358 of file VisualMap.cs.

358 { get; set; }

◆ selectedMode

SelectedMode XCharts.VisualMap.selectedMode
getset

the selected mode for Piecewise visualMap. 选择模式。

Definition at line 150 of file VisualMap.cs.

150  {
151  get { return m_SelectedMode; }
152  set { if (PropertyUtil.SetStruct(ref m_SelectedMode, value)) SetVerticesDirty(); }
153  }

◆ show

bool XCharts.VisualMap.show
getset

Whether to display components. If set to false, it will not show up, but the data mapping function still exists.

是否显示组件。如果设置为 false,不会显示,但是数据映射的功能还存在。

[default: true]

Definition at line 132 of file VisualMap.cs.

132  {
133  get { return m_Show; }
134  set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); }
135  }

◆ splitNumber

int XCharts.VisualMap.splitNumber
getset

For continuous data, it is automatically evenly divided into several segments and automatically matches the size of inRange color list when the default is 0.

对于连续型数据,自动平均切分成几段,默认为0时自动匹配inRange颜色列表大小。

Definition at line 198 of file VisualMap.cs.

198  {
199  get { return m_SplitNumber; }
200  set { if (PropertyUtil.SetStruct(ref m_SplitNumber, value)) SetVerticesDirty(); }
201  }

◆ text

string [] XCharts.VisualMap.text
get

Text on both ends. 两端的文本,如 ['High', 'Low']。

Definition at line 184 of file VisualMap.cs.

184 { get { return m_Text; } }

◆ textGap

float [] XCharts.VisualMap.textGap
get

The distance between the two text bodies. 两端文字主体之间的距离,单位为px。

Definition at line 189 of file VisualMap.cs.

189 { get { return m_TextGap; } }

◆ type

Type XCharts.VisualMap.type
getset

the type of visualmap component. 组件类型。

Definition at line 141 of file VisualMap.cs.

141  {
142  get { return m_Type; }
143  set { if (PropertyUtil.SetStruct(ref m_Type, value)) SetVerticesDirty(); }
144  }

The documentation for this class was generated from the following file:
XCharts.RadarType.Single
@ Single
单圈雷达图。此时一个雷达只能绘制一个圈,多个serieData组成一个圈,数据取自data[1]。
XCharts.RadarType.Multiple
@ Multiple
多圈雷达图。此时可一个雷达里绘制多个圈,一个serieData就可组成一个圈(多维数据)。
XCharts.VisualMap.min
double min
The minimum allowed. 'min' must be user specified. [visualmap.min, visualmap.max] forms the "domain" ...
Definition: VisualMap.cs:160