mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 00:20:18 +00:00
整理文档
This commit is contained in:
@@ -12,6 +12,8 @@ using UnityEngine.UI;
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Text character limitation and adaptation component. When the length of the text exceeds the set length,
|
||||
/// it is cropped and suffixes are appended to the end.Only valid in the category axis.
|
||||
/// 文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。
|
||||
/// 只在类目轴中有效。
|
||||
/// </summary>
|
||||
@@ -24,7 +26,9 @@ namespace XCharts
|
||||
[SerializeField] private string m_Suffix = "...";
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用文本自适应。默认为true。
|
||||
/// Whether to enable text limit.
|
||||
/// 是否启用文本自适应。
|
||||
/// [default:true]
|
||||
/// </summary>
|
||||
public bool enable
|
||||
{
|
||||
@@ -32,6 +36,8 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_Enable, value)) SetComponentDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// Set the maximum width. A default of 0 indicates automatic fetch; otherwise, custom.
|
||||
/// Clipping occurs when the width of the text is greater than this value.
|
||||
/// 设定最大宽度。默认为0表示自动获取,否则表示自定义。当文本的宽度大于该值进行裁剪。
|
||||
/// </summary>
|
||||
public float maxWidth
|
||||
@@ -40,7 +46,9 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_MaxWidth, value)) SetComponentDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 两边留白像素距离。默认为10
|
||||
/// White pixel distance at both ends.
|
||||
/// 两边留白像素距离。
|
||||
/// [default:10f]
|
||||
/// </summary>
|
||||
public float gap
|
||||
{
|
||||
@@ -48,7 +56,9 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_Gap, value)) SetComponentDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// Suffixes when the length exceeds.
|
||||
/// 长度超出时的后缀。
|
||||
/// [default: "..."]
|
||||
/// </summary>
|
||||
public string suffix
|
||||
{
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace XCharts
|
||||
/// <summary>
|
||||
/// Rotation of text.
|
||||
/// 文本的旋转。
|
||||
/// [default: `0f`]
|
||||
/// </summary>
|
||||
public float rotate
|
||||
{
|
||||
@@ -42,6 +43,7 @@ namespace XCharts
|
||||
/// <summary>
|
||||
/// the offset of position.
|
||||
/// 坐标偏移。
|
||||
/// [Default: `Vector2.zero`]
|
||||
/// </summary>
|
||||
public Vector2 offset
|
||||
{
|
||||
@@ -54,6 +56,7 @@ namespace XCharts
|
||||
/// <summary>
|
||||
/// the color of text.
|
||||
/// 文本的颜色。
|
||||
/// [default: `Color.clear`]
|
||||
/// </summary>
|
||||
public Color color
|
||||
{
|
||||
@@ -63,6 +66,7 @@ namespace XCharts
|
||||
/// <summary>
|
||||
/// the color of text.
|
||||
/// 文本的背景颜色。
|
||||
/// [default: `Color.clear`]
|
||||
/// </summary>
|
||||
public Color backgroundColor
|
||||
{
|
||||
@@ -70,8 +74,9 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetColor(ref m_BackgroundColor, value)) SetComponentDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// the font of text.
|
||||
/// 文本字体
|
||||
/// the font of text. When `null`, the theme's font is used by default.
|
||||
/// 文本字体。
|
||||
/// [default: null]
|
||||
/// </summary>
|
||||
public Font font
|
||||
{
|
||||
@@ -81,6 +86,7 @@ namespace XCharts
|
||||
/// <summary>
|
||||
/// font size.
|
||||
/// 文本字体大小。
|
||||
/// [default: 18]
|
||||
/// </summary>
|
||||
public int fontSize
|
||||
{
|
||||
@@ -90,6 +96,7 @@ namespace XCharts
|
||||
/// <summary>
|
||||
/// font style.
|
||||
/// 文本字体的风格。
|
||||
/// [default: FontStyle.Normal]
|
||||
/// </summary>
|
||||
public FontStyle fontStyle
|
||||
{
|
||||
@@ -99,6 +106,7 @@ namespace XCharts
|
||||
/// <summary>
|
||||
/// text line spacing.
|
||||
/// 行间距。
|
||||
/// [default: 1f]
|
||||
/// </summary>
|
||||
public float lineSpacing
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user