mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 06:20:15 +00:00
[code] add comment
This commit is contained in:
@@ -19,12 +19,12 @@ namespace XCharts.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// Numerical axis, suitable for continuous data.
|
||||
/// ||数值轴。适用于连续数据。
|
||||
/// |数值轴。适用于连续数据。
|
||||
/// </summary>
|
||||
Value,
|
||||
/// <summary>
|
||||
/// Category axis, suitable for discrete category data. Data should only be set via data for this type.
|
||||
/// ||类目轴。适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。
|
||||
/// |类目轴。适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。serie的数据第0维数据对应坐标轴data的index。
|
||||
/// </summary>
|
||||
Category,
|
||||
/// <summary>
|
||||
@@ -74,12 +74,12 @@ namespace XCharts.Runtime
|
||||
}
|
||||
|
||||
[SerializeField] protected bool m_Show = true;
|
||||
[SerializeField] protected AxisType m_Type;
|
||||
[SerializeField] protected AxisMinMaxType m_MinMaxType;
|
||||
[SerializeField] protected Axis.AxisType m_Type;
|
||||
[SerializeField] protected Axis.AxisMinMaxType m_MinMaxType;
|
||||
[SerializeField] protected int m_GridIndex;
|
||||
[SerializeField] protected int m_PolarIndex;
|
||||
[SerializeField] protected int m_ParallelIndex;
|
||||
[SerializeField] protected AxisPosition m_Position;
|
||||
[SerializeField] protected Axis.AxisPosition m_Position;
|
||||
[SerializeField] protected float m_Offset;
|
||||
[SerializeField] protected double m_Min;
|
||||
[SerializeField] protected double m_Max;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace XCharts.Runtime
|
||||
}
|
||||
|
||||
[SerializeField] private bool m_Show = true;
|
||||
[SerializeField] private AreaOrigin m_Origin;
|
||||
[SerializeField] private AreaStyle.AreaOrigin m_Origin;
|
||||
[SerializeField] private Color32 m_Color;
|
||||
[SerializeField] private Color32 m_ToColor;
|
||||
[SerializeField][Range(0, 1)] private float m_Opacity = 0.6f;
|
||||
|
||||
@@ -22,6 +22,10 @@ namespace XCharts.Runtime
|
||||
/// |是否显示注解组件。
|
||||
/// </summary>
|
||||
public bool show { get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetComponentDirty(); } }
|
||||
/// <summary>
|
||||
/// The items of comment.
|
||||
/// |注解项。每个注解组件可以设置多个注解项。
|
||||
/// </summary>
|
||||
public List<CommentItem> items { get { return m_Items; } set { m_Items = value; SetComponentDirty(); } }
|
||||
/// <summary>
|
||||
/// The text style of all comments.
|
||||
|
||||
@@ -40,10 +40,35 @@ namespace XCharts.Runtime
|
||||
private ChartLabel m_Label;
|
||||
private List<float> m_FpsList = new List<float>();
|
||||
|
||||
/// <summary>
|
||||
/// Whether show debug component.
|
||||
/// |是否显示Debug组件。
|
||||
/// </summary>
|
||||
public bool show { get { return m_Show; } set { m_Show = value; } }
|
||||
/// <summary>
|
||||
/// Whether show children components of chart in hierarchy view.
|
||||
/// |是否在Hierarchy试图显示所有chart下的节点。
|
||||
/// </summary>
|
||||
public bool showAllChartObject { get { return m_ShowAllChartObject; } set { m_ShowAllChartObject = value; } }
|
||||
/// <summary>
|
||||
/// Whether to fold series in inspector view.
|
||||
/// |是否在Inspector上折叠Serie。
|
||||
/// </summary>
|
||||
public bool foldSeries { get { return m_FoldSeries; } set { m_FoldSeries = value; } }
|
||||
/// <summary>
|
||||
/// frame rate.
|
||||
/// |当前帧率。
|
||||
/// </summary>
|
||||
public float fps { get; private set; }
|
||||
/// <summary>
|
||||
/// The average frame rate.
|
||||
/// |平均帧率。
|
||||
/// </summary>
|
||||
public float avgFps { get; private set; }
|
||||
/// <summary>
|
||||
/// The fefresh count of chart per second.
|
||||
/// |图表每秒刷新次数。
|
||||
/// </summary>
|
||||
public int refreshCount { get; internal set; }
|
||||
internal int clickChartCount { get; set; }
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// Type of legend.
|
||||
/// |图例类型。
|
||||
/// [default:Type.Auto]
|
||||
/// </summary>
|
||||
public Type iconType
|
||||
{
|
||||
@@ -107,7 +106,6 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// Selected mode of legend, which controls whether series can be toggled displaying by clicking legends.
|
||||
/// |选择模式。控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 None 关闭。
|
||||
/// [default:SelectedMode.Multiple]
|
||||
/// </summary>
|
||||
public SelectedMode selectedMode
|
||||
{
|
||||
@@ -117,7 +115,6 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// Specify whether the layout of legend component is horizontal or vertical.
|
||||
/// |布局方式是横还是竖。
|
||||
/// [default:Orient.Horizonal]
|
||||
/// </summary>
|
||||
public Orient orient
|
||||
{
|
||||
@@ -127,7 +124,6 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// The location of legend.
|
||||
/// |图例显示的位置。
|
||||
/// [default:Location.defaultTop]
|
||||
/// </summary>
|
||||
public Location location
|
||||
{
|
||||
@@ -137,7 +133,6 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// Image width of legend symbol.
|
||||
/// |图例标记的图形宽度。
|
||||
/// [default:24f]
|
||||
/// </summary>
|
||||
public float itemWidth
|
||||
{
|
||||
@@ -147,7 +142,6 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// Image height of legend symbol.
|
||||
/// |图例标记的图形高度。
|
||||
/// [default:12f]
|
||||
/// </summary>
|
||||
public float itemHeight
|
||||
{
|
||||
@@ -157,7 +151,6 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// The distance between each legend, horizontal distance in horizontal layout, and vertical distance in vertical layout.
|
||||
/// |图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。
|
||||
/// [default:10f]
|
||||
/// </summary>
|
||||
public float itemGap
|
||||
{
|
||||
@@ -167,7 +160,6 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// Whether the legend symbol matches the color automatically.
|
||||
/// |图例标记的图形是否自动匹配颜色。
|
||||
/// [default:true]
|
||||
/// </summary>
|
||||
public bool itemAutoColor
|
||||
{
|
||||
@@ -189,7 +181,6 @@ namespace XCharts.Runtime
|
||||
/// 使用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
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string numericFormatter
|
||||
{
|
||||
get { return m_NumericFormatter; }
|
||||
@@ -235,7 +226,7 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// Data array of legend. An array item is usually a name representing string. (If it is a pie chart,
|
||||
/// it could also be the name of a single data in the pie chart) of a series.
|
||||
/// |If data is not specified, it will be auto collected from series.
|
||||
/// If data is not specified, it will be auto collected from series.
|
||||
/// |图例的数据数组。数组项通常为一个字符串,每一项代表一个系列的 name(如果是饼图,也可以是饼图单个数据的 name)。
|
||||
/// 如果 data 没有被指定,会自动从当前系列中获取。指定data时里面的数据项和serie匹配时才会生效。
|
||||
/// </summary>
|
||||
@@ -254,7 +245,7 @@ namespace XCharts.Runtime
|
||||
}
|
||||
/// <summary>
|
||||
/// the colors of legend item.
|
||||
/// 图例标记的颜色列表。
|
||||
/// |图例标记的颜色列表。
|
||||
/// </summary>
|
||||
public List<Color> colors
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace XCharts.Runtime
|
||||
/// The name of indicator.
|
||||
/// |指示器名称。
|
||||
/// </summary>
|
||||
public string name { get { return FormatterHelper.TrimAndReplaceLine(m_Name); } set { m_Name = value; } }
|
||||
public string name { get { return m_Name; } set { m_Name = value; } }
|
||||
/// <summary>
|
||||
/// The maximum value of indicator, with default value of 0, but we recommend to set it manually.
|
||||
/// |指示器的最大值,默认为 0 无限制。
|
||||
|
||||
@@ -122,7 +122,10 @@ namespace XCharts.Runtime
|
||||
get { return m_TickColor; }
|
||||
set { if (PropertyUtil.SetColor(ref m_TickColor, value)) SetVerticesDirty(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the colors of split area.
|
||||
/// |坐标轴分隔区域的颜色。
|
||||
/// </summary>
|
||||
public List<Color32> splitAreaColors
|
||||
{
|
||||
get { return m_SplitAreaColors; }
|
||||
|
||||
@@ -27,18 +27,38 @@ namespace XCharts.Runtime
|
||||
get { return m_LineWidth; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_LineWidth, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// the symbol size of line serie.
|
||||
/// |折线图的Symbol大小。
|
||||
/// </summary>
|
||||
public float lineSymbolSize
|
||||
{
|
||||
get { return m_LineSymbolSize; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_LineSymbolSize, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// the selected symbol size of line serie.
|
||||
/// |折线图Symbol在被选中状态时的大小。
|
||||
/// </summary>
|
||||
public float lineSymbolSelectedSize { get { return lineSymbolSize * selectedRate; } }
|
||||
/// <summary>
|
||||
/// the symbol size of scatter serie.
|
||||
/// |散点图的Symbol大小。
|
||||
/// </summary>
|
||||
public float scatterSymbolSize
|
||||
{
|
||||
get { return m_ScatterSymbolSize; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_ScatterSymbolSize, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// the selected symbol size of scatter serie.
|
||||
/// |散点图的Symbol在被选中状态时的大小。
|
||||
/// </summary>
|
||||
public float scatterSymbolSelectedSize { get { return scatterSymbolSize * selectedRate; } }
|
||||
/// <summary>
|
||||
/// the rate of symbol size of line or scatter serie.
|
||||
/// |折线图或散点图在被选中时的放大倍数。
|
||||
/// </summary>
|
||||
public float selectedRate
|
||||
{
|
||||
get { return m_SelectedRate; }
|
||||
@@ -46,7 +66,8 @@ namespace XCharts.Runtime
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 饼图鼠标移到高亮时的额外半径
|
||||
/// the extra radius of pie when actived by tooltip.
|
||||
/// |饼图鼠标移到高亮时的额外半径
|
||||
/// </summary>
|
||||
public float pieTooltipExtraRadius
|
||||
{
|
||||
@@ -54,7 +75,8 @@ namespace XCharts.Runtime
|
||||
set { if (PropertyUtil.SetStruct(ref m_PieTooltipExtraRadius, value < 0 ? 0f : value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 饼图选中时的中心点偏移
|
||||
/// the center offset of pie if selected.
|
||||
/// |饼图选中时的中心点偏移。
|
||||
/// </summary>
|
||||
public float pieSelectedOffset
|
||||
{
|
||||
|
||||
@@ -58,17 +58,23 @@ namespace XCharts.Runtime
|
||||
{
|
||||
get { return sharedTheme.themeType; }
|
||||
}
|
||||
/// <summary>
|
||||
/// theme name.
|
||||
/// |主题名字。
|
||||
/// </summary>
|
||||
public string themeName
|
||||
{
|
||||
get { return sharedTheme.themeName; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the asset of theme.
|
||||
/// |主题配置。
|
||||
/// </summary>
|
||||
public Theme sharedTheme
|
||||
{
|
||||
get { return m_SharedTheme; }
|
||||
set { m_SharedTheme = value; SetAllDirty(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the contrast color of chart.
|
||||
/// |对比色。
|
||||
@@ -91,7 +97,7 @@ namespace XCharts.Runtime
|
||||
}
|
||||
/// <summary>
|
||||
/// Whether the background color is transparent. When true, the background color is not drawn.
|
||||
/// |是否透明背景颜色。当设置为true时,不绘制背景颜色。
|
||||
/// |是否透明背景颜色。当设置为true时,不绘制背景颜色。
|
||||
/// </summary>
|
||||
public bool transparentBackground
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user