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

Text label of chart, to explain some data information about graphic item like value, name and so on. 图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。 More...

Inheritance diagram for XCharts.SerieLabel:
Collaboration diagram for XCharts.SerieLabel:

Public Types

enum  Position {
  Position.Outside, Position.Inside, Position.Center, Position.Top,
  Position.Bottom, Position.Left, Position.Right, Position.Start,
  Position.Middle, Position.End
}
 The position of label. 标签的位置。 More...
 
enum  LineType { LineType.BrokenLine, LineType.Curves, LineType.HorizontalLine }
 标签视觉引导线类型 More...
 

Public Member Functions

void Reset ()
 
bool IsInside ()
 
Color GetColor (Color defaultColor)
 
TextAnchor GetAutoAlignment ()
 
- Public Member Functions inherited from XCharts.ChartComponent
virtual void SetVerticesDirty ()
 
virtual void ClearVerticesDirty ()
 
virtual void SetComponentDirty ()
 
virtual void ClearComponentDirty ()
 
virtual void ClearDirty ()
 
virtual void SetAllDirty ()
 

Properties

bool show [get, set]
 Whether the label is showed. 是否显示文本标签。 More...
 
Position position [get, set]
 The position of label. 标签的位置。 More...
 
string formatter [get, set]
 标签内容字符串模版格式器。支持用
换行。 模板变量有:

  • {a}:系列名。
  • {b}:数据名。
  • {c}:数据值。
  • {d}:百分比。
More...
 
Vector3 offset [get, set]
 offset to the host graphic element. 距离图形元素的偏移 More...
 
float margin [get, set]
 距离轴线的距离。 More...
 
float backgroundWidth [get, set]
 the width of background. If set as default value 0, it means than the background width auto set as the text width. 标签的背景宽度。一般不用指定,不指定时则自动是文字的宽度。 More...
 
float backgroundHeight [get, set]
 the height of background. If set as default value 0, it means than the background height auto set as the text height. 标签的背景高度。一般不用指定,不指定时则自动是文字的高度。 More...
 
float paddingLeftRight [get, set]
 the text padding of left and right. defaut:2. 左右边距。 More...
 
float paddingTopBottom [get, set]
 the text padding of top and bottom. defaut:2. 上下边距。 More...
 
bool line [get, set]
 Whether to show visual guide line.Will show when label position is set as 'outside'. 是否显示视觉引导线。在 label 位置 设置为'outside'的时候会显示视觉引导线。 More...
 
LineType lineType [get, set]
 the type of visual guide line. 视觉引导线类型。 More...
 
Color32 lineColor [get, set]
 the color of visual guild line. 视觉引导线颜色。默认和serie一致取自调色板。 More...
 
float lineWidth [get, set]
 the width of visual guild line. 视觉引导线的宽度。 More...
 
float lineGap [get, set]
 the gap of container and guild line. 视觉引导线和容器的间距。 More...
 
float lineLength1 [get, set]
 The length of the first segment of visual guide line. 视觉引导线第一段的长度。 More...
 
float lineLength2 [get, set]
 The length of the second segment of visual guide line. 视觉引导线第二段的长度。 More...
 
bool border [get, set]
 Whether to show border. 是否显示边框。 More...
 
float borderWidth [get, set]
 the width of border. 边框宽度。 More...
 
Color32 borderColor [get, set]
 the color of border. 边框颜色。 More...
 
string numericFormatter [get, set]
 Standard numeric format strings. 标准数字格式字符串。用于将数值格式化显示为字符串。 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings More...
 
bool autoOffset [get, set]
 是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 More...
 
TextStyle textStyle [get, set]
 the sytle of text. 文本样式。 More...
 
DelegateSerieLabelFormatter formatterFunction [get, set]
 
- 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

Text label of chart, to explain some data information about graphic item like value, name and so on. 图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。

Definition at line 18 of file SerieLabel.cs.

Member Enumeration Documentation

◆ LineType

标签视觉引导线类型

Enumerator
BrokenLine 

折线

Curves 

曲线

HorizontalLine 

水平线

Definition at line 81 of file SerieLabel.cs.

82  {
86  BrokenLine,
90  Curves,
94  HorizontalLine
95  }

◆ Position

The position of label. 标签的位置。

Enumerator
Outside 

Outside of sectors of pie chart, which relates to corresponding sector through visual guide line. 饼图扇区外侧,通过视觉引导线连到相应的扇区。

