完善文档

This commit is contained in:
monitor1394
2020-07-15 09:11:35 +08:00
parent 7c95d2d8b8
commit 64178ef88d
5 changed files with 159 additions and 87 deletions

View File

@@ -27,9 +27,9 @@ Main component:
* [Serie-Liquid](#Serie-Liquid) * [Serie-Liquid](#Serie-Liquid)
* [Settings](#Settings) * [Settings](#Settings)
* [Theme](#Theme) * [Theme](#Theme)
* [Title](#Title)
* [Tooltip](#Tooltip) * [Tooltip](#Tooltip)
* [Vessel](#Vessel) * [Vessel](#Vessel)
* [Title](#Title)
* [VisualMap](#VisualMap) * [VisualMap](#VisualMap)
Sub component: Sub component:
@@ -104,7 +104,7 @@ Parameters:
Sub component for serie title. Sub component for serie title.
* `show`: Whether to show serie title. * `show`: Whether to show serie title.
* `textStyle`: The text style of title. * `textStyle`: The text style of title [TextStyle](#TextStyle).
## `Legend` ## `Legend`
@@ -227,99 +227,94 @@ Tooltip component.
* `titleFormatter`: The string template formatter for the tooltip title content. Support for wrapping lines with `\n`. 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. * `titleFormatter`: The string template formatter for the tooltip title content. Support for wrapping lines with `\n`. 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`: a string template formatter for a single Serie or data item content. Support for wrapping lines with `\n`. When `formatter` is not null, use `formatter` first, otherwise use `itemFormatter`. * `itemFormatter`: a string template formatter for a single Serie or data item content. Support for wrapping lines with `\n`. When `formatter` is not null, use `formatter` first, otherwise use `itemFormatter`.
* `numericFormatter`: 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'. see: <https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings> * `numericFormatter`: 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'. see: <https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings>
* `fixedWidth`: 固定宽度。当同时设置 `fixedWidth``minWidth` 时,`fixedWidth` `minWidth` 优先级高。 * `fixedWidth`: Fixed width. Higher priority than `minWidth`.
* `fixedHeight`: 固定高度。当同时设置 `fixedHeight``minHeight` 时,`fixedHeight` `minHeight` 优先级高。 * `fixedHeight`: Fixed height. Higher priority than `minHeight`.
* `minWidth`: 最小宽度。当同时设置 `fixedWidth``minWidth` 时,`fixedWidth``minWidth` 优先级高。 * `minWidth`: Minimum width. If `fixedWidth` has a value, get `fixedWidth` first.
* `minHeight`: 最小高度。当同时设置 f`ixedHeight` `minHeight` 时,`fixedHeight``minHeight` 优先级高。 * `minHeight`: Minimum height. If `fixedHeight` has a value, get `fixedHeight` first.
* `paddingLeftRight`: 文字和边框的左右边距。 * `paddingLeftRight`: the text padding of left and right. [defaut: `5f`].
* `paddingTopBottom`: 文字和边框的上下边距。 * `paddingTopBottom`: the text padding of top and bottom. [defaut: `5f`].
* `backgroundImage`: 提示框的背景图。 * `backgroundImage`: The image of icon.
* `ignoreDataDefaultContent`: 被忽略数据的默认显示字符信息。 * `ignoreDataDefaultContent`: The default display character information for ignored data.
* `alwayShow`: 是否触发后一直显示。 * `alwayShow`: Whether to trigger after always display.
* `offset`: `(since v1.5.3)`提示框相对于鼠标位置的偏移。 * `offset`: `(since v1.5.3)`The position offset of tooltip relative to the mouse position.
* `lineStyle`: the line style of indicator line [LineStyle](#LineStyle).
* `lineStyle`: 指示器线条样式 [LineStyle](#LineStyle) * `textStyle`: the text style of content [TextStyle](#TextStyle).
* `textStyle`: 显示内容文本样式 [TextStyle](#TextStyle)。
## `Vessel` ## `Vessel`
容器组件。一般用于LiquidChart。 Vessel component for liquid chart. There can be multiple vessels in a Chart, which can be matched by vesselIndex in Serie.
相关参数: * `show`: Whether to show the vessel. [defaut: `true`]
* `shape`: The shape of vessel. [default: `Shape.Circle`]
* `show`: 是否显示容器组件。 * `shapeWidth`: Thickness of vessel. [defaut: `5f`]
* `shape`: 容器形状。 * `gap`: The gap between the vessel and the liquid. [defaut: `10f`]
* `shapeWidth`: 容器的厚度。 * `center`: The center of vessel. The `center[0]` is the x-coordinate, and the `center[1]` is the y-coordinate. When value between `0` and `1` represents a percentage relative to the chart. [default: `[0.5f,0.45f]`]
* `gap`: 间隙。容器和液体的间隙。 * `radius`: The radius of vessel. When value between 0 and 1 represents a percentage relative to the chart. [default: `0.35f`]
* `center`: 中心点。数组的第一项是横坐标第二项是纵坐标。当值为0-1之间时表示百分比设置成百分比时表示图表宽高最小值的百分比。 * `smoothness`: The smoothness of wave. [default: `1f`]
* `radius`: 半径。 * `backgroundColor`: Background color of polar, which is transparent by default. [default: `Color.clear`]
* `smoothness`: 开启或关闭缩放区域功能。 * `color`: Vessel color. The default is consistent with Serie. [default: `Color32(70, 70, 240, 255)`]
* `backgroundColor`: 背景色,默认透明。 * `autoColor`: Whether automatic color. If true, the color matches serie. [default: `true`]
* `color`: 容器颜色。当`autoColor``false`时生效。
* `autoColor`: 是否自动颜色。默认`true`。为`true`时颜色会和`serie`一致。
## `DataZoom` ## `DataZoom`
区域缩放组件。用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。 DataZoom component is used for zooming a specific area, which enables user to investigate data in detail, or get an overview of the data, or get rid of outlier points.
目前只支持控制 `X` 轴。 Currently only the control 'X' axis is supported.
相关参数: * `enable`: Whether to show dataZoom.
* `supportInside`: Whether built-in support is supported. Built into the coordinate system to allow the user to zoom in and out of the coordinate system by mouse dragging, mouse wheel, finger swiping (on the touch screen).
* `enable`: 开启或关闭缩放区域功能。 * `supportSlider`: Whether a slider is supported. There are separate sliders on which the user zooms or roams.
* `supportInside`: 是否支持内置缩放。内置于坐标系中,可在坐标系上通过鼠标拖拽、鼠标滚轮、手指滑动(触屏上)来缩放或漫游坐标系。 * ~~`filterMode`: The mode of data filter, not support yet.~~
* `supportSlider`: 是否支持滑动条缩放。有单独的滑动条,可在滑动条上进行缩放或漫游。 * ~~`Filter`: data that outside the window will be filtered, which may lead to some changes of windows of other axes. For each data item, it will be filtered if one of the relevant dimensions is out of the window.~~
* ~~`filterMode`: 数据过滤,暂未启用。支持以下几种类型: ~~ * ~~`WeakFilter`: data that outside the window will be filtered, which may lead to some changes of windows of other axes. For each data item, it will be filtered only if all of the relevant dimensions are out of the same side of the window.~~
* ~~`Filter`: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。~~ * ~~`Empty`: data that outside the window will be set to NaN, which will not lead to changes of windows of other axes.~~
* ~~`WeakFilter`: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。~~ * ~~`None`: Do not filter data.~~
* ~~`Empty`: 当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。~~ * ~~`xAxisIndex`: Specify which xAxis is controlled by the dataZoom.~~
* ~~`None`: 不过滤数据,只改变数轴范围。~~ * ~~`yAxisIndex`: Specify which yAxis is controlled by the dataZoom.~~
* ~~`xAxisIndex`: 控制哪一个 `x` 轴。~~ * `showDataShadow`: Whether to show data shadow, to indicate the data tendency in brief. [default: `true`]
* ~~`yAxisIndex`: 控制哪一个 `y` 轴。~~ * `showDetail`: Whether to show detail, that is, show the detailed data information when dragging. [default: `false`]
* `showDataShadow`: 是否显示数据阴影。数据阴影可以简单地反应数据走势。 * `zoomLock`: Specify whether to lock the size of window (selected area). [default: `false`]
* `showDetail`: 是否显示 `detail`,即拖拽时候显示详细数值信息。 * ~~`realtime`: Whether to show data shadow in dataZoom-silder component, to indicate the data tendency in brief. [default: `true`]~~
* `zoomLock`: 是否锁定选择区域(或叫做数据窗口)的大小。如果设置为 `true` 则锁定选择区域的大小,也就是说,只能平移,不能缩放。 * ~~`backgroundColor`: The background color of the component.~~
* ~~`realtime`: 拖动时,是否实时更新系列的视图。如果设置为 `false`,则只在拖拽结束的时候更新。~~ * `bottom`: Distance between dataZoom component and the bottom side of the container. bottom value is a instant pixel value like 10. [default: `10f`]
* ~~`backgroundColor`: 组件的背景颜色。~~ * `height`: The height of dataZoom component. height value is a instant pixel value like 10. [default: `50f`]
* `bottom`: 组件离容器下侧的距离。 * `rangeMode`: Use absolute value or percent value in `DataZoom.start` and `DataZoom.end`. [default: `RangeMode.Percent`].
* `height`: 组件高度。 * `Percent`: percent.
* `rangeMode`: 取值类型是取绝对值还是百分比。 * `start`: The start percentage of the window out of the data extent, in the range of `0 ~ 100`. [default: `30f`]
* `Percent`: 百分比。 * `end`: The end percentage of the window out of the data extent, in the range of 0 ~ 100. [default: `70f`]
* `start`: 数据窗口范围的起始百分比。范围是: 0 ~ 100。 * `scrollSensitivity`: The sensitivity of dataZoom scroll. The larger the number, the more sensitive it is. [default: `10f`]
* `end`: 数据窗口范围的结束百分比。范围是: 0 ~ 100。 * `fontSize`: font size of datazoom label.
* `scrollSensitivity`: 缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。 * `fontStyle`: font style of datazoom label.
* `fontSize`: 字体大小。 * `minShowNum`: Minimum number of display data. Minimum number of data displayed when DataZoom is enlarged to maximum. [default: `1`]
* `fontStyle`: 字体样式。
* `minShowNum`: 最小显示数据个数。当DataZoom放大到最大时最小显示的数据个数。
## `VisualMap` ## `VisualMap`
视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。 VisualMap component. mapping data to visual elements such as colors.
* `enable`: 开启或关闭视觉映射功能。 * `enable`: Whether enable visualMap component. [default: false]
* `show`: 是否显示组件。如果设置为 `false`,不会显示,但是数据映射的功能还存在。 * `show`: Whether to display components. If set to false, it will not show up, but the data mapping function still exists. [default: true]
* `type`: 组件类型。支持以下类型: * `type`: the type of visualmap component.
* `Continuous`: 连续型。 * `Continuous`: Continuous.
* ~~`Piecewise`: 分段型。~~ * ~~`Piecewise`: Piecewise.~~
* ~~`selectedMode`: 分段型的选择模式,支持以下模式: ~~ * ~~`selectedMode`: the selected mode for Piecewise visualMap.~~
* ~~`Multiple`: 多选。~~ * ~~`Multiple`: Multiple.~~
* ~~`Single`: 单选。~~ * ~~`Single`: Single.~~
* `min`: 允许的最小值。'min' 必须用户指定。[visualMap.min, visualMap.max] 形成了视觉映射的『定义域』。 * `min`: The minimum allowed. `min` must be user specified. `[min, max]` forms the domain of the visualMap.
* `max`: 允许的最大值。'max' 必须用户指定。[visualMap.min, visualMax.max] 形成了视觉映射的『定义域』。 * `max`: The maximum allowed. `max` must be user specified. `[min, max]` forms the domain of the visualMap.
* `range`: 指定手柄对应数值的位置。range 应在 min max 范围内。 * `range`: Specifies the position of the numeric value corresponding to the handle. Range should be within the range of [min,max].
* ~~`text`: 两端的文本,如 ['High', 'Low']~~ * ~~`text`: Text on both ends. such as ['High', 'Low'].~~
* ~~`textGap`: 两端文字主体之间的距离单位为px。~~ * ~~`textGap`: The distance between the two text bodies.~~
* `splitNumber`: 对于连续型数据自动平均切分成几段默认为0时自动匹配inRange颜色列表大小。 * `splitNumber`: For continuous data, it is automatically evenly divided into several segments and automatically matches the size of inRange color list when the default is 0.
* `calculable`: 是否显示拖拽用的手柄(手柄能拖拽调整选中范围)。 * `calculable`: Whether the handle used for dragging is displayed (the handle can be dragged to adjust the selected range).
* ~~`realtime`: 拖拽时,是否实时更新。~~ * ~~`realtime`: Whether to update in real time while dragging.~~
* `itemWidth`: 图形的宽度,即颜色条的宽度。 * `itemWidth`: The width of the figure, that is, the width of the color bar.
* `itemHeight`: 图形的高度,即颜色条的高度。 * `itemHeight`: The height of the figure, that is, the height of the color bar.
* `borderWidth`: 边框线宽单位px。 * `borderWidth`: 边框线宽单位px。
* `dimension`: 指定用数据的『哪个维度』,映射到视觉元素上。『数据』即 series.data。从1开始默认为0取 data 中最后一个维度。 * `dimension`: Specifies which `dimension` of the `Data` to map to the visual element. `Data` is series.data. Starting at 1, the default is 0 to take the last dimension in data.
* `hoverLink`: 打开 hoverLink 功能时,鼠标悬浮到 visualMap 组件上时,鼠标位置对应的数值 在 图表中对应的图形元素,会高亮。 * `hoverLink`: When the hoverLink function is turned on, when the mouse hovers over the visualMap component, the corresponding value of the mouse position is highlighted in the corresponding graphic element in the diagram. Conversely, when the mouse hovers over a graphic element in a diagram, the corresponding value of the visualMap component is triangulated in the corresponding position.
* `orient`: 布局方式是横还是竖。 * `orient`: Is the layout horizontal or vertical.
* `location`: 组件显示在图表中的位置。 * `location`: The location of component.
* `inRange`: 定义 在选中范围中 的视觉颜色。 * `inRange`: Defines the visual color in the selected range.
* ~~`outOfRange`: 定义 在选中范围外 的视觉颜色。~~ * ~~`outOfRange`: Defines a visual color outside of the selected range.~~
## `Grid` ## `Grid`

View File

@@ -14,6 +14,7 @@ namespace XCharts
/// DataZoom component is used for zooming a specific area, /// DataZoom component is used for zooming a specific area,
/// which enables user to investigate data in detail, /// which enables user to investigate data in detail,
/// or get an overview of the data, or get rid of outlier points. /// or get an overview of the data, or get rid of outlier points.
///
/// <para>DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。</para> /// <para>DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。</para>
/// </summary> /// </summary>
[System.Serializable] [System.Serializable]
@@ -23,6 +24,7 @@ namespace XCharts
/// Generally dataZoom component zoom or roam coordinate system through data filtering /// Generally dataZoom component zoom or roam coordinate system through data filtering
/// and set the windows of axes internally. /// and set the windows of axes internally.
/// Its behaviours vary according to filtering mode settings. /// Its behaviours vary according to filtering mode settings.
///
/// dataZoom 的运行原理是通过 数据过滤 来达到 数据窗口缩放 的效果。数据过滤模式的设置不同,效果也不同。 /// dataZoom 的运行原理是通过 数据过滤 来达到 数据窗口缩放 的效果。数据过滤模式的设置不同,效果也不同。
/// </summary> /// </summary>
public enum FilterMode public enum FilterMode
@@ -30,17 +32,20 @@ namespace XCharts
/// <summary> /// <summary>
/// data that outside the window will be filtered, which may lead to some changes of windows of other axes. /// data that outside the window will be filtered, which may lead to some changes of windows of other axes.
/// For each data item, it will be filtered if one of the relevant dimensions is out of the window. /// For each data item, it will be filtered if one of the relevant dimensions is out of the window.
///
/// 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。 /// 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。
/// </summary> /// </summary>
Filter, Filter,
/// <summary> /// <summary>
/// data that outside the window will be filtered, which may lead to some changes of windows of other axes. /// data that outside the window will be filtered, which may lead to some changes of windows of other axes.
/// For each data item, it will be filtered only if all of the relevant dimensions are out of the same side of the window. /// For each data item, it will be filtered only if all of the relevant dimensions are out of the same side of the window.
///
/// 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。 /// 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。
/// </summary> /// </summary>
WeakFilter, WeakFilter,
/// <summary> /// <summary>
/// data that outside the window will be set to NaN, which will not lead to changes of windows of other axes. /// data that outside the window will be set to NaN, which will not lead to changes of windows of other axes.
///
/// 当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。 /// 当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。
/// </summary> /// </summary>
Empty, Empty,
@@ -123,6 +128,10 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_YAxisIndex, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_YAxisIndex, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Whether built-in support is supported.
/// Built into the coordinate system to allow the user to zoom in and out of the coordinate system by mouse dragging,
/// mouse wheel, finger swiping (on the touch screen).
///
/// 是否支持内置。内置于坐标系中,使用户可以在坐标系上通过鼠标拖拽、鼠标滚轮、手指滑动(触屏上)来缩放或漫游坐标系。 /// 是否支持内置。内置于坐标系中,使用户可以在坐标系上通过鼠标拖拽、鼠标滚轮、手指滑动(触屏上)来缩放或漫游坐标系。
/// </summary> /// </summary>
public bool supportInside public bool supportInside
@@ -131,6 +140,7 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_SupportInside, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_SupportInside, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Whether a slider is supported. There are separate sliders on which the user zooms or roams.
/// 是否支持滑动条。有单独的滑动条,用户在滑动条上进行缩放或漫游。 /// 是否支持滑动条。有单独的滑动条,用户在滑动条上进行缩放或漫游。
/// </summary> /// </summary>
public bool supportSlider public bool supportSlider
@@ -159,6 +169,7 @@ namespace XCharts
/// <summary> /// <summary>
/// Whether to show detail, that is, show the detailed data information when dragging. /// Whether to show detail, that is, show the detailed data information when dragging.
/// 是否显示detail即拖拽时候显示详细数值信息。 /// 是否显示detail即拖拽时候显示详细数值信息。
/// [default: false]
/// </summary> /// </summary>
public bool showDetail public bool showDetail
{ {
@@ -225,7 +236,7 @@ namespace XCharts
} }
/// <summary> /// <summary>
/// The start percentage of the window out of the data extent, in the range of 0 ~ 100. /// The start percentage of the window out of the data extent, in the range of 0 ~ 100.
/// default:30 /// [default:30].
/// 数据窗口范围的起始百分比。范围是0 ~ 100。 /// 数据窗口范围的起始百分比。范围是0 ~ 100。
/// </summary> /// </summary>
public float start public float start
@@ -244,6 +255,7 @@ namespace XCharts
set { m_End = value; if (m_End < 0) m_End = 0; if (m_End > 100) m_End = 100; SetVerticesDirty(); } set { m_End = value; if (m_End < 0) m_End = 0; if (m_End > 100) m_End = 100; SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Minimum number of display data. Minimum number of data displayed when DataZoom is enlarged to maximum.
/// 最小显示数据个数。当DataZoom放大到最大时最小显示的数据个数。 /// 最小显示数据个数。当DataZoom放大到最大时最小显示的数据个数。
/// </summary> /// </summary>
public int minShowNum public int minShowNum

View File

@@ -140,18 +140,22 @@ namespace XCharts
public string itemFormatter { get { return m_ItemFormatter; } set { m_ItemFormatter = value; } } public string itemFormatter { get { return m_ItemFormatter; } set { m_ItemFormatter = value; } }
/// <summary> /// <summary>
/// Fixed width. Higher priority than minWidth.
/// 固定宽度。比 minWidth 优先。 /// 固定宽度。比 minWidth 优先。
/// </summary> /// </summary>
public float fixedWidth { get { return m_FixedWidth; } set { m_FixedWidth = value; } } public float fixedWidth { get { return m_FixedWidth; } set { m_FixedWidth = value; } }
/// <summary> /// <summary>
/// Fixed height. Higher priority than minHeight.
/// 固定高度。比 minHeight 优先。 /// 固定高度。比 minHeight 优先。
/// </summary> /// </summary>
public float fixedHeight { get { return m_FixedHeight; } set { m_FixedHeight = value; } } public float fixedHeight { get { return m_FixedHeight; } set { m_FixedHeight = value; } }
/// <summary> /// <summary>
/// Minimum width. If fixedWidth has a value, get fixedWidth first.
/// 最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。 /// 最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。
/// </summary> /// </summary>
public float minWidth { get { return m_MinWidth; } set { m_MinWidth = value; } } public float minWidth { get { return m_MinWidth; } set { m_MinWidth = value; } }
/// <summary> /// <summary>
/// Minimum height. If fixedHeight has a value, take priority over fixedHeight.
/// 最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。 /// 最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。
/// </summary> /// </summary>
public float minHeight { get { return m_MinHeight; } set { m_MinHeight = value; } } public float minHeight { get { return m_MinHeight; } set { m_MinHeight = value; } }
@@ -185,6 +189,7 @@ namespace XCharts
/// </summary> /// </summary>
public float paddingTopBottom { get { return m_PaddingTopBottom; } set { m_PaddingTopBottom = value; } } public float paddingTopBottom { get { return m_PaddingTopBottom; } set { m_PaddingTopBottom = value; } }
/// <summary> /// <summary>
/// The default display character information for ignored data.
/// 被忽略数据的默认显示字符信息。 /// 被忽略数据的默认显示字符信息。
/// </summary> /// </summary>
public string ignoreDataDefaultContent { get { return m_IgnoreDataDefaultContent; } set { m_IgnoreDataDefaultContent = value; } } public string ignoreDataDefaultContent { get { return m_IgnoreDataDefaultContent; } set { m_IgnoreDataDefaultContent = value; } }
@@ -194,14 +199,17 @@ namespace XCharts
/// </summary> /// </summary>
public Sprite backgroundImage { get { return m_BackgroundImage; } set { m_BackgroundImage = value; SetBackground(m_BackgroundImage); } } public Sprite backgroundImage { get { return m_BackgroundImage; } set { m_BackgroundImage = value; SetBackground(m_BackgroundImage); } }
/// <summary> /// <summary>
/// Whether to trigger after always display.
/// 是否触发后一直显示。 /// 是否触发后一直显示。
/// </summary> /// </summary>
public bool alwayShow { get { return m_AlwayShow; } set { m_AlwayShow = value; } } public bool alwayShow { get { return m_AlwayShow; } set { m_AlwayShow = value; } }
/// <summary> /// <summary>
/// The position offset of tooltip relative to the mouse position.
/// 提示框相对于鼠标位置的偏移。 /// 提示框相对于鼠标位置的偏移。
/// </summary> /// </summary>
public Vector2 offset { get { return m_Offset; } set { m_Offset = value; } } public Vector2 offset { get { return m_Offset; } set { m_Offset = value; } }
/// <summary> /// <summary>
/// the text style of content.
/// 提示框内容文本样式。 /// 提示框内容文本样式。
/// </summary> /// </summary>
public TextStyle textStyle public TextStyle textStyle
@@ -210,6 +218,7 @@ namespace XCharts
set { if (value != null) { m_TextStyle = value; SetComponentDirty(); } } set { if (value != null) { m_TextStyle = value; SetComponentDirty(); } }
} }
/// <summary> /// <summary>
/// the line style of indicator line.
/// 指示线样式。 /// 指示线样式。
/// </summary> /// </summary>
public LineStyle lineStyle public LineStyle lineStyle

View File

@@ -11,10 +11,10 @@ using UnityEngine;
namespace XCharts namespace XCharts
{ {
/// <summary> /// <summary>
/// Vessel component for liquid chart. /// Vessel component for liquid chart. There can be multiple vessels in a Chart, which can be matched by vesselIndex in Serie.
/// <para> /// <para>
/// 容器组件。 /// 容器组件。
/// 一般用于LiquidChart。可以有多个VesselSerie中用vesselIndex来对应。 /// 一般用于LiquidChart。一个Chart中可以有多个VesselSerie中用vesselIndex来对应。
/// </para> /// </para>
/// </summary> /// </summary>
[Serializable] [Serializable]
@@ -57,6 +57,7 @@ namespace XCharts
/// <summary> /// <summary>
/// Whether to show the vessel. /// Whether to show the vessel.
/// 是否显示容器组件。 /// 是否显示容器组件。
/// [defaut: true]
/// </summary> /// </summary>
public bool show public bool show
{ {
@@ -66,6 +67,7 @@ namespace XCharts
/// <summary> /// <summary>
/// The shape of vessel. /// The shape of vessel.
/// 容器形状。 /// 容器形状。
/// [default: Shape.Circle]
/// </summary> /// </summary>
public Shape shape public Shape shape
{ {
@@ -75,6 +77,7 @@ namespace XCharts
/// <summary> /// <summary>
/// Thickness of vessel. /// Thickness of vessel.
/// 容器厚度。 /// 容器厚度。
/// [defaut: 5f]
/// </summary> /// </summary>
public float shapeWidth public float shapeWidth
{ {
@@ -84,6 +87,7 @@ namespace XCharts
/// <summary> /// <summary>
/// The gap between the vessel and the liquid. /// The gap between the vessel and the liquid.
/// 间隙。容器和液体的间隙。 /// 间隙。容器和液体的间隙。
/// [defaut: 10f]
/// </summary> /// </summary>
public float gap public float gap
{ {
@@ -91,8 +95,11 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_Gap, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_Gap, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// The center of vesselß. The center[0] is the x-coordinate, and the center[1] is the y-coordinate.
/// When value between 0 and 1 represents a percentage relative to the chart.
/// 中心点。数组的第一项是横坐标,第二项是纵坐标。 /// 中心点。数组的第一项是横坐标,第二项是纵坐标。
/// 当值为0-1之间时表示百分比设置成百分比时表示图表宽高最小值的百分比。 /// 当值为0-1之间时表示百分比设置成百分比时表示图表宽高最小值的百分比。
/// [default:[0.5f,0.45f]]
/// </summary> /// </summary>
public float[] center public float[] center
{ {
@@ -101,7 +108,9 @@ namespace XCharts
} }
/// <summary> /// <summary>
/// The radius of vessel. /// The radius of vessel.
/// When value between 0 and 1 represents a percentage relative to the chart.
/// 半径。 /// 半径。
/// [default: 0.35f]
/// </summary> /// </summary>
public float radius public float radius
{ {
@@ -111,6 +120,7 @@ namespace XCharts
/// <summary> /// <summary>
/// The smoothness of wave. /// The smoothness of wave.
/// 水波平滑度。 /// 水波平滑度。
/// [default: 1f]
/// </summary> /// </summary>
public float smoothness public float smoothness
{ {
@@ -120,6 +130,7 @@ namespace XCharts
/// <summary> /// <summary>
/// Background color of polar, which is transparent by default. /// Background color of polar, which is transparent by default.
/// 背景色,默认透明。 /// 背景色,默认透明。
/// [default: `Color.clear`]
/// </summary> /// </summary>
public Color backgroundColor public Color backgroundColor
{ {
@@ -127,6 +138,7 @@ namespace XCharts
set { if (PropertyUtility.SetColor(ref m_BackgroundColor, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetColor(ref m_BackgroundColor, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Vessel color. The default is consistent with Serie.
/// 容器颜色。默认和serie一致。 /// 容器颜色。默认和serie一致。
/// </summary> /// </summary>
public Color color public Color color
@@ -135,7 +147,9 @@ namespace XCharts
set { if (PropertyUtility.SetColor(ref m_Color, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetColor(ref m_Color, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Whether automatic color. If true, the color matches serie.
/// 是否自动颜色。为true时颜色会和serie一致。 /// 是否自动颜色。为true时颜色会和serie一致。
/// [default: true]
/// </summary> /// </summary>
public bool autoColor public bool autoColor
{ {

View File

@@ -11,7 +11,7 @@ using UnityEngine;
namespace XCharts namespace XCharts
{ {
/// <summary> /// <summary>
/// VisualMap component. /// VisualMap component. Mapping data to visual elements such as colors.
/// 视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。 /// 视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。
/// </summary> /// </summary>
[System.Serializable] [System.Serializable]
@@ -71,7 +71,11 @@ namespace XCharts
[SerializeField] private List<Color> m_OutOfRange = new List<Color>(); [SerializeField] private List<Color> m_OutOfRange = new List<Color>();
/// <summary> /// <summary>
/// Whether enable visualMap component.
///
/// 是否开启组件功能。 /// 是否开启组件功能。
///
/// [default: false]
/// </summary> /// </summary>
public bool enable public bool enable
{ {
@@ -79,7 +83,11 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_Enable, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_Enable, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Whether to display components. If set to false, it will not show up, but the data mapping function still exists.
///
/// 是否显示组件。如果设置为 false不会显示但是数据映射的功能还存在。 /// 是否显示组件。如果设置为 false不会显示但是数据映射的功能还存在。
///
/// [default: true]
/// </summary> /// </summary>
public bool show public bool show
{ {
@@ -87,6 +95,7 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_Enable, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_Enable, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// the type of visualmap component.
/// 组件类型。 /// 组件类型。
/// </summary> /// </summary>
public Type type public Type type
@@ -95,6 +104,7 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_Type, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_Type, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// the selected mode for Piecewise visualMap.
/// 选择模式。 /// 选择模式。
/// </summary> /// </summary>
public SelectedMode selectedMode public SelectedMode selectedMode
@@ -103,6 +113,8 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_SelectedMode, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_SelectedMode, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// The minimum allowed. 'min' must be user specified. [visualmap.min, visualmap.max] forms the "domain" of the visualMap.
///
/// 允许的最小值。'min' 必须用户指定。[visualMap.min, visualMap.max] 形成了视觉映射的『定义域』。 /// 允许的最小值。'min' 必须用户指定。[visualMap.min, visualMap.max] 形成了视觉映射的『定义域』。
/// </summary> /// </summary>
public float min public float min
@@ -111,6 +123,8 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_Min, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_Min, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// The maximum allowed. 'max' must be user specified. [visualmap.min, visualmap.max] forms the "domain" of the visualMap.
///
/// 允许的最大值。'max' 必须用户指定。[visualMap.min, visualMax.max] 形成了视觉映射的『定义域』。 /// 允许的最大值。'max' 必须用户指定。[visualMap.min, visualMax.max] 形成了视觉映射的『定义域』。
/// </summary> /// </summary>
public float max public float max
@@ -119,18 +133,25 @@ namespace XCharts
set { m_Max = value < min ? min + 1 : value; SetVerticesDirty(); } set { m_Max = value < min ? min + 1 : value; SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// 指定手柄对应数值的位置。range 应在 min max 范围内。 /// Specifies the position of the numeric value corresponding to the handle. Range should be within the range of [min,max].
///
/// 指定手柄对应数值的位置。range 应在[min,max]范围内。
/// </summary> /// </summary>
public float[] range { get { return m_Range; } } public float[] range { get { return m_Range; } }
/// <summary> /// <summary>
/// Text on both ends.
/// 两端的文本,如 ['High', 'Low']。 /// 两端的文本,如 ['High', 'Low']。
/// </summary> /// </summary>
public string[] text { get { return m_Text; } } public string[] text { get { return m_Text; } }
/// <summary> /// <summary>
/// The distance between the two text bodies.
/// 两端文字主体之间的距离单位为px。 /// 两端文字主体之间的距离单位为px。
/// </summary> /// </summary>
public float[] textGap { get { return m_TextGap; } } public float[] textGap { get { return m_TextGap; } }
/// <summary> /// <summary>
/// For continuous data, it is automatically evenly divided into several segments
/// and automatically matches the size of inRange color list when the default is 0.
///
/// 对于连续型数据自动平均切分成几段默认为0时自动匹配inRange颜色列表大小。 /// 对于连续型数据自动平均切分成几段默认为0时自动匹配inRange颜色列表大小。
/// </summary> /// </summary>
/// <value></value> /// <value></value>
@@ -140,6 +161,8 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_SplitNumber, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_SplitNumber, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Whether the handle used for dragging is displayed (the handle can be dragged to adjust the selected range).
///
/// 是否显示拖拽用的手柄(手柄能拖拽调整选中范围)。 /// 是否显示拖拽用的手柄(手柄能拖拽调整选中范围)。
/// </summary> /// </summary>
public bool calculable public bool calculable
@@ -148,6 +171,8 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_Calculable, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_Calculable, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Whether to update in real time while dragging.
///
/// 拖拽时,是否实时更新。 /// 拖拽时,是否实时更新。
/// </summary> /// </summary>
public bool realtime public bool realtime
@@ -156,6 +181,8 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_Realtime, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_Realtime, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// The width of the figure, that is, the width of the color bar.
///
/// 图形的宽度,即颜色条的宽度。 /// 图形的宽度,即颜色条的宽度。
/// </summary> /// </summary>
public float itemWidth public float itemWidth
@@ -164,6 +191,8 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_ItemWidth, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_ItemWidth, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// The height of the figure, that is, the height of the color bar.
///
/// 图形的高度,即颜色条的高度。 /// 图形的高度,即颜色条的高度。
/// </summary> /// </summary>
public float itemHeight public float itemHeight
@@ -172,6 +201,8 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_ItemHeight, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_ItemHeight, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Border line width.
///
/// 边框线宽单位px。 /// 边框线宽单位px。
/// </summary> /// </summary>
public float borderWidth public float borderWidth
@@ -180,6 +211,9 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_BorderWidth, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_BorderWidth, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Specifies "which dimension" of the data to map to the visual element. "Data" is series.data.
/// Starting at 1, the default is 0 to take the last dimension in data.
///
/// 指定用数据的『哪个维度』,映射到视觉元素上。『数据』即 series.data。从1开始默认为0取 data 中最后一个维度。 /// 指定用数据的『哪个维度』,映射到视觉元素上。『数据』即 series.data。从1开始默认为0取 data 中最后一个维度。
/// </summary> /// </summary>
public int dimension public int dimension
@@ -188,6 +222,11 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_Dimension, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetStruct(ref m_Dimension, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// When the hoverLink function is turned on, when the mouse hovers over the visualMap component,
/// the corresponding value of the mouse position is highlighted in the corresponding graphic element in the diagram.
/// Conversely, when the mouse hovers over a graphic element in a diagram,
/// the corresponding value of the visualMap component is triangulated in the corresponding position.
///
/// 打开 hoverLink 功能时,鼠标悬浮到 visualMap 组件上时,鼠标位置对应的数值 在 图表中对应的图形元素,会高亮。 /// 打开 hoverLink 功能时,鼠标悬浮到 visualMap 组件上时,鼠标位置对应的数值 在 图表中对应的图形元素,会高亮。
/// 反之,鼠标悬浮到图表中的图形元素上时,在 visualMap 组件的相应位置会有三角提示其所对应的数值。 /// 反之,鼠标悬浮到图表中的图形元素上时,在 visualMap 组件的相应位置会有三角提示其所对应的数值。
/// </summary> /// </summary>
@@ -199,6 +238,7 @@ namespace XCharts
} }
/// <summary> /// <summary>
/// Specify whether the layout of component is horizontal or vertical. /// Specify whether the layout of component is horizontal or vertical.
///
/// 布局方式是横还是竖。 /// 布局方式是横还是竖。
/// </summary> /// </summary>
public Orient orient public Orient orient
@@ -216,6 +256,7 @@ namespace XCharts
set { if (PropertyUtility.SetClass(ref m_Location, value)) SetVerticesDirty(); } set { if (PropertyUtility.SetClass(ref m_Location, value)) SetVerticesDirty(); }
} }
/// <summary> /// <summary>
/// Defines the visual color in the selected range.
/// 定义 在选中范围中 的视觉颜色。 /// 定义 在选中范围中 的视觉颜色。
/// </summary> /// </summary>
public List<Color> inRange public List<Color> inRange
@@ -224,6 +265,7 @@ namespace XCharts
set { if (value != null) { m_InRange = value; SetVerticesDirty(); } } set { if (value != null) { m_InRange = value; SetVerticesDirty(); } }
} }
/// <summary> /// <summary>
/// Defines a visual color outside of the selected range.
/// 定义 在选中范围外 的视觉颜色。 /// 定义 在选中范围外 的视觉颜色。
/// </summary> /// </summary>
public List<Color> outOfRange public List<Color> outOfRange