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

Tooltip component. 提示框组件。 More...

Inheritance diagram for XCharts.Tooltip:
Collaboration diagram for XCharts.Tooltip:

Public Types

enum  Type { Type.Line, Type.Shadow, Type.None, Type.Corss }
 Indicator type. 指示器类型。 More...
 

Public Member Functions

override void ClearComponentDirty ()
 
void SetObj (GameObject obj)
 绑定提示框gameObject More...
 
void SetContentObj (GameObject content)
 绑定提示框的文本框gameObject More...
 
void UpdateToTop ()
 Keep Tooltiop displayed at the top. 保持Tooltiop显示在最顶上 More...
 
void SetContentBackgroundColor (Color color)
 设置提示框文本背景色 More...
 
void SetBackground (Sprite sprite)
 设置提示框文本背景图片 More...
 
void SetContentTextColor (Color color)
 设置提示框文本字体颜色 More...
 
void UpdateContentText (string txt)
 设置提示框文本内容 More...
 
bool IsActive ()
 提示框是否显示 More...
 
void SetActive (bool flag)
 设置提示框是否显示 More...
 
void UpdateContentPos (Vector2 pos)
 更新文本框位置 More...
 
Vector3 GetContentPos ()
 获得当前提示框的位置 More...
 
bool IsDataIndexChanged ()
 Whether the data item indicated by tooltip has changed. 提示框所指示的数据项是否发生变化。 More...
 
bool IsSelected ()
 当前提示框是否选中数据项 More...
 
bool IsSelected (int index)
 指定索引的数据项是否被提示框选中 More...
 
void ClearSerieDataIndex ()
 
void AddSerieDataIndex (int serieIndex, int dataIndex)
 
bool isAnySerieDataIndex ()
 
- Public Member Functions inherited from XCharts.ChartComponent
virtual void SetVerticesDirty ()
 
virtual void ClearVerticesDirty ()
 
virtual void SetComponentDirty ()
 
virtual void ClearDirty ()
 
virtual void SetAllDirty ()
 

Public Attributes

Dictionary< int, List< int > > runtimeSerieIndex = new Dictionary<int, List<int>>()
 当前提示框所指示的Serie索引(目前只对散点图有效)。 More...
 

Properties

bool show [get, set]
 Whether to show the tooltip component. 是否显示提示框组件。 More...
 
Type type [get, set]
 Indicator type. 提示框指示器类型。 More...
 
string formatter [get, set]
 A string template formatter for the total content of the prompt box. Support for wrapping lines with
. When formatter is not null, use formatter first, otherwise use itemFormatter. Template variables are {.}, {a}, {b}, {c}, {d}. {.} is the dot of the corresponding color of a Serie that is currently indicated or whose index is 0. {a} is the series name of the serie that is currently indicated or whose index is 0. {b} is the name of the data item serieData that is currently indicated or whose index is 0, or a category value (such as the X-axis of a line chart). {c} is the value of a Y-dimension (dimesion is 1) from a Serie that is currently indicated or whose index is 0. {d} is the percentage value of Y-dimensions (dimesion is 1) from serie that is currently indicated or whose index is 0, with no % sign. {e} is the name of the data item serieData that is currently indicated or whose index is 0. {.1} represents a dot from serie corresponding color that specifies index as 1. 1 in {a1}, {b1}, {c1} represents a serie that specifies an index of 1. {c1:2} represents the third data from serie's current indication data item indexed to 1 (a data item has multiple data, index 2 represents the third data). {c1:2-2} represents the third data item from serie's third data item indexed to 1 (i.e., which data item must be specified to specify). {d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified). {d:0.##} indicates that a formatted string with a value specified separately is 0.## (used for percentage, reserved 2 valid digits while avoiding the situation similar to "100.00%" when using f2 ). Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}" 提示框总内容的字符串模版格式器。支持用
换行。当formatter不为空时,优先使用formatter,否则使用itemFormatter。 模板变量有{.}、{a}、{b}、{c}、{d}。 {.}为当前所指示或index为0的serie的对应颜色的圆点。 {a}为当前所指示或index为0的serie的系列名name。 {b}为当前所指示或index为0的serie的数据项serieData的name,或者类目值(如折线图的X轴)。 {c}为当前所指示或index为0的serie的y维(dimesion为1)的数值。 {d}为当前所指示或index为0的serie的y维(dimesion为1)百分比值,注意不带号。 {e}为当前所指示或index为0的serie的数据项serieData的name。 {.1}表示指定index为1的serie对应颜色的圆点。 {a1}、{b1}、{c1}中的1表示指定index为1的serie。 {c1:2}表示索引为1的serie的当前指示数据项的第3个数据(一个数据项有多个数据,index为2表示第3个数据)。 {c1:2-2}表示索引为1的serie的第3个数据项的第3个数据(也就是要指定第几个数据项时必须要指定第几个数据)。 {d1:2:f2}表示单独指定了数值的格式化字符串为f2(不指定时用numericFormatter)。 {d:0.##} 表示单独指定了数值的格式化字符串为 0.## (用于百分比,保留2位有效数同时又能避免使用 f2 而出现的类似于"100.00%"的情况 )。 示例:"{a}:{c}"、"{a1}:{c1:f1}"、"{a1}:{c1:0:f1}"、"{a1}:{c1:1-1:f1}" More...
 
string titleFormatter [get, set]
 The string template formatter for the tooltip title content. Support for wrapping lines with
. This is only valid if the itemFormatter is in effect. The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. 提示框标题内容的字符串模版格式器。支持用
换行。仅当itemFormatter生效时才有效。可以单独设置占位符{i}表示忽略不显示title。 More...
 
string itemFormatter [get, set]
 a string template formatter for a single Serie or data item content. Support for wrapping lines with
. When formatter is not null, use formatter first, otherwise use itemFormatter. 提示框单个serie或数据项内容的字符串模版格式器。支持用
换行。当formatter不为空时,优先使用formatter,否则使用itemFormatter。 More...
 
float fixedWidth [get, set]
 Fixed width. Higher priority than minWidth. 固定宽度。比 minWidth 优先。 More...
 
float fixedHeight [get, set]
 Fixed height. Higher priority than minHeight. 固定高度。比 minHeight 优先。 More...
 
float minWidth [get, set]
 Minimum width. If fixedWidth has a value, get fixedWidth first. 最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。 More...
 
float minHeight [get, set]
 Minimum height. If fixedHeight has a value, take priority over fixedHeight. 最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。 More...
 
string numericFormatter [get, set]
 Standard numeric format string. Used to format numeric values to display as strings. Using 'Axx' form: 'A' is the single character of the format specifier, supporting 'C' currency, 'D' decimal, 'E' exponent, 'F' number of vertices, 'G' regular, 'N' digits, 'P' percentage, 'R' round tripping, 'X' hex etc. 'XX' is the precision specification, from '0' - '99'. 标准数字格式字符串。用于将数值格式化显示为字符串。 使用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 paddingLeftRight [get, set]
 the text padding of left and right. defaut:5. 左右边距。 More...
 
float paddingTopBottom [get, set]
 the text padding of top and bottom. defaut:5. 上下边距。 More...
 
bool ignoreDataShow [get, set]
 Whether to show ignored data on tooltip. 是否显示忽略数据在tooltip上。 More...
 
string ignoreDataDefaultContent [get, set]
 The default display character information for ignored data. 被忽略数据的默认显示字符信息。 More...
 
Sprite backgroundImage [get, set]
 The image of icon. 图标的图片。 More...
 
bool alwayShow [get, set]
 Whether to trigger after always display. 是否触发后一直显示。 More...
 
Vector2 offset [get, set]
 The position offset of tooltip relative to the mouse position. 提示框相对于鼠标位置的偏移。 More...
 
TextStyle textStyle [get, set]
 the text style of content. 提示框内容文本样式。 More...
 
LineStyle lineStyle [get, set]
 the line style of indicator line. 指示线样式。 More...
 
override bool componentDirty [get]
 组件是否需要刷新 More...
 
List< int > runtimeDataIndex [get, set]
 The data index currently indicated by Tooltip. 当前提示框所指示的数据项索引。 More...
 
double[] runtimeXValues [get, set]
 the value for x indicator label. 指示器X轴上要显示的值。 More...
 
double[] runtimeYValues [get, set]
 the value for y indicator label. 指示器Y轴上要显示的值。 More...
 
Vector2 runtimePointerPos [get, set]
 the current pointer position. 当前鼠标位置。 More...
 
float runtimeWidth [get]
 the width of tooltip. 提示框宽。 More...
 
float runtimeHeight [get]
 the height of tooltip. 提示框高。 More...
 
bool runtimeInited [get]
 Whether the tooltip has been initialized. 提示框是否已初始化。 More...
 
GameObject runtimeGameObject [get]
 the gameObject of tooltip. 提示框的gameObject。 More...
 
float runtimeAngle [get, set]
 当前指示的角度。 More...
 
int runtimeGridIndex [get, set]
 当前指示的Grid索引。 More...
 
int runtimePolarIndex [get, set]
 
DelegateTooltipPosition positionFunction [get, set]
 
static Tooltip defaultTooltip [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

Tooltip component. 提示框组件。

Definition at line 19 of file Tooltip.cs.

Member Enumeration Documentation

◆ Type

enum XCharts.Tooltip.Type
strong

Indicator type. 指示器类型。

Enumerator
Line 

line indicator. 直线指示器

Shadow 

shadow crosshair indicator. 阴影指示器

None 

no indicator displayed. 无指示器

Corss 

crosshair indicator, which is actually the shortcut of enable two axisPointers of two orthometric axes. 十字准星指示器。坐标轴显示Label和交叉线。

Definition at line 25 of file Tooltip.cs.

26  {
31  Line,
36  Shadow,
41  None,
46  Corss
47  }

Member Function Documentation

◆ GetContentPos()

Vector3 XCharts.Tooltip.GetContentPos ( )
inline

获得当前提示框的位置

Returns

Definition at line 471 of file Tooltip.cs.

472  {
473  if (m_Content)
474  return m_Content.transform.localPosition;
475  else
476  return Vector3.zero;
477  }

◆ IsActive()

bool XCharts.Tooltip.IsActive ( )
inline

提示框是否显示

Returns

Definition at line 434 of file Tooltip.cs.

435  {
436  return m_GameObject != null && m_GameObject.activeInHierarchy;
437  }

◆ IsDataIndexChanged()

bool XCharts.Tooltip.IsDataIndexChanged ( )
inline

Whether the data item indicated by tooltip has changed. 提示框所指示的数据项是否发生变化。

Returns

Definition at line 484 of file Tooltip.cs.

485  {
486  if (runtimeDataIndex.Count < 2 || lastDataIndex.Count < 2) return false;
487  return runtimeDataIndex[0] != lastDataIndex[0] ||
488  runtimeDataIndex[1] != lastDataIndex[1];
489  }

◆ IsSelected() [1/2]

bool XCharts.Tooltip.IsSelected ( )
inline

当前提示框是否选中数据项

Returns

Definition at line 504 of file Tooltip.cs.

505  {
506  foreach (var index in runtimeDataIndex)
507  if (index >= 0) return true;
508  return false;
509  }

◆ IsSelected() [2/2]

bool XCharts.Tooltip.IsSelected ( int  index)
inline

指定索引的数据项是否被提示框选中

Parameters
index
Returns

Definition at line 516 of file Tooltip.cs.

517  {
518  foreach (var temp in runtimeDataIndex)
519  if (temp == index) return true;
520  return false;
521  }

◆ SetActive()

void XCharts.Tooltip.SetActive ( bool  flag)
inline

设置提示框是否显示

Parameters
flag

Definition at line 443 of file Tooltip.cs.

444  {
445  if (!flag && m_AlwayShow) return;
446  if (lastDataIndex.Count >= 2)
447  lastDataIndex[0] = lastDataIndex[1] = -1;
448  if (m_GameObject && m_GameObject.activeInHierarchy != flag)
449  m_GameObject.SetActive(flag);
450  }

◆ SetBackground()

void XCharts.Tooltip.SetBackground ( Sprite  sprite)
inline

设置提示框文本背景图片

Parameters
sprite

Definition at line 375 of file Tooltip.cs.

376  {
377  if (m_ContentImage != null)
378  {
379  m_ContentImage.type = Image.Type.Sliced;
380  m_ContentImage.sprite = sprite;
381  }
382  }

◆ SetContentBackgroundColor()

void XCharts.Tooltip.SetContentBackgroundColor ( Color  color)
inline

设置提示框文本背景色

Parameters
color

Definition at line 365 of file Tooltip.cs.

366  {
367  if (m_ContentImage != null)
368  m_ContentImage.color = color;
369  }

◆ SetContentObj()

void XCharts.Tooltip.SetContentObj ( GameObject  content)
inline

绑定提示框的文本框gameObject

Parameters
content

Definition at line 336 of file Tooltip.cs.

337  {
338  m_Content = content;
339  m_ContentRect = m_Content.GetComponent<RectTransform>();
340  m_ContentImage = m_Content.GetComponent<Image>();
341  m_ContentImage.raycastTarget = false;
342  m_ContentText = new ChartText(m_Content);
343  if (m_ContentText != null)
344  {
345  m_ContentTextRect = m_ContentText.gameObject.GetComponentInChildren<RectTransform>();
346  }
348  }

◆ SetContentTextColor()

void XCharts.Tooltip.SetContentTextColor ( Color  color)
inline

设置提示框文本字体颜色

Parameters
color

Definition at line 388 of file Tooltip.cs.

389  {
390  if (m_ContentText != null)
391  {
392  m_ContentText.SetColor(color);
393  }
394  }

◆ SetObj()

void XCharts.Tooltip.SetObj ( GameObject  obj)
inline

绑定提示框gameObject

Parameters
obj

Definition at line 326 of file Tooltip.cs.

327  {
328  m_GameObject = obj;
329  m_GameObject.SetActive(false);
330  }

◆ UpdateContentPos()

void XCharts.Tooltip.UpdateContentPos ( Vector2  pos)
inline

更新文本框位置

Parameters
pos

Definition at line 456 of file Tooltip.cs.

457  {
458  if (m_Content)
459  {
460  if (m_PositionFunction != null)
461  m_Content.transform.localPosition = m_PositionFunction(pos);
462  else
463  m_Content.transform.localPosition = pos;
464  }
465  }

◆ UpdateContentText()

void XCharts.Tooltip.UpdateContentText ( string  txt)
inline

设置提示框文本内容

Parameters
txt

Definition at line 400 of file Tooltip.cs.

401  {
402  if (m_ContentText != null)
403  {
404  m_ContentText.SetText(txt);
405  float wid, hig;
406  if (m_FixedWidth > 0) wid = m_FixedWidth;
407  else if (m_MinWidth > 0 && m_ContentText.GetPreferredWidth() < m_MinWidth) wid = m_MinWidth;
408  else wid = m_ContentText.GetPreferredWidth() + m_PaddingLeftRight * 2;
409  if (m_FixedHeight > 0) hig = m_FixedHeight;
410  else if (m_MinHeight > 0 && m_ContentText.GetPreferredHeight() < m_MinHeight) hig = m_MinHeight;
411  else hig = m_ContentText.GetPreferredHeight() + m_PaddingTopBottom * 2;
412  if (m_ContentRect != null) m_ContentRect.sizeDelta = new Vector2(wid, hig);
413  if (m_ContentTextRect != null)
414  {
415  m_ContentTextRect.anchoredPosition = new Vector3(m_PaddingLeftRight, -m_PaddingTopBottom);
416  }
417  }
418  }

◆ UpdateToTop()

void XCharts.Tooltip.UpdateToTop ( )
inline

Keep Tooltiop displayed at the top. 保持Tooltiop显示在最顶上

Definition at line 354 of file Tooltip.cs.

355  {
356  if (m_GameObject == null) return;
357  int count = m_GameObject.transform.parent.childCount;
358  m_GameObject.GetComponent<RectTransform>().SetSiblingIndex(count - 1);
359  }

Member Data Documentation

◆ runtimeSerieIndex

Dictionary<int, List<int> > XCharts.Tooltip.runtimeSerieIndex = new Dictionary<int, List<int>>()

当前提示框所指示的Serie索引(目前只对散点图有效)。

Definition at line 250 of file Tooltip.cs.

Property Documentation

◆ alwayShow

bool XCharts.Tooltip.alwayShow
getset

Whether to trigger after always display. 是否触发后一直显示。

Definition at line 208 of file Tooltip.cs.

208 { get { return m_AlwayShow; } set { m_AlwayShow = value; } }

◆ backgroundImage

Sprite XCharts.Tooltip.backgroundImage
getset

The image of icon. 图标的图片。

Definition at line 203 of file Tooltip.cs.

203 { get { return m_BackgroundImage; } set { m_BackgroundImage = value; SetBackground(m_BackgroundImage); } }

◆ componentDirty

override bool XCharts.Tooltip.componentDirty
get

组件是否需要刷新

Definition at line 237 of file Tooltip.cs.

237  {
238  get { return m_ComponentDirty || lineStyle.componentDirty || textStyle.componentDirty; }
239  }

◆ fixedHeight

float XCharts.Tooltip.fixedHeight
getset

Fixed height. Higher priority than minHeight. 固定高度。比 minHeight 优先。

Definition at line 153 of file Tooltip.cs.

153 { get { return m_FixedHeight; } set { m_FixedHeight = value; } }

◆ fixedWidth

float XCharts.Tooltip.fixedWidth
getset

Fixed width. Higher priority than minWidth. 固定宽度。比 minWidth 优先。

Definition at line 148 of file Tooltip.cs.

148 { get { return m_FixedWidth; } set { m_FixedWidth = value; } }

◆ formatter

string XCharts.Tooltip.formatter
getset

A string template formatter for the total content of the prompt box. Support for wrapping lines with
. When formatter is not null, use formatter first, otherwise use itemFormatter. Template variables are {.}, {a}, {b}, {c}, {d}. {.} is the dot of the corresponding color of a Serie that is currently indicated or whose index is 0. {a} is the series name of the serie that is currently indicated or whose index is 0. {b} is the name of the data item serieData that is currently indicated or whose index is 0, or a category value (such as the X-axis of a line chart). {c} is the value of a Y-dimension (dimesion is 1) from a Serie that is currently indicated or whose index is 0. {d} is the percentage value of Y-dimensions (dimesion is 1) from serie that is currently indicated or whose index is 0, with no % sign. {e} is the name of the data item serieData that is currently indicated or whose index is 0. {.1} represents a dot from serie corresponding color that specifies index as 1. 1 in {a1}, {b1}, {c1} represents a serie that specifies an index of 1. {c1:2} represents the third data from serie's current indication data item indexed to 1 (a data item has multiple data, index 2 represents the third data). {c1:2-2} represents the third data item from serie's third data item indexed to 1 (i.e., which data item must be specified to specify). {d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified). {d:0.##} indicates that a formatted string with a value specified separately is 0.## (used for percentage, reserved 2 valid digits while avoiding the situation similar to "100.00%" when using f2 ). Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}" 提示框总内容的字符串模版格式器。支持用
换行。当formatter不为空时,优先使用formatter,否则使用itemFormatter。 模板变量有{.}、{a}、{b}、{c}、{d}。 {.}为当前所指示或index为0的serie的对应颜色的圆点。 {a}为当前所指示或index为0的serie的系列名name。 {b}为当前所指示或index为0的serie的数据项serieData的name,或者类目值(如折线图的X轴)。 {c}为当前所指示或index为0的serie的y维(dimesion为1)的数值。 {d}为当前所指示或index为0的serie的y维(dimesion为1)百分比值,注意不带号。 {e}为当前所指示或index为0的serie的数据项serieData的name。 {.1}表示指定index为1的serie对应颜色的圆点。 {a1}、{b1}、{c1}中的1表示指定index为1的serie。 {c1:2}表示索引为1的serie的当前指示数据项的第3个数据(一个数据项有多个数据,index为2表示第3个数据)。 {c1:2-2}表示索引为1的serie的第3个数据项的第3个数据(也就是要指定第几个数据项时必须要指定第几个数据)。 {d1:2:f2}表示单独指定了数值的格式化字符串为f2(不指定时用numericFormatter)。 {d:0.##} 表示单独指定了数值的格式化字符串为 0.## (用于百分比,保留2位有效数同时又能避免使用 f2 而出现的类似于"100.00%"的情况 )。 示例:"{a}:{c}"、"{a1}:{c1:f1}"、"{a1}:{c1:0:f1}"、"{a1}:{c1:1-1:f1}"

Definition at line 129 of file Tooltip.cs.

129 { get { return m_Formatter; } set { m_Formatter = value; } }

◆ ignoreDataDefaultContent

string XCharts.Tooltip.ignoreDataDefaultContent
getset

The default display character information for ignored data. 被忽略数据的默认显示字符信息。

Definition at line 198 of file Tooltip.cs.

198 { get { return m_IgnoreDataDefaultContent; } set { m_IgnoreDataDefaultContent = value; } }

◆ ignoreDataShow

bool XCharts.Tooltip.ignoreDataShow
getset

Whether to show ignored data on tooltip. 是否显示忽略数据在tooltip上。

Definition at line 193 of file Tooltip.cs.

193 { get { return m_IgnoreDataShow; } set { m_IgnoreDataShow = value; } }

◆ itemFormatter

string XCharts.Tooltip.itemFormatter
getset

a string template formatter for a single Serie or data item content. Support for wrapping lines with
. When formatter is not null, use formatter first, otherwise use itemFormatter. 提示框单个serie或数据项内容的字符串模版格式器。支持用
换行。当formatter不为空时,优先使用formatter,否则使用itemFormatter。

Definition at line 142 of file Tooltip.cs.

142 { get { return m_ItemFormatter; } set { m_ItemFormatter = value; } }

◆ lineStyle

LineStyle XCharts.Tooltip.lineStyle
getset

the line style of indicator line. 指示线样式。

Definition at line 228 of file Tooltip.cs.

228  {
229  get { return m_LineStyle; }
230  set { if (value != null) m_LineStyle = value; SetComponentDirty(); }
231  }

◆ minHeight

float XCharts.Tooltip.minHeight
getset

Minimum height. If fixedHeight has a value, take priority over fixedHeight. 最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。

Definition at line 163 of file Tooltip.cs.

163 { get { return m_MinHeight; } set { m_MinHeight = value; } }

◆ minWidth

float XCharts.Tooltip.minWidth
getset

Minimum width. If fixedWidth has a value, get fixedWidth first. 最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。

Definition at line 158 of file Tooltip.cs.

158 { get { return m_MinWidth; } set { m_MinWidth = value; } }

◆ numericFormatter

string XCharts.Tooltip.numericFormatter
getset

Standard numeric format string. Used to format numeric values to display as strings. Using 'Axx' form: 'A' is the single character of the format specifier, supporting 'C' currency, 'D' decimal, 'E' exponent, 'F' number of vertices, 'G' regular, 'N' digits, 'P' percentage, 'R' round tripping, 'X' hex etc. 'XX' is the precision specification, from '0' - '99'. 标准数字格式字符串。用于将数值格式化显示为字符串。 使用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 175 of file Tooltip.cs.

175  {
176  get { return m_NumericFormatter; }
177  set { if (PropertyUtil.SetClass(ref m_NumericFormatter, value)) SetComponentDirty(); }
178  }

◆ offset

Vector2 XCharts.Tooltip.offset
getset

The position offset of tooltip relative to the mouse position. 提示框相对于鼠标位置的偏移。

Definition at line 213 of file Tooltip.cs.

213 { get { return m_Offset; } set { m_Offset = value; } }

◆ paddingLeftRight

float XCharts.Tooltip.paddingLeftRight
getset

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

Definition at line 183 of file Tooltip.cs.

183 { get { return m_PaddingLeftRight; } set { m_PaddingLeftRight = value; } }

◆ paddingTopBottom

float XCharts.Tooltip.paddingTopBottom
getset

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

Definition at line 188 of file Tooltip.cs.

188 { get { return m_PaddingTopBottom; } set { m_PaddingTopBottom = value; } }

◆ runtimeAngle

float XCharts.Tooltip.runtimeAngle
getset

当前指示的角度。

Definition at line 297 of file Tooltip.cs.

297 { get; internal set; }

◆ runtimeDataIndex

List<int> XCharts.Tooltip.runtimeDataIndex
getset

The data index currently indicated by Tooltip. 当前提示框所指示的数据项索引。

Definition at line 255 of file Tooltip.cs.

255 { get { return m_RuntimeDateIndex; } internal set { m_RuntimeDateIndex = value; } }

◆ runtimeGameObject

GameObject XCharts.Tooltip.runtimeGameObject
get

the gameObject of tooltip. 提示框的gameObject。

Definition at line 293 of file Tooltip.cs.

293 { get { return m_GameObject; } }

◆ runtimeGridIndex

int XCharts.Tooltip.runtimeGridIndex
getset

当前指示的Grid索引。

Definition at line 301 of file Tooltip.cs.

301 { get; internal set; }

◆ runtimeHeight

float XCharts.Tooltip.runtimeHeight
get

the height of tooltip. 提示框高。

Definition at line 283 of file Tooltip.cs.

283 { get { return m_ContentRect.sizeDelta.y; } }

◆ runtimeInited

bool XCharts.Tooltip.runtimeInited
get

Whether the tooltip has been initialized. 提示框是否已初始化。

Definition at line 288 of file Tooltip.cs.

288 { get { return m_GameObject != null; } }

◆ runtimePointerPos

Vector2 XCharts.Tooltip.runtimePointerPos
getset

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

Definition at line 273 of file Tooltip.cs.

273 { get; internal set; }

◆ runtimeWidth

float XCharts.Tooltip.runtimeWidth
get

the width of tooltip. 提示框宽。

Definition at line 278 of file Tooltip.cs.

278 { get { return m_ContentRect.sizeDelta.x; } }

◆ runtimeXValues

double [] XCharts.Tooltip.runtimeXValues
getset

the value for x indicator label. 指示器X轴上要显示的值。

Definition at line 261 of file Tooltip.cs.

261 { get { return m_RuntimeXValue; } internal set { m_RuntimeXValue = value; } }

◆ runtimeYValues

double [] XCharts.Tooltip.runtimeYValues
getset

the value for y indicator label. 指示器Y轴上要显示的值。

Definition at line 267 of file Tooltip.cs.

267 { get { return m_RuntimeYValue; } internal set { m_RuntimeYValue = value; } }

◆ show

bool XCharts.Tooltip.show
getset

Whether to show the tooltip component. 是否显示提示框组件。

Definition at line 83 of file Tooltip.cs.

83  {
84  get { return m_Show; }
85  set { if (PropertyUtil.SetStruct(ref m_Show, value)) { SetAllDirty(); SetActive(value); } }
86  }

◆ textStyle

TextStyle XCharts.Tooltip.textStyle
getset

the text style of content. 提示框内容文本样式。

Definition at line 219 of file Tooltip.cs.

219  {
220  get { return m_TextStyle; }
221  set { if (value != null) { m_TextStyle = value; SetComponentDirty(); } }
222  }

◆ titleFormatter

string XCharts.Tooltip.titleFormatter
getset

The string template formatter for the tooltip title content. Support for wrapping lines with
. This is only valid if the itemFormatter is in effect. The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. 提示框标题内容的字符串模版格式器。支持用
换行。仅当itemFormatter生效时才有效。可以单独设置占位符{i}表示忽略不显示title。

Definition at line 136 of file Tooltip.cs.

136 { get { return m_TitleFormatter; } set { m_TitleFormatter = value; } }

◆ type

Type XCharts.Tooltip.type
getset

Indicator type. 提示框指示器类型。

Definition at line 92 of file Tooltip.cs.

92  {
93  get { return m_Type; }
94  set { if (PropertyUtil.SetStruct(ref m_Type, value)) SetAllDirty(); }
95  }

The documentation for this class was generated from the following file:
XCharts.RoseType.None
@ None
Don't show as Nightingale chart.不展示成南丁格尔玫瑰图
XCharts.ChartComponent.componentDirty
virtual bool componentDirty
组件重新初始化标记。
Definition: ChartComponent.cs:25
XCharts.Tooltip.backgroundImage
Sprite backgroundImage
The image of icon. 图标的图片。
Definition: Tooltip.cs:203
XCharts.Tooltip.SetBackground
void SetBackground(Sprite sprite)
设置提示框文本背景图片
Definition: Tooltip.cs:375
XCharts.Tooltip.lineStyle
LineStyle lineStyle
the line style of indicator line. 指示线样式。
Definition: Tooltip.cs:228
XCharts.Tooltip.SetActive
void SetActive(bool flag)
设置提示框是否显示
Definition: Tooltip.cs:443
XCharts.Tooltip.textStyle
TextStyle textStyle
the text style of content. 提示框内容文本样式。
Definition: Tooltip.cs:219
XCharts.SerieType.Line
@ Line
折线图。折线图是用折线将各个数据点标志连接起来的图表,用于展现数据的变化趋势。可用于直角坐标系和极坐标系上。
XCharts.Tooltip.runtimeDataIndex
List< int > runtimeDataIndex
The data index currently indicated by Tooltip. 当前提示框所指示的数据项索引。
Definition: Tooltip.cs:255