Inside 

Inside the sectors of pie chart. 饼图扇区内部。

Center 

In the center of pie chart. 在饼图中心位置。

Top 

top of symbol. 图形标志的顶部。

Bottom 

the bottom of symbol. 图形标志的底部。

Left 

the left of symbol. 图形标志的左边。

Right 

the right of symbol. 图形标志的右边。

Start 

the start of line. 线的起始点。

Middle 

the middle of line. 线的中点。

End 

the end of line. 线的结束点。

Definition at line 24 of file SerieLabel.cs.

25  {
30  Outside,
35  Inside,
40  Center,
45  Top,
50  Bottom,
55  Left,
60  Right,
65  Start,
70  Middle,
75  End
76  }

Property Documentation

◆ autoOffset

bool XCharts.SerieLabel.autoOffset
getset

是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。

Definition at line 341 of file SerieLabel.cs.

341  {
342  get { return m_AutoOffset; }
343  set { if (PropertyUtil.SetStruct(ref m_AutoOffset, value)) SetAllDirty(); }
344  }

◆ backgroundHeight

float XCharts.SerieLabel.backgroundHeight
getset

the height of background. If set as default value 0, it means than the background height auto set as the text height. 标签的背景高度。一般不用指定,不指定时则自动是文字的高度。

Definition at line 213 of file SerieLabel.cs.

213  {
214  get { return m_BackgroundHeight; }
215  set { if (PropertyUtil.SetStruct(ref m_BackgroundHeight, value)) SetComponentDirty(); }
216  }

◆ backgroundWidth

float XCharts.SerieLabel.backgroundWidth
getset

the width of background. If set as default value 0, it means than the background width auto set as the text width. 标签的背景宽度。一般不用指定,不指定时则自动是文字的宽度。

Definition at line 203 of file SerieLabel.cs.

203  {
204  get { return m_BackgroundWidth; }
205  set { if (PropertyUtil.SetStruct(ref m_BackgroundWidth, value)) SetComponentDirty(); }
206  }

◆ border

bool XCharts.SerieLabel.border
getset

Whether to show border. 是否显示边框。

Definition at line 303 of file SerieLabel.cs.

303  {
304  get { return m_Border; }
305  set { if (PropertyUtil.SetStruct(ref m_Border, value)) SetVerticesDirty(); }
306  }

◆ borderColor

Color32 XCharts.SerieLabel.borderColor
getset

the color of border. 边框颜色。

Definition at line 321 of file SerieLabel.cs.

321  {
322  get { return m_BorderColor; }
323  set { if (PropertyUtil.SetStruct(ref m_BorderColor, value)) SetVerticesDirty(); }
324  }

◆ borderWidth

float XCharts.SerieLabel.borderWidth
getset

the width of border. 边框宽度。

Definition at line 312 of file SerieLabel.cs.

312  {
313  get { return m_BorderWidth; }
314  set { if (PropertyUtil.SetStruct(ref m_BorderWidth, value)) SetVerticesDirty(); }
315  }

◆ formatter

string XCharts.SerieLabel.formatter
getset

标签内容字符串模版格式器。支持用
换行。 模板变量有:

  • {a}:系列名。
  • {b}:数据名。
  • {c}:数据值。
  • {d}:百分比。

示例:“{b}:{c}”

Definition at line 176 of file SerieLabel.cs.

176  {
177  get { return m_Formatter; }
178  set { if (PropertyUtil.SetClass(ref m_Formatter, value)) SetVerticesDirty(); }
179  }

◆ line

bool XCharts.SerieLabel.line
getset

Whether to show visual guide line.Will show when label position is set as 'outside'. 是否显示视觉引导线。在 label 位置 设置为'outside'的时候会显示视觉引导线。

Definition at line 240 of file SerieLabel.cs.

240  {
241  get { return m_Line; }
242  set { if (PropertyUtil.SetStruct(ref m_Line, value)) SetComponentDirty(); }
243  }

◆ lineColor

Color32 XCharts.SerieLabel.lineColor
getset

the color of visual guild line. 视觉引导线颜色。默认和serie一致取自调色板。

Definition at line 258 of file SerieLabel.cs.

258  {
259  get { return m_LineColor; }
260  set { if (PropertyUtil.SetStruct(ref m_LineColor, value)) SetVerticesDirty(); }
261  }

◆ lineGap

float XCharts.SerieLabel.lineGap
getset

the gap of container and guild line. 视觉引导线和容器的间距。

Definition at line 276 of file SerieLabel.cs.

276  {
277  get { return m_LineGap; }
278  set { if (PropertyUtil.SetStruct(ref m_LineGap, value)) SetVerticesDirty(); }
279  }

◆ lineLength1

float XCharts.SerieLabel.lineLength1
getset

The length of the first segment of visual guide line. 视觉引导线第一段的长度。

Definition at line 285 of file SerieLabel.cs.

285  {
286  get { return m_LineLength1; }
287  set { if (PropertyUtil.SetStruct(ref m_LineLength1, value)) SetVerticesDirty(); }
288  }

◆ lineLength2

float XCharts.SerieLabel.lineLength2
getset

The length of the second segment of visual guide line. 视觉引导线第二段的长度。

Definition at line 294 of file SerieLabel.cs.

294  {
295  get { return m_LineLength2; }
296  set { if (PropertyUtil.SetStruct(ref m_LineLength2, value)) SetVerticesDirty(); }
297  }

◆ lineType

LineType XCharts.SerieLabel.lineType
getset

the type of visual guide line. 视觉引导线类型。

Definition at line 249 of file SerieLabel.cs.

249  {
250  get { return m_LineType; }
251  set { if (PropertyUtil.SetStruct(ref m_LineType, value)) SetVerticesDirty(); }
252  }

◆ lineWidth

float XCharts.SerieLabel.lineWidth
getset

the width of visual guild line. 视觉引导线的宽度。

Definition at line 267 of file SerieLabel.cs.

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

◆ margin

float XCharts.SerieLabel.margin
getset

距离轴线的距离。

Definition at line 193 of file SerieLabel.cs.

193  {
194  get { return m_Margin; }
195  set { if (PropertyUtil.SetStruct(ref m_Margin, value)) SetVerticesDirty(); }
196  }

◆ numericFormatter

string XCharts.SerieLabel.numericFormatter
getset

Standard numeric format strings. 标准数字格式字符串。用于将数值格式化显示为字符串。 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings

Definition at line 333 of file SerieLabel.cs.

333  {
334  get { return m_NumericFormatter; }
335  set { if (PropertyUtil.SetClass(ref m_NumericFormatter, value)) SetComponentDirty(); }
336  }

◆ offset

Vector3 XCharts.SerieLabel.offset
getset

offset to the host graphic element. 距离图形元素的偏移

Definition at line 185 of file SerieLabel.cs.

185  {
186  get { return m_Offset; }
187  set { if (PropertyUtil.SetStruct(ref m_Offset, value)) SetVerticesDirty(); }
188  }

◆ paddingLeftRight

float XCharts.SerieLabel.paddingLeftRight
getset

the text padding of left and right. defaut:2. 左右边距。

Definition at line 222 of file SerieLabel.cs.

222  {
223  get { return m_PaddingLeftRight; }
224  set { if (PropertyUtil.SetStruct(ref m_PaddingLeftRight, value)) SetComponentDirty(); }
225  }

◆ paddingTopBottom

float XCharts.SerieLabel.paddingTopBottom
getset

the text padding of top and bottom. defaut:2. 上下边距。

Definition at line 231 of file SerieLabel.cs.

231  {
232  get { return m_PaddingTopBottom; }
233  set { if (PropertyUtil.SetStruct(ref m_PaddingTopBottom, value)) SetComponentDirty(); }
234  }

◆ position

Position XCharts.SerieLabel.position
getset

The position of label. 标签的位置。

Definition at line 158 of file SerieLabel.cs.

158  {
159  get { return m_Position; }
160  set { if (PropertyUtil.SetStruct(ref m_Position, value)) SetVerticesDirty(); }
161  }

◆ show

bool XCharts.SerieLabel.show
getset

Whether the label is showed. 是否显示文本标签。

Definition at line 149 of file SerieLabel.cs.

149  {
150  get { return m_Show; }
151  set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetAllDirty(); }
152  }

◆ textStyle

TextStyle XCharts.SerieLabel.textStyle
getset

the sytle of text. 文本样式。

Definition at line 351 of file SerieLabel.cs.

351  {
352  get { return m_TextStyle; }
353  set { if (PropertyUtil.SetClass(ref m_TextStyle, value)) SetAllDirty(); }
354  }

The documentation for this class was generated from the following file: