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

图形样式。 More...

Inheritance diagram for XCharts.ItemStyle:
Collaboration diagram for XCharts.ItemStyle:

Public Types

enum  Type { Type.Solid, Type.Dashed, Type.Dotted }
 线的类型。 More...
 

Public Member Functions

void Reset ()
 
bool NeedShowBorder ()
 是否需要显示边框。 More...
 
Color32 GetColor ()
 
Color32 GetColor0 ()
 
Color32 GetColor (Color32 defaultColor)
 
Color32 GetColor0 (Color32 defaultColor)
 
Color32 GetBorderColor (Color32 defaultColor)
 
Color32 GetBorderColor0 (Color32 defaultColor)
 
bool IsNeedGradient ()
 
Color32 GetGradientColor (float value, Color32 defaultColor)
 
- 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]
 是否启用。 More...
 
Color32 color [get, set]
 数据项颜色。 More...
 
Color32 color0 [get, set]
 数据项颜色。 More...
 
Color32 toColor [get, set]
 Gradient color1. 渐变色的颜色1。 More...
 
Color32 toColor2 [get, set]
 Gradient color2.Only valid in line diagrams. 渐变色的颜色2。只在折线图中有效。 More...
 
Color32 backgroundColor [get, set]
 数据项背景颜色。 More...
 
Color32 centerColor [get, set]
 中心区域颜色。 More...
 
float centerGap [get, set]
 中心区域间隙。 More...
 
float backgroundWidth [get, set]
 数据项背景宽度。 More...
 
Type borderType [get, set]
 边框的类型。 More...
 
Color32 borderColor [get, set]
 边框的颜色。 More...
 
Color32 borderColor0 [get, set]
 边框的颜色。 More...
 
Color32 borderToColor [get, set]
 边框的渐变色。 More...
 
float borderWidth [get, set]
 边框宽。 More...
 
float opacity [get, set]
 透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 More...
 
string tooltipFormatter [get, set]
 提示框单项的字符串模版格式器。具体配置参考Tooltipformatter 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...
 
float[] cornerRadius [get, set]
 The radius of rounded corner. Its unit is px. Use array to respectively specify the 4 corner radiuses((clockwise upper left, upper right, bottom right and bottom left)). 圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。 More...
 
float? runtimeBorderWidth [get]
 实际边框宽。边框不显示时为0。 More...
 
- 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

图形样式。

Definition at line 18 of file ItemStyle.cs.

Member Enumeration Documentation

◆ Type

线的类型。

Enumerator
Solid 

实线

Dashed 

虚线

Dotted 

点线

Definition at line 23 of file ItemStyle.cs.

24  {
28  Solid,
32  Dashed,
36  Dotted
37  }

Member Function Documentation

◆ NeedShowBorder()

bool XCharts.ItemStyle.NeedShowBorder ( )
inline

是否需要显示边框。

Definition at line 246 of file ItemStyle.cs.

247  {
248  return borderWidth != 0 && !ChartHelper.IsClearColor(borderColor);
249  }

Property Documentation

◆ backgroundColor

Color32 XCharts.ItemStyle.backgroundColor
getset

数据项背景颜色。

Definition at line 133 of file ItemStyle.cs.

133  {
134  get { return m_BackgroundColor; }
135  set { if (PropertyUtil.SetColor(ref m_BackgroundColor, value)) SetVerticesDirty(); }
136  }

◆ backgroundWidth

float XCharts.ItemStyle.backgroundWidth
getset

数据项背景宽度。

Definition at line 157 of file ItemStyle.cs.

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

◆ borderColor

Color32 XCharts.ItemStyle.borderColor
getset

边框的颜色。

Definition at line 173 of file ItemStyle.cs.

173  {
174  get { return m_BorderColor; }
175  set { if (PropertyUtil.SetColor(ref m_BorderColor, value)) SetVerticesDirty(); }
176  }

◆ borderColor0

Color32 XCharts.ItemStyle.borderColor0
getset

边框的颜色。

Definition at line 181 of file ItemStyle.cs.

181  {
182  get { return m_BorderColor0; }
183  set { if (PropertyUtil.SetColor(ref m_BorderColor0, value)) SetVerticesDirty(); }
184  }

◆ borderToColor

Color32 XCharts.ItemStyle.borderToColor
getset

边框的渐变色。

Definition at line 189 of file ItemStyle.cs.

189  {
190  get { return m_BorderToColor; }
191  set { if (PropertyUtil.SetColor(ref m_BorderToColor, value)) SetVerticesDirty(); }
192  }

◆ borderType

Type XCharts.ItemStyle.borderType
getset

边框的类型。

Definition at line 165 of file ItemStyle.cs.

165  {
166  get { return m_BorderType; }
167  set { if (PropertyUtil.SetStruct(ref m_BorderType, value)) SetVerticesDirty(); }
168  }

◆ borderWidth

float XCharts.ItemStyle.borderWidth
getset

边框宽。

Definition at line 197 of file ItemStyle.cs.

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

◆ centerColor

Color32 XCharts.ItemStyle.centerColor
getset

中心区域颜色。

Definition at line 141 of file ItemStyle.cs.

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

◆ centerGap

float XCharts.ItemStyle.centerGap
getset

中心区域间隙。

Definition at line 149 of file ItemStyle.cs.

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

◆ color

Color32 XCharts.ItemStyle.color
getset

数据项颜色。

Definition at line 99 of file ItemStyle.cs.

99  {
100  get { return m_Color; }
101  set { if (PropertyUtil.SetColor(ref m_Color, value)) SetVerticesDirty(); }
102  }

◆ color0

Color32 XCharts.ItemStyle.color0
getset

数据项颜色。

Definition at line 107 of file ItemStyle.cs.

107  {
108  get { return m_Color0; }
109  set { if (PropertyUtil.SetColor(ref m_Color0, value)) SetVerticesDirty(); }
110  }

◆ cornerRadius

float [] XCharts.ItemStyle.cornerRadius
getset

The radius of rounded corner. Its unit is px. Use array to respectively specify the 4 corner radiuses((clockwise upper left, upper right, bottom right and bottom left)). 圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。

Definition at line 234 of file ItemStyle.cs.

234  {
235  get { return m_CornerRadius; }
236  set { if (PropertyUtil.SetClass(ref m_CornerRadius, value, true)) SetVerticesDirty(); }
237  }

◆ numericFormatter

string XCharts.ItemStyle.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 225 of file ItemStyle.cs.

225  {
226  get { return m_NumericFormatter; }
227  set { if (PropertyUtil.SetClass(ref m_NumericFormatter, value)) SetComponentDirty(); }
228  }

◆ opacity

float XCharts.ItemStyle.opacity
getset

透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。

Definition at line 205 of file ItemStyle.cs.

205  {
206  get { return m_Opacity; }
207  set { if (PropertyUtil.SetStruct(ref m_Opacity, value)) SetVerticesDirty(); }
208  }

◆ runtimeBorderWidth

float? XCharts.ItemStyle.runtimeBorderWidth
get

实际边框宽。边框不显示时为0。

Definition at line 241 of file ItemStyle.cs.

241 { get { return NeedShowBorder() ? borderWidth : 0; } }

◆ show

bool XCharts.ItemStyle.show
getset

是否启用。

Definition at line 91 of file ItemStyle.cs.

91  {
92  get { return m_Show; }
93  set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); }
94  }

◆ toColor

Color32 XCharts.ItemStyle.toColor
getset

Gradient color1. 渐变色的颜色1。

Definition at line 116 of file ItemStyle.cs.

116  {
117  get { return m_ToColor; }
118  set { if (PropertyUtil.SetColor(ref m_ToColor, value)) SetVerticesDirty(); }
119  }

◆ toColor2

Color32 XCharts.ItemStyle.toColor2
getset

Gradient color2.Only valid in line diagrams. 渐变色的颜色2。只在折线图中有效。

Definition at line 125 of file ItemStyle.cs.

125  {
126  get { return m_ToColor2; }
127  set { if (PropertyUtil.SetColor(ref m_ToColor2, value)) SetVerticesDirty(); }
128  }

◆ tooltipFormatter

string XCharts.ItemStyle.tooltipFormatter
getset

提示框单项的字符串模版格式器。具体配置参考Tooltipformatter

Definition at line 213 of file ItemStyle.cs.

213  {
214  get { return m_TooltipFormatter; }
215  set { if (PropertyUtil.SetClass(ref m_TooltipFormatter, value)) SetVerticesDirty(); }
216  }

The documentation for this class was generated from the following file:
XCharts.ItemStyle.borderColor
Color32 borderColor
边框的颜色。
Definition: ItemStyle.cs:173
XCharts.ItemStyle.NeedShowBorder
bool NeedShowBorder()
是否需要显示边框。
Definition: ItemStyle.cs:246
XCharts.ItemStyle.borderWidth
float borderWidth
边框宽。
Definition: ItemStyle.cs:197