From 87049b5170ccdc93fda52596c500b6c21782d864 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Wed, 15 Jun 2022 07:36:05 +0800 Subject: [PATCH] [doc] update comment and doc --- Documentation/XChartsAPI-EN.md | 11 +- Documentation/XChartsAPI-ZH.md | 11 +- Documentation/XChartsConfiguration-EN.md | 147 ++++++++---------- Documentation/XChartsConfiguration-ZH.md | 143 ++++++++--------- Editor/ChildComponents/AnimationDrawer.cs | 1 - Runtime/Component/Animation/AnimationStyle.cs | 3 +- Runtime/Component/Axis/Axis.cs | 2 +- Runtime/Component/Axis/AxisSplitArea.cs | 2 +- Runtime/Component/Axis/AxisSplitLine.cs | 9 +- .../Component/Axis/SingleAxis/SingleAxis.cs | 8 + Runtime/Component/Child/LevelStyle.cs | 10 +- Runtime/Component/Child/LineStyle.cs | 4 +- Runtime/Component/Child/SymbolStyle.cs | 4 + Runtime/Component/Child/TextPadding.cs | 21 ++- Runtime/Component/Child/TextStyle.cs | 18 ++- Runtime/Component/Comment/CommentItem.cs | 8 + Runtime/Component/Comment/CommentMarkStyle.cs | 8 +- Runtime/Component/DataZoom/DataZoom.cs | 8 +- Runtime/Component/Emphasis/Emphasis.cs | 3 + Runtime/Component/Legend/Legend.cs | 4 + Runtime/Component/Mark/MarkArea.cs | 35 ++++- Runtime/Component/Mark/MarkLine.cs | 6 +- Runtime/Component/Tooltip/Tooltip.cs | 32 +++- .../Internal/Attributes/IgnoreDocAttribute.cs | 12 ++ .../Attributes/IgnoreDocAttribute.cs.meta | 11 ++ Runtime/Serie/Serie.ExtraComponent.cs | 18 +-- Runtime/Serie/Serie.cs | 14 +- Runtime/Serie/SerieData.cs | 32 ++-- Runtime/Theme/ComponentTheme.cs | 2 +- Runtime/Theme/Theme.cs | 8 +- 30 files changed, 374 insertions(+), 221 deletions(-) create mode 100644 Runtime/Internal/Attributes/IgnoreDocAttribute.cs create mode 100644 Runtime/Internal/Attributes/IgnoreDocAttribute.cs.meta diff --git a/Documentation/XChartsAPI-EN.md b/Documentation/XChartsAPI-EN.md index f625d76a..17c71366 100644 --- a/Documentation/XChartsAPI-EN.md +++ b/Documentation/XChartsAPI-EN.md @@ -33,6 +33,7 @@ - [FormatterHelper](#FormatterHelper) - [GridCoordContext](#GridCoordContext) - [HeatmapChart](#HeatmapChart) +- [IgnoreDoc](#IgnoreDoc) - [InteractData](#InteractData) - [LayerHelper](#LayerHelper) - [LegendContext](#LegendContext) @@ -501,6 +502,14 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext) Inherits or Implemented: [BaseChart](#BaseChart) +## `IgnoreDoc` + +Inherits or Implemented: [Attribute](#Attribute) + +|public method|description| +|--|--| +| `IgnoreDoc()` |public IgnoreDoc()
| + ## `InteractData` |public method|description| @@ -534,7 +543,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext) |--|--| | `CheckDataHighlighted()` |public static bool CheckDataHighlighted(Serie serie, string legendName, bool heighlight)
| | `CheckDataShow()` |public static bool CheckDataShow(Serie serie, string legendName, bool show)
| -| `GetContentColor()` |public static Color GetContentColor(int legendIndex, Legend legend, ThemeStyle theme, bool active)
| +| `GetContentColor()` |public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)
| | `GetIconColor()` |public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)
| | `ResetItemPosition()` |public static void ResetItemPosition(Legend legend, Vector3 chartPos, float chartWidth, float chartHeight)
| diff --git a/Documentation/XChartsAPI-ZH.md b/Documentation/XChartsAPI-ZH.md index 48b28355..f7603f00 100644 --- a/Documentation/XChartsAPI-ZH.md +++ b/Documentation/XChartsAPI-ZH.md @@ -33,6 +33,7 @@ - [FormatterHelper](#FormatterHelper) - [GridCoordContext](#GridCoordContext) - [HeatmapChart](#HeatmapChart) +- [IgnoreDoc](#IgnoreDoc) - [InteractData](#InteractData) - [LayerHelper](#LayerHelper) - [LegendContext](#LegendContext) @@ -501,6 +502,14 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext) Inherits or Implemented: [BaseChart](#BaseChart) +## `IgnoreDoc` + +Inherits or Implemented: [Attribute](#Attribute) + +|public method|description| +|--|--| +| `IgnoreDoc()` |public IgnoreDoc()
| + ## `InteractData` |public method|description| @@ -534,7 +543,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext) |--|--| | `CheckDataHighlighted()` |public static bool CheckDataHighlighted(Serie serie, string legendName, bool heighlight)
| | `CheckDataShow()` |public static bool CheckDataShow(Serie serie, string legendName, bool show)
| -| `GetContentColor()` |public static Color GetContentColor(int legendIndex, Legend legend, ThemeStyle theme, bool active)
| +| `GetContentColor()` |public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)
| | `GetIconColor()` |public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)
| | `ResetItemPosition()` |public static void ResetItemPosition(Legend legend, Vector3 chartPos, float chartWidth, float chartHeight)
| diff --git a/Documentation/XChartsConfiguration-EN.md b/Documentation/XChartsConfiguration-EN.md index c47e9895..e68a15ed 100644 --- a/Documentation/XChartsConfiguration-EN.md +++ b/Documentation/XChartsConfiguration-EN.md @@ -200,7 +200,6 @@ the animation of serie. | `dataChangeEnable` |true | 是否开启数据变更动画。 | | `dataChangeDuration` |500 | The milliseconds duration of the data change animation. | | `actualDuration` | | The milliseconds actual duration of the first animation. | -| `alongWithLinePath` | | | ## `AreaStyle` @@ -250,7 +249,7 @@ The axis in rectangular coordinate. | `max` | | The maximum value of axis.Valid when `minMaxType` is `Custom` | | `splitNumber` |0 | Number of segments that the axis is split into. | | `interval` |0 | Compulsively set segmentation interval for axis.This is unavailable for category axis. | -| `boundaryGap` |true | | +| `boundaryGap` |true | The boundary gap on both sides of a coordinate axis, which is valid only for category axis with type: 'Category'. | | `maxCache` |0 | The max number of axis data cache. | | `logBase` |10 | Base of logarithm, which is valid only for numeric axes with type: 'Log'. | | `logBaseE` |false | On the log axis, if base e is the natural number, and is true, logBase fails. | @@ -260,7 +259,7 @@ The axis in rectangular coordinate. | `insertDataToHead` | | Whether to add new data at the head or at the end of the list. | | `icons` | | 类目数据对应的图标。 | | `data` | | Category data, available in type: 'Category' axis. | -| `axisLine` | | [AxisLine](AxisLine)| +| `axisLine` | | axis Line. [AxisLine](AxisLine)| | `axisName` | | axis name. [AxisName](AxisName)| | `axisTick` | | axis tick. [AxisTick](AxisTick)| | `axisLabel` | | axis label. [AxisLabel](AxisLabel)| @@ -316,7 +315,7 @@ Split area of axis in grid area, not shown by default. |field|default|comment| |--|--|--| | `show` | | Set this to true to show the splitArea. | -| `color` | | Color of split area. SplitArea color could also be set in color array, which the split lines would take as their colors in turns. | +| `color` | | Color of split area. SplitArea color could also be set in color array, which the split lines would take as their colors in turns. Dark and light colors in turns are used by default. | ## `AxisSplitLine` @@ -326,9 +325,9 @@ Split line of axis in grid area. |field|default|comment| |--|--|--| -| `interval` | | | +| `interval` | | Interval of Axis splitLine. | | `distance` | | The distance between the split line and axis line. | -| `autoColor` | | | +| `autoColor` | | auto color. | ## `AxisTheme` @@ -363,7 +362,7 @@ Background component. | `image` | | the image of background. | | `imageType` | | the fill type of background image. | | `imageColor` | | 背景图颜色。 | -| `hideThemeBackgroundColor` |true | Whether to hide the background color set in the theme when the background component is on. | +| `autoColor` |true | Whether to use theme background color for component color when the background component is on. | ## `Bar` @@ -448,20 +447,20 @@ comment of chart. | `show` |true | Set this to false to prevent this comment item from showing. | | `content` | | content of comment. | | `position` | | position of comment. | -| `markRect` | | | -| `markStyle` | | [CommentMarkStyle](CommentMarkStyle)| +| `markRect` | | the mark rect of comment. | +| `markStyle` | | the mark rect style. [CommentMarkStyle](CommentMarkStyle)| | `labelStyle` | | The text style of all comments. [LabelStyle](LabelStyle)| ## `CommentMarkStyle` Inherits or Implemented: [ChildComponent](#ChildComponent) -comment of chart. +the comment mark style. |field|default|comment| |--|--|--| | `show` |true | Set this to false to prevent this comment item from showing. | -| `lineStyle` | | [LineStyle](LineStyle)| +| `lineStyle` | | line style of comment mark area. [LineStyle](LineStyle)| ## `ComponentTheme` @@ -473,7 +472,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `textColor` | | the color of text. | | `textBackgroundColor` | | the color of text. | | `fontSize` |18 | the font size of text. | -| `tMPFont` | | the font of chart text。 字体。 | +| `tMPFont` | | the font of chart text。 | ## `CoordSystem` @@ -502,7 +501,6 @@ DataZoom component is used for zooming a specific area, which enables user to in | `showDataShadow` | | Whether to show data shadow, to indicate the data tendency in brief. | | `showDetail` | | Whether to show detail, that is, show the detailed data information when dragging. | | `zoomLock` | | Specify whether to lock the size of window (selected area). | -| `realtime` | | | | `fillerColor` | | the color of dataZoom data area. | | `borderColor` | | the color of dataZoom border. | | `borderWidth` | | 边框宽。 | @@ -514,8 +512,6 @@ DataZoom component is used for zooming a specific area, which enables user to in | `rangeMode` | | Use absolute value or percent value in DataZoom.start and DataZoom.end.
`DataZoom.RangeMode`:
- `//Value`: The value type of start and end.取值类型
- `Percent`: percent value.
| | `start` | | The start percentage of the window out of the data extent, in the range of 0 ~ 100. | | `end` | | The end percentage of the window out of the data extent, in the range of 0 ~ 100. | -| `startValue` | | | -| `endValue` | | | | `minShowNum` |1 | Minimum number of display data. Minimum number of data displayed when DataZoom is enlarged to maximum. | | `scrollSensitivity` |1.1f | The sensitivity of dataZoom scroll. The larger the number, the more sensitive it is. | | `orient` | | Specify whether the layout of dataZoom component is horizontal or vertical. What's more, it indicates whether the horizontal axis or vertical axis is controlled by default in catesian coordinate system.
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| @@ -562,7 +558,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent |--|--|--| | `show` | | 是否启用高亮样式。 | | `label` | | 图形文本标签。 [LabelStyle](LabelStyle)| -| `labelLine` | | [LabelLine](LabelLine)| +| `labelLine` | | 图形文本引导线样式。 [LabelLine](LabelLine)| | `itemStyle` | | 图形样式。 [ItemStyle](ItemStyle)| ## `EmphasisItemStyle` @@ -730,12 +726,12 @@ Text label of chart, to explain some data information about graphic item like va |field|default|comment| |--|--|--| | `show` |true | Whether the label is showed. | -| `Position` | | | +| `Position` | | The position of label. | | `autoOffset` |false | 是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 | | `offset` | | offset to the host graphic element. | | `rotate` | | Rotation of label. | | `distance` | | 距离轴线的距离。 | -| `formatter` | | | +| `formatter` | | formatter of label. | | `numericFormatter` | | Standard numeric format strings. | | `width` |0 | the width of label. If set as default value 0, it means than the label width auto set as the text width. | | `height` |0 | the height of label. If set as default value 0, it means than the label height auto set as the text height. | @@ -775,12 +771,12 @@ Legend component.The legend component shows different sets of tags, colors, and | `itemGap` |10f | The distance between each legend, horizontal distance in horizontal layout, and vertical distance in vertical layout. | | `itemAutoColor` |true | Whether the legend symbol matches the color automatically. | | `itemOpacity` |1 | the opacity of item color. | -| `formatter` | | | +| `formatter` | | Legend content string template formatter. Support for wrapping lines with \n. Template:{value}. | | `numericFormatter` | | Standard numeric format strings. | | `labelStyle` | | the style of text. [LabelStyle](LabelStyle)| | `data` | | 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. | | `icons` | | 自定义的图例标记图形。 | -| `colors` | | | +| `colors` | | the colors of legend item. 图例标记的颜色列表。 | ## `LegendTheme` @@ -796,9 +792,9 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) |field|default|comment| |--|--|--| -| `label` | | [LabelStyle](LabelStyle)| -| `upperLabel` | | [LabelStyle](LabelStyle)| -| `itemStyle` | | [ItemStyle](ItemStyle)| +| `label` | | 文本标签样式。 [LabelStyle](LabelStyle)| +| `upperLabel` | | 上方的文本标签样式。 [LabelStyle](LabelStyle)| +| `itemStyle` | | 数据项样式。 [ItemStyle](ItemStyle)| ## `LevelStyle` @@ -837,8 +833,8 @@ The style of line. | `color` | | the color of line, default use serie color. | | `toColor` | | the middle color of line, default use serie color. | | `toColor2` | | the end color of line, default use serie color. | -| `width` |0 | | -| `length` |0 | | +| `width` |0 | the width of line. | +| `length` |0 | the length of line. | | `opacity` |1 | Opacity of the line. Supports value from 0 to 1, and the line will not be drawn when set to 0. | ## `Location` @@ -864,24 +860,28 @@ Inherits or Implemented: [IComparable](#IComparable) Inherits or Implemented: [MainComponent](#MainComponent) +Used to mark an area in chart. For example, mark a time interval. + |field|default|comment| |--|--|--| -| `show` |true | | -| `text` | | | -| `serieIndex` |0 | | -| `start` | | [MarkAreaData](MarkAreaData)| -| `end` | | [MarkAreaData](MarkAreaData)| -| `itemStyle` | | [ItemStyle](ItemStyle)| -| `label` | | [LabelStyle](LabelStyle)| +| `show` |true | 是否显示标域。 | +| `text` | | The text of markArea. 标域显示的文本。 | +| `serieIndex` |0 | Serie index of markArea. 标域影响的Serie索引。 | +| `start` | | 标域范围的起始数据。 [MarkAreaData](MarkAreaData)| +| `end` | | 标域范围的结束数据。 [MarkAreaData](MarkAreaData)| +| `itemStyle` | | 标域样式。 [ItemStyle](ItemStyle)| +| `label` | | 标域文本样式。 [LabelStyle](LabelStyle)| ## `MarkAreaData` Inherits or Implemented: [ChildComponent](#ChildComponent) +标域的数据。 + |field|default|comment| |--|--|--| | `type` | | Special markArea types, are used to label maximum value, minimum value and so on.
`MarkAreaType`:
- `None`: 标域类型
- `Min`: 最小值。
- `Max`: 最大值。
- `Average`: 平均值。
- `Median`: 中位数。
| -| `name` | | | +| `name` | | Name of the marker, which will display as a label. | | `dimension` |1 | From which dimension of data to calculate the maximum and minimum value and so on. | | `xPosition` | | The x coordinate relative to the origin, in pixels. | | `yPosition` | | The y coordinate relative to the origin, in pixels. | @@ -897,7 +897,7 @@ Use a line in the chart to illustrate. |field|default|comment| |--|--|--| | `show` |true | Whether to display the marking line. | -| `serieIndex` |0 | | +| `serieIndex` |0 | The serie index of markLine. | | `animation` | | The animation of markline. [AnimationStyle](AnimationStyle)| | `data` | | A list of marked data. When the group of data item is 0, each data item represents a line; When the group is not 0, two data items of the same group represent the starting point and the ending point of the line respectively to form a line. In this case, the relevant style parameters of the line are the parameters of the starting point. | @@ -905,12 +905,12 @@ Use a line in the chart to illustrate. Inherits or Implemented: [ChildComponent](#ChildComponent) -Data of marking line. 图表标线的数据。 +Data of marking line. |field|default|comment| |--|--|--| | `type` | | Special label types, are used to label maximum value, minimum value and so on.
`MarkLineType`:
- `None`: 标线类型
- `Min`: 最小值。
- `Max`: 最大值。
- `Average`: 平均值。
- `Median`: 中位数。
| -| `name` | | | +| `name` | | Name of the marker, which will display as a label. | | `dimension` |1 | From which dimension of data to calculate the maximum and minimum value and so on. | | `xPosition` | | The x coordinate relative to the origin, in pixels. | | `yPosition` | | The y coordinate relative to the origin, in pixels. | @@ -922,7 +922,6 @@ Data of marking line. 图表标线的数据。 | `endSymbol` | | The symbol of the end point of markline. [SymbolStyle](SymbolStyle)| | `lineStyle` | | The line style of markline. [LineStyle](LineStyle)| | `label` | | Text styles of label. You can set position to Start, Middle, and End to display text in different locations. [LabelStyle](LabelStyle)| -| `emphasis` | | [Emphasis](Emphasis)| ## `Parallel` @@ -1020,15 +1019,6 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) |field|default|comment| |--|--|--| -| `labels` | | | -| `labelLines` | | | -| `endLabels` | | | -| `lineArrows` | | | -| `areaStyles` | | | -| `titleStyles` | | | -| `emphasisItemStyles` | | | -| `emphasisLabels` | | | -| `emphasisLabelLines` | | | | `index` | | The index of serie. | | `show` |true | Whether to show serie in chart. | | `coordSystem` | | the chart coord system of serie. | @@ -1044,7 +1034,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) | `parallelIndex` |0 | Index of parallel coord component that serie uses. | | `minShow` | | The min number of data to show in chart. | | `maxShow` | | The max number of data to show in chart. | -| `maxCache` | | The max number of serie data cache. | +| `maxCache` | | The max number of serie data cache. The first data will be remove when the size of serie data is larger then maxCache. | | `sampleDist` |0 | the min pixel dist of sample. | | `sampleType` | | the type of sample.
`SampleType`:
- `Peak`: Take a peak. When the average value of the filter point is greater than or equal to 'sampleAverage', take the maximum value; If you do it the other way around, you get the minimum.
- `Average`: Take the average of the filter points.
- `Max`: Take the maximum value of the filter point.
- `Min`: Take the minimum value of the filter point.
- `Sum`: Take the sum of the filter points.
| | `sampleAverage` |0 | 设定的采样平均值。当sampleType 为 Peak 时,用于和过滤数据的平均值做对比是取最大值还是最小值。默认为0时会实时计算所有数据的平均值。 | @@ -1052,7 +1042,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) | `barType` | | 柱形图类型。
`BarType`:
- `Normal`: normal bar.
- `Zebra`: zebra bar.
- `Capsule`: capsule bar.
| | `barPercentStack` |false | 柱形图是否为百分比堆积。相同stack的serie只要有一个barPercentStack为true,则就显示成百分比堆叠柱状图。 | | `barWidth` |0 | The width of the bar. Adaptive when default 0. | -| `barGap` |0.1f | The gap between bars between different series, is a percent value like '0.3f' , which means 30% of the bar width, can be set as a fixed value. | +| `barGap` |0.1f | The gap between bars between different series, is a percent value like '0.3f' , which means 30% of the bar width, can be set as a fixed value. Set barGap as '-1' can overlap bars that belong to different series, which is useful when making a series of bar be background. In a single coodinate system, this attribute is shared by multiple 'bar' series. This attribute should be set on the last 'bar' series in the coodinate system, then it will be adopted by all 'bar' series in the coordinate system. | | `barZebraWidth` |4f | 斑马线的粗细。 | | `barZebraGap` |2f | 斑马线的间距。 | | `min` | | 最小值。 | @@ -1072,7 +1062,6 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) | `radius` | | the radius of chart. | | `showDataDimension` | | 数据项里的数据维数。 | | `showDataName` | | 在Editor的inpsector上是否显示name参数 | -| `showDataIcon` | | | | `clip` |false | If clip the overflow on the coordinate system. | | `ignore` |false | 是否开启忽略数据。当为 true 时,数据值为 ignoreValue 时不进行绘制。 | | `ignoreValue` |0 | 忽略数据的默认值。当ignore为true才有效。 | @@ -1105,23 +1094,13 @@ A data item of serie. |field|default|comment| |--|--|--| -| `index` | | | +| `index` | | the index of SerieData. | | `name` | | the name of data item. | -| `id` | | 数据项的唯一id。唯一id不是必须设置的。 | -| `parentId` | | | +| `id` | | the id of data. | +| `parentId` | | the id of parent SerieData. | | `ignore` | | 是否忽略数据。当为 true 时,数据不进行绘制。 | | `selected` | | Whether the data item is selected. | | `radius` | | 自定义半径。可用在饼图中自定义某个数据项的半径。 | -| `itemStyles` | | | -| `labels` | | | -| `labelLines` | | | -| `symbols` | | | -| `lineStyles` | | | -| `areaStyles` | | | -| `titleStyles` | | | -| `emphasisItemStyles` | | | -| `emphasisLabels` | | | -| `emphasisLabelLines` | | | | `data` | | An arbitrary dimension data list of data item. | ## `SerieSymbol` @@ -1211,8 +1190,8 @@ Single axis. | `right` |0.1f | Distance between component and the right side of the container. | | `top` |0f | Distance between component and the top side of the container. | | `bottom` |0.2f | Distance between component and the bottom side of the container. | -| `width` |0 | | -| `height` |50 | | +| `width` |0 | width of axis. | +| `height` |50 | height of axis. | ## `SingleAxisCoord` @@ -1249,7 +1228,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `height` |0f | 图形的高。 | | `offset` |Vector2.zero | 图形的偏移。 | | `image` | | 自定义的标记图形。 | -| `imageType` | | | +| `imageType` | | the fill type of image. | | `color` | | 图形的颜色。 | ## `TextLimit` @@ -1273,11 +1252,11 @@ Settings related to text. |field|default|comment| |--|--|--| -| `show` |true | | -| `top` |2 | | -| `right` |4 | | -| `left` |4 | | -| `bottom` |2 | | +| `show` |true | show padding. 是否显示。 | +| `top` |2 | padding of top. | +| `right` |4 | padding of right. | +| `left` |4 | padding of left. | +| `bottom` |2 | padding of bottom. | ## `TextStyle` @@ -1298,7 +1277,7 @@ Settings related to text. | `fontStyle` | | font style. | | `lineSpacing` |1f | text line spacing. | | `alignment` | | 对齐方式。 | -| `tMPFont` | | | +| `tMPFont` | | the font of textmeshpro. | | `tMPFontStyle` | | | | `tMPAlignment` | | | @@ -1311,9 +1290,9 @@ Theme. |field|default|comment| |--|--|--| | `themeType` | | the theme of chart.
`ThemeType`:
- `Default`: 默认主题。
- `Light`: 亮主题。
- `Dark`: 暗主题。
- `Custom`: 自定义主题。
| -| `themeName` | | | -| `font` | | the font of chart text。 字体。 | -| `tMPFont` | | the font of chart text。 字体。 | +| `themeName` | | the name of theme. | +| `font` | | the font of chart text。 | +| `tMPFont` | | the font of chart text。 | | `contrastColor` | | the contrast color of chart. | | `backgroundColor` | | the background color of chart. | | `colorPalette` | | The color list of palette. If no color is set in series, the colors would be adopted sequentially and circularly from this list as the colors of series. | @@ -1383,7 +1362,7 @@ Tooltip component. | `type` | | Indicator type.
`Painter.Type`:
- `Base`:
- `Serie`:
- `Top`:
| | `trigger` | | Type of triggering.
`Tooltip.Trigger`:
- `Item`: Triggered by data item, which is mainly used for charts that don't have a category axis like scatter charts or pie charts.
- `Axis`: Triggered by axes, which is mainly used for charts that have category axes, like bar charts or line charts.
- `None`: Trigger nothing.
| | `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. | -| `titleFormatter` | | | +| `titleFormatter` | | The string template formatter for the tooltip title content. Support for wrapping lines with \n. The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. 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.
{f} is sum of data.
{.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}"
| | `marker` | | the marker of serie. | | `fixedWidth` |0 | Fixed width. Higher priority than minWidth. | | `fixedHeight` |0 | Fixed height. Higher priority than minHeight. | @@ -1401,17 +1380,17 @@ Tooltip component. | `backgroundType` | | The background type of tooltip. | | `backgroundColor` | | The background color of tooltip. | | `borderWidth` |2f | the width of tooltip border. | -| `fixedXEnable` |false | | -| `fixedX` |0f | | -| `fixedYEnable` |false | | -| `fixedY` |0f | | -| `titleHeight` |25f | | -| `itemHeight` |25f | | +| `fixedXEnable` |false | enable fixedX. | +| `fixedX` |0f | the x positionn of fixedX. | +| `fixedYEnable` |false | enable fixedY. | +| `fixedY` |0f | the y position of fixedY. | +| `titleHeight` |25f | height of title text. | +| `itemHeight` |25f | height of content text. | | `borderColor` |Color32(230, 230, 230, 255) | the color of tooltip border. | | `lineStyle` | | the line style of indicator line. [LineStyle](LineStyle)| | `indicatorLabelStyle` | | the label style of tooltip axis indicator label. [LabelStyle](LabelStyle)| -| `titleLabelStyle` | | 标题的文本样式。 [LabelStyle](LabelStyle)| -| `contentLabelStyles` | | | +| `titleLabelStyle` | | the textstyle of title. [LabelStyle](LabelStyle)| +| `contentLabelStyles` | | the textstyle list of content. | ## `TooltipTheme` @@ -1502,7 +1481,7 @@ Inherits or Implemented: [ScriptableObject](#ScriptableObject) | `lang` | | [Lang](Lang)| | `font` | | | | `tMPFont` | | | -| `fontSizeLv1` |28 | | +| `fontSizeLv1` |28 | 一级字体大小。 | | `fontSizeLv2` |24 | | | `fontSizeLv3` |20 | | | `fontSizeLv4` |18 | | diff --git a/Documentation/XChartsConfiguration-ZH.md b/Documentation/XChartsConfiguration-ZH.md index 650fb991..7f903bfa 100644 --- a/Documentation/XChartsConfiguration-ZH.md +++ b/Documentation/XChartsConfiguration-ZH.md @@ -200,7 +200,6 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `dataChangeEnable` |true | 是否开启数据变更动画。 | | `dataChangeDuration` |500 | 数据变更的动画时长(毫秒)。 | | `actualDuration` | | 实际的动画时长(毫秒)。 | -| `alongWithLinePath` | | | ## `AreaStyle` @@ -250,7 +249,7 @@ Inherits or Implemented: [MainComponent](#MainComponent) | `max` | | 设定的坐标轴刻度最大值,当minMaxType为Custom时有效。 | | `splitNumber` |0 | 坐标轴的期望的分割段数。默认为0表示自动分割。 | | `interval` |0 | 强制设置坐标轴分割间隔。无法在类目轴中使用。 | -| `boundaryGap` |true | | +| `boundaryGap` |true | 坐标轴两边是否留白。只对类目轴有效。 | | `maxCache` |0 | The first data will be remove when the size of axis data is larger then maxCache. | | `logBase` |10 | 对数轴的底数,只在对数轴(type:'Log')中有效。 | | `logBaseE` |false | 对数轴是否以自然数 e 为底数,为 true 时 logBase 失效。 | @@ -260,7 +259,7 @@ Inherits or Implemented: [MainComponent](#MainComponent) | `insertDataToHead` | | 添加新数据时是在列表的头部还是尾部加入。 | | `icons` | | 类目数据对应的图标。 | | `data` | | 类目数据,在类目轴(type: 'category')中有效。 | -| `axisLine` | | [AxisLine](AxisLine)| +| `axisLine` | | 坐标轴轴线。 [AxisLine](AxisLine)| | `axisName` | | 坐标轴名称。 [AxisName](AxisName)| | `axisTick` | | 坐标轴刻度。 [AxisTick](AxisTick)| | `axisLabel` | | 坐标轴刻度标签。 [AxisLabel](AxisLabel)| @@ -316,7 +315,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) |field|default|comment| |--|--|--| | `show` | | 是否显示分隔区域。 | -| `color` | | Dark and light colors in turns are used by default. | +| `color` | | 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。 | ## `AxisSplitLine` @@ -326,9 +325,9 @@ Inherits or Implemented: [BaseLine](#BaseLine) |field|default|comment| |--|--|--| -| `interval` | | | +| `interval` | | 坐标轴分隔线的显示间隔。 | | `distance` | | 刻度线与轴线的距离。 | -| `autoColor` | | | +| `autoColor` | | 自动设置颜色。 | ## `AxisTheme` @@ -363,7 +362,7 @@ Inherits or Implemented: [MainComponent](#MainComponent) | `image` | | 背景图。 | | `imageType` | | 背景图填充类型。 | | `imageColor` | | 背景图颜色。 | -| `hideThemeBackgroundColor` |true | 当background组件开启时,是否隐藏主题中设置的背景色。 | +| `autoColor` |true | 当background组件开启时,是否自动使用主题背景色作为backgrounnd组件的颜色。当设置为false时,用imageColor作为颜色。 | ## `Bar` @@ -448,20 +447,20 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `show` |true | 是否显示当前注解项。 | | `content` | | 注解的文本内容。 | | `position` | | 注解项的位置坐标。 | -| `markRect` | | | -| `markStyle` | | [CommentMarkStyle](CommentMarkStyle)| +| `markRect` | | 注解区域。 | +| `markStyle` | | 注解标记区域样式。 [CommentMarkStyle](CommentMarkStyle)| | `labelStyle` | | 注解项的文本样式。 [LabelStyle](LabelStyle)| ## `CommentMarkStyle` Inherits or Implemented: [ChildComponent](#ChildComponent) -注解项。 +注解项区域样式。 |field|default|comment| |--|--|--| | `show` |true | 是否显示当前注解项。 | -| `lineStyle` | | [LineStyle](LineStyle)| +| `lineStyle` | | 线条样式。 [LineStyle](LineStyle)| ## `ComponentTheme` @@ -473,7 +472,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `textColor` | | 文本颜色。 | | `textBackgroundColor` | | 文本颜色。 | | `fontSize` |18 | 文本字体大小。 | -| `tMPFont` | | the font of chart text。 字体。 | +| `tMPFont` | | 字体。 | ## `CoordSystem` @@ -502,7 +501,6 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息 | `showDataShadow` | | 是否显示数据阴影。数据阴影可以简单地反应数据走势。 | | `showDetail` | | 是否显示detail,即拖拽时候显示详细数值信息。 | | `zoomLock` | | 是否锁定选择区域(或叫做数据窗口)的大小。 如果设置为 true 则锁定选择区域的大小,也就是说,只能平移,不能缩放。 | -| `realtime` | | | | `fillerColor` | | 数据区域颜色。 | | `borderColor` | | 边框颜色。 | | `borderWidth` | | 边框宽。 | @@ -514,8 +512,6 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息 | `rangeMode` | | 取绝对值还是百分比。
`DataZoom.RangeMode`:
- `//Value`: The value type of start and end.取值类型
- `Percent`: 百分比。
| | `start` | | 数据窗口范围的起始百分比。范围是:0 ~ 100。 | | `end` | | 数据窗口范围的结束百分比。范围是:0 ~ 100。 | -| `startValue` | | | -| `endValue` | | | | `minShowNum` |1 | 最小显示数据个数。当DataZoom放大到最大时,最小显示的数据个数。 | | `scrollSensitivity` |1.1f | 缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。 | | `orient` | | 布局方式是横还是竖。不仅是布局方式,对于直角坐标系而言,也决定了,缺省情况控制横向数轴还是纵向数轴。
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| @@ -562,7 +558,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent |--|--|--| | `show` | | 是否启用高亮样式。 | | `label` | | 图形文本标签。 [LabelStyle](LabelStyle)| -| `labelLine` | | [LabelLine](LabelLine)| +| `labelLine` | | 图形文本引导线样式。 [LabelLine](LabelLine)| | `itemStyle` | | 图形样式。 [ItemStyle](ItemStyle)| ## `EmphasisItemStyle` @@ -730,12 +726,12 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent |field|default|comment| |--|--|--| | `show` |true | 是否显示文本标签。 | -| `Position` | | | +| `Position` | | 标签的位置。 | | `autoOffset` |false | 是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 | | `offset` | | 距离图形元素的偏移 | | `rotate` | | 文本的旋转。 | | `distance` | | 距离轴线的距离。 | -| `formatter` | | | +| `formatter` | | 标签内容字符串模版格式器。支持用 \n 换行。 模板变量有: {.}:圆点标记。 {a}:系列名。 {a}:系列名。 {b}:类目值或数据名。 {c}:数据值。 {d}:百分比。 {e}:数据名。 {f}:数据和。 示例:“{b}:{c}” | | `numericFormatter` | | 标准数字格式字符串。用于将数值格式化显示为字符串。 使用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 | | `width` |0 | 标签的宽度。一般不用指定,不指定时则自动是文字的宽度。 | | `height` |0 | 标签的高度。一般不用指定,不指定时则自动是文字的高度。 | @@ -775,12 +771,12 @@ Inherits or Implemented: [MainComponent](#MainComponent),[IPropertyChanged](#IPr | `itemGap` |10f | 图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 [default:10f] | | `itemAutoColor` |true | 图例标记的图形是否自动匹配颜色。 [default:true] | | `itemOpacity` |1 | 图例标记的图形的颜色透明度。 | -| `formatter` | | | +| `formatter` | | 图例内容字符串模版格式器。支持用 \n 换行。 模板变量为图例名称 {value}。 [default:null] | | `numericFormatter` | | 标准数字格式字符串。用于将数值格式化显示为字符串。 使用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 | | `labelStyle` | | 文本样式。 [LabelStyle](LabelStyle)| | `data` | | If data is not specified, it will be auto collected from series. | | `icons` | | 自定义的图例标记图形。 | -| `colors` | | | +| `colors` | | the colors of legend item. 图例标记的颜色列表。 | ## `LegendTheme` @@ -796,9 +792,9 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) |field|default|comment| |--|--|--| -| `label` | | [LabelStyle](LabelStyle)| -| `upperLabel` | | [LabelStyle](LabelStyle)| -| `itemStyle` | | [ItemStyle](ItemStyle)| +| `label` | | 文本标签样式。 [LabelStyle](LabelStyle)| +| `upperLabel` | | 上方的文本标签样式。 [LabelStyle](LabelStyle)| +| `itemStyle` | | 数据项样式。 [ItemStyle](ItemStyle)| ## `LevelStyle` @@ -837,8 +833,8 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent] | `color` | | 线的颜色。 | | `toColor` | | 线的渐变颜色(需要水平方向渐变时)。 | | `toColor2` | | 线的渐变颜色2(需要水平方向三个渐变色的渐变时)。 | -| `width` |0 | | -| `length` |0 | | +| `width` |0 | 线宽。 | +| `length` |0 | 线长。 | | `opacity` |1 | 线的透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 | ## `Location` @@ -864,24 +860,28 @@ Inherits or Implemented: [IComparable](#IComparable) Inherits or Implemented: [MainComponent](#MainComponent) +图表标域,常用于标记图表中某个范围的数据。 + |field|default|comment| |--|--|--| -| `show` |true | | -| `text` | | | -| `serieIndex` |0 | | -| `start` | | [MarkAreaData](MarkAreaData)| -| `end` | | [MarkAreaData](MarkAreaData)| -| `itemStyle` | | [ItemStyle](ItemStyle)| -| `label` | | [LabelStyle](LabelStyle)| +| `show` |true | 是否显示标域。 | +| `text` | | The text of markArea. 标域显示的文本。 | +| `serieIndex` |0 | Serie index of markArea. 标域影响的Serie索引。 | +| `start` | | 标域范围的起始数据。 [MarkAreaData](MarkAreaData)| +| `end` | | 标域范围的结束数据。 [MarkAreaData](MarkAreaData)| +| `itemStyle` | | 标域样式。 [ItemStyle](ItemStyle)| +| `label` | | 标域文本样式。 [LabelStyle](LabelStyle)| ## `MarkAreaData` Inherits or Implemented: [ChildComponent](#ChildComponent) +标域的数据。 + |field|default|comment| |--|--|--| | `type` | | 特殊的标域类型,用于标注最大值最小值等。
`MarkAreaType`:
- `None`: 标域类型
- `Min`: 最小值。
- `Max`: 最大值。
- `Average`: 平均值。
- `Median`: 中位数。
| -| `name` | | | +| `name` | | 标注名称。会作为文字显示。 | | `dimension` |1 | 从哪个维度的数据计算最大最小值等。 | | `xPosition` | | 相对原点的 x 坐标,单位像素。当type为None时有效。 | | `yPosition` | | 相对原点的 y 坐标,单位像素。当type为None时有效。 | @@ -897,7 +897,7 @@ Inherits or Implemented: [MainComponent](#MainComponent) |field|default|comment| |--|--|--| | `show` |true | 是否显示标线。 | -| `serieIndex` |0 | | +| `serieIndex` |0 | 标线影响的Serie索引。 | | `animation` | | 标线的动画样式。 [AnimationStyle](AnimationStyle)| | `data` | | 标线的数据列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表 示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。 | @@ -905,12 +905,12 @@ Inherits or Implemented: [MainComponent](#MainComponent) Inherits or Implemented: [ChildComponent](#ChildComponent) -Data of marking line. 图表标线的数据。 +图表标线的数据。 |field|default|comment| |--|--|--| | `type` | | 特殊的标线类型,用于标注最大值最小值等。
`MarkLineType`:
- `None`: 标线类型
- `Min`: 最小值。
- `Max`: 最大值。
- `Average`: 平均值。
- `Median`: 中位数。
| -| `name` | | | +| `name` | | 标线名称,将会作为文字显示。label的formatter可通过{b}显示名称,通过{c}显示数值。 | | `dimension` |1 | 从哪个维度的数据计算最大最小值等。 | | `xPosition` | | 相对原点的 x 坐标,单位像素。当type为None时有效。 | | `yPosition` | | 相对原点的 y 坐标,单位像素。当type为None时有效。 | @@ -922,7 +922,6 @@ Data of marking line. 图表标线的数据。 | `endSymbol` | | 结束点的图形标记。 [SymbolStyle](SymbolStyle)| | `lineStyle` | | 标线样式。 [LineStyle](LineStyle)| | `label` | | 文本样式。可设置position为Start、Middle和End在不同的位置显示文本。 [LabelStyle](LabelStyle)| -| `emphasis` | | [Emphasis](Emphasis)| ## `Parallel` @@ -1020,15 +1019,6 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) |field|default|comment| |--|--|--| -| `labels` | | | -| `labelLines` | | | -| `endLabels` | | | -| `lineArrows` | | | -| `areaStyles` | | | -| `titleStyles` | | | -| `emphasisItemStyles` | | | -| `emphasisLabels` | | | -| `emphasisLabelLines` | | | | `index` | | 系列索引。 | | `show` |true | 系列是否显示在图表上。 | | `coordSystem` | | 使用的坐标系。 | @@ -1044,7 +1034,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) | `parallelIndex` |0 | 所使用的 parallel coord 组件的 index。 | | `minShow` | | 系列所显示数据的最小索引 | | `maxShow` | | 系列所显示数据的最大索引 | -| `maxCache` | | The first data will be remove when the size of serie data is larger then maxCache. | +| `maxCache` | | 系列中可缓存的最大数据量。默认为0没有限制,大于0时超过指定值会移除旧数据再插入新数据。 | | `sampleDist` |0 | 采样的最小像素距离,默认为0时不采样。当两个数据点间的水平距离小于改值时,开启采样,保证两点间的水平距离不小于改值。 | | `sampleType` | | 采样类型。当sampleDist大于0时有效。
`SampleType`:
- `Peak`: 取峰值。
- `Average`: 取过滤点的平均值。
- `Max`: 取过滤点的最大值。
- `Min`: 取过滤点的最小值。
- `Sum`: 取过滤点的和。
| | `sampleAverage` |0 | 设定的采样平均值。当sampleType 为 Peak 时,用于和过滤数据的平均值做对比是取最大值还是最小值。默认为0时会实时计算所有数据的平均值。 | @@ -1052,7 +1042,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) | `barType` | | 柱形图类型。
`BarType`:
- `Normal`: 普通柱形图。
- `Zebra`: 斑马柱形图。
- `Capsule`: 胶囊柱形图。
| | `barPercentStack` |false | 柱形图是否为百分比堆积。相同stack的serie只要有一个barPercentStack为true,则就显示成百分比堆叠柱状图。 | | `barWidth` |0 | 柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 | -| `barGap` |0.1f | Set barGap as '-1' can overlap bars that belong to different series, which is useful when making a series of bar be background. | +| `barGap` |0.1f | 不同系列的柱间距离。为百分比(如 '0.3f',表示柱子宽度的 30%) 如果想要两个系列的柱子重叠,可以设置 barGap 为 '-1f'。这在用柱子做背景的时候有用。 在同一坐标系上,此属性会被多个 'bar' 系列共享。此属性应设置于此坐标系中最后一个 'bar' 系列上才会生效,并且是对此坐标系中所有 'bar' 系列生效。 | | `barZebraWidth` |4f | 斑马线的粗细。 | | `barZebraGap` |2f | 斑马线的间距。 | | `min` | | 最小值。 | @@ -1072,7 +1062,6 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) | `radius` | | 半径。radius[0]表示内径,radius[1]表示外径。 | | `showDataDimension` | | 数据项里的数据维数。 | | `showDataName` | | 在Editor的inpsector上是否显示name参数 | -| `showDataIcon` | | | | `clip` |false | 是否裁剪超出坐标系部分的图形。 | | `ignore` |false | 是否开启忽略数据。当为 true 时,数据值为 ignoreValue 时不进行绘制。 | | `ignoreValue` |0 | 忽略数据的默认值。当ignore为true才有效。 | @@ -1105,23 +1094,13 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) |field|default|comment| |--|--|--| -| `index` | | | +| `index` | | 数据项索引。 | | `name` | | 数据项名称。 | | `id` | | 数据项的唯一id。唯一id不是必须设置的。 | -| `parentId` | | | +| `parentId` | | 父节点id。父节点id不是必须设置的。 | | `ignore` | | 是否忽略数据。当为 true 时,数据不进行绘制。 | | `selected` | | 该数据项是否被选中。 | | `radius` | | 自定义半径。可用在饼图中自定义某个数据项的半径。 | -| `itemStyles` | | | -| `labels` | | | -| `labelLines` | | | -| `symbols` | | | -| `lineStyles` | | | -| `areaStyles` | | | -| `titleStyles` | | | -| `emphasisItemStyles` | | | -| `emphasisLabels` | | | -| `emphasisLabelLines` | | | | `data` | | 可指定任意维数的数值列表。 | ## `SerieSymbol` @@ -1211,8 +1190,8 @@ Inherits or Implemented: [Axis](#Axis),[IUpdateRuntimeData](#IUpdateRuntimeData) | `right` |0.1f | 组件离容器右侧的距离。 | | `top` |0f | 组件离容器上侧的距离。 | | `bottom` |0.2f | 组件离容器下侧的距离。 | -| `width` |0 | | -| `height` |50 | | +| `width` |0 | 坐标轴宽。 | +| `height` |50 | 坐标轴高。 | ## `SingleAxisCoord` @@ -1249,7 +1228,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `height` |0f | 图形的高。 | | `offset` |Vector2.zero | 图形的偏移。 | | `image` | | 自定义的标记图形。 | -| `imageType` | | | +| `imageType` | | 图形填充类型。 | | `color` | | 图形的颜色。 | ## `TextLimit` @@ -1273,11 +1252,11 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) |field|default|comment| |--|--|--| -| `show` |true | | -| `top` |2 | | -| `right` |4 | | -| `left` |4 | | -| `bottom` |2 | | +| `show` |true | show padding. 是否显示。 | +| `top` |2 | 顶部间距。 | +| `right` |4 | 右部间距。 | +| `left` |4 | 左边间距。 | +| `bottom` |2 | 底部间距。 | ## `TextStyle` @@ -1298,7 +1277,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `fontStyle` | | 文本字体的风格。 [default: FontStyle.Normal] | | `lineSpacing` |1f | 行间距。 [default: 1f] | | `alignment` | | 对齐方式。 | -| `tMPFont` | | | +| `tMPFont` | | TextMeshPro字体。 | | `tMPFontStyle` | | | | `tMPAlignment` | | | @@ -1311,9 +1290,9 @@ Inherits or Implemented: [ScriptableObject](#ScriptableObject) |field|default|comment| |--|--|--| | `themeType` | | 主题类型。
`ThemeType`:
- `Default`: 默认主题。
- `Light`: 亮主题。
- `Dark`: 暗主题。
- `Custom`: 自定义主题。
| -| `themeName` | | | -| `font` | | the font of chart text。 字体。 | -| `tMPFont` | | the font of chart text。 字体。 | +| `themeName` | | 主题名称。 | +| `font` | | 主题字体。 | +| `tMPFont` | | 主题字体。 | | `contrastColor` | | 对比色。 | | `backgroundColor` | | 背景颜色。 | | `colorPalette` | | 调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。 | @@ -1383,7 +1362,7 @@ Inherits or Implemented: [MainComponent](#MainComponent) | `type` | | 提示框指示器类型。
`Painter.Type`:
- `Base`:
- `Serie`:
- `Top`:
| | `trigger` | | 触发类型。
`Tooltip.Trigger`:
- `Item`: 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。
- `Axis`: 坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。
- `None`: 什么都不触发。
| | `itemFormatter` | | 提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。当formatter不为空时,优先使用formatter,否则使用itemFormatter。 | -| `titleFormatter` | | | +| `titleFormatter` | | 提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。
模板变量有{.}、{a}、{b}、{c}、{d}、{e}。
{.}为当前所指示或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。
{f}为数据总和。
{.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}" | | `marker` | | serie的符号标志。 | | `fixedWidth` |0 | 固定宽度。比 minWidth 优先。 | | `fixedHeight` |0 | 固定高度。比 minHeight 优先。 | @@ -1401,17 +1380,17 @@ Inherits or Implemented: [MainComponent](#MainComponent) | `backgroundType` | | 提示框的背景图片显示类型。 | | `backgroundColor` | | 提示框的背景颜色。 | | `borderWidth` |2f | 边框线宽。 | -| `fixedXEnable` |false | | -| `fixedX` |0f | | -| `fixedYEnable` |false | | -| `fixedY` |0f | | -| `titleHeight` |25f | | -| `itemHeight` |25f | | +| `fixedXEnable` |false | 是否固定X位置。 | +| `fixedX` |0f | 固定X位置的坐标。 | +| `fixedYEnable` |false | 是否固定Y位置。 | +| `fixedY` |0f | 固定Y位置的坐标。 | +| `titleHeight` |25f | 标题文本的高。 | +| `itemHeight` |25f | 数据项文本的高。 | | `borderColor` |Color32(230, 230, 230, 255) | 边框颜色。 | | `lineStyle` | | 指示线样式。 [LineStyle](LineStyle)| | `indicatorLabelStyle` | | 提示框的坐标轴指示器文本的样式。 [LabelStyle](LabelStyle)| | `titleLabelStyle` | | 标题的文本样式。 [LabelStyle](LabelStyle)| -| `contentLabelStyles` | | | +| `contentLabelStyles` | | 内容部分的文本样式列表。和列一一对应。 | ## `TooltipTheme` @@ -1502,7 +1481,7 @@ Inherits or Implemented: [ScriptableObject](#ScriptableObject) | `lang` | | [Lang](Lang)| | `font` | | | | `tMPFont` | | | -| `fontSizeLv1` |28 | | +| `fontSizeLv1` |28 | 一级字体大小。 | | `fontSizeLv2` |24 | | | `fontSizeLv3` |20 | | | `fontSizeLv4` |18 | | diff --git a/Editor/ChildComponents/AnimationDrawer.cs b/Editor/ChildComponents/AnimationDrawer.cs index d0fb76c9..8d7a59c9 100644 --- a/Editor/ChildComponents/AnimationDrawer.cs +++ b/Editor/ChildComponents/AnimationDrawer.cs @@ -22,7 +22,6 @@ namespace XCharts.Editor PropertyField(prop, "m_DataChangeEnable"); PropertyField(prop, "m_DataChangeDuration"); PropertyField(prop, "m_ActualDuration"); - PropertyField(prop, "m_AlongWithLinePath"); --EditorGUI.indentLevel; } } diff --git a/Runtime/Component/Animation/AnimationStyle.cs b/Runtime/Component/Animation/AnimationStyle.cs index 9966e134..00761b44 100644 --- a/Runtime/Component/Animation/AnimationStyle.cs +++ b/Runtime/Component/Animation/AnimationStyle.cs @@ -61,7 +61,6 @@ namespace XCharts.Runtime [SerializeField] private bool m_DataChangeEnable = true; [SerializeField] private float m_DataChangeDuration = 500; [SerializeField] private float m_ActualDuration; - [SerializeField] private bool m_AlongWithLinePath; /// /// 自定义渐入动画延时函数。返回ms值。 /// @@ -94,7 +93,7 @@ namespace XCharts.Runtime /// Easing method used for the first animation. /// |动画的缓动效果。 /// - //public Easing easing { get { return m_Easting; } set { m_Easting = value; } } + //public Easing easting { get { return m_Easting; } set { m_Easting = value; } } /// /// The milliseconds duration of the fadeIn animation. /// |设定的渐入动画时长(毫秒)。如果要设置单个数据项的渐入时长,可以用代码定制:customFadeInDuration。 diff --git a/Runtime/Component/Axis/Axis.cs b/Runtime/Component/Axis/Axis.cs index 4c69114d..23f2c83c 100644 --- a/Runtime/Component/Axis/Axis.cs +++ b/Runtime/Component/Axis/Axis.cs @@ -300,7 +300,7 @@ namespace XCharts.Runtime /// /// axis Line. /// |坐标轴轴线。 - /// /// + /// public AxisLine axisLine { get { return m_AxisLine; } diff --git a/Runtime/Component/Axis/AxisSplitArea.cs b/Runtime/Component/Axis/AxisSplitArea.cs index 833c0528..1440f856 100644 --- a/Runtime/Component/Axis/AxisSplitArea.cs +++ b/Runtime/Component/Axis/AxisSplitArea.cs @@ -26,7 +26,7 @@ namespace XCharts.Runtime /// /// Color of split area. SplitArea color could also be set in color array, /// which the split lines would take as their colors in turns. - /// |Dark and light colors in turns are used by default. + /// Dark and light colors in turns are used by default. /// |分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。 /// public List color diff --git a/Runtime/Component/Axis/AxisSplitLine.cs b/Runtime/Component/Axis/AxisSplitLine.cs index 8e47a14b..8e345272 100644 --- a/Runtime/Component/Axis/AxisSplitLine.cs +++ b/Runtime/Component/Axis/AxisSplitLine.cs @@ -19,8 +19,15 @@ namespace XCharts.Runtime /// |刻度线与轴线的距离。 /// public float distance { get { return m_Distance; } set { m_Distance = value; } } + /// + /// auto color. + /// |自动设置颜色。 + /// public bool autoColor { get { return m_AutoColor; } set { m_AutoColor = value; } } - + /// + /// Interval of Axis splitLine. + /// |坐标轴分隔线的显示间隔。 + /// public int interval { get { return m_Interval; } diff --git a/Runtime/Component/Axis/SingleAxis/SingleAxis.cs b/Runtime/Component/Axis/SingleAxis/SingleAxis.cs index 87c974e5..263d37b4 100644 --- a/Runtime/Component/Axis/SingleAxis/SingleAxis.cs +++ b/Runtime/Component/Axis/SingleAxis/SingleAxis.cs @@ -64,11 +64,19 @@ namespace XCharts.Runtime get { return m_Bottom; } set { if (PropertyUtil.SetStruct(ref m_Bottom, value)) SetAllDirty(); } } + /// + /// width of axis. + /// |坐标轴宽。 + /// public float width { get { return m_Width; } set { if (PropertyUtil.SetStruct(ref m_Width, value)) SetAllDirty(); } } + /// + /// height of axis. + /// |坐标轴高。 + /// public float height { get { return m_Height; } diff --git a/Runtime/Component/Child/LevelStyle.cs b/Runtime/Component/Child/LevelStyle.cs index cc4a4a29..cdca2419 100644 --- a/Runtime/Component/Child/LevelStyle.cs +++ b/Runtime/Component/Child/LevelStyle.cs @@ -9,9 +9,17 @@ namespace XCharts.Runtime [SerializeField] private LabelStyle m_Label = new LabelStyle(); [SerializeField] private LabelStyle m_UpperLabel = new LabelStyle(); [SerializeField] private ItemStyle m_ItemStyle = new ItemStyle(); - + /// + /// 文本标签样式。 + /// public LabelStyle label { get { return m_Label; } } + /// + /// 上方的文本标签样式。 + /// public LabelStyle upperLabel { get { return m_UpperLabel; } } + /// + /// 数据项样式。 + /// public ItemStyle itemStyle { get { return m_ItemStyle; } } } diff --git a/Runtime/Component/Child/LineStyle.cs b/Runtime/Component/Child/LineStyle.cs index 8b1940d4..d8909a6a 100644 --- a/Runtime/Component/Child/LineStyle.cs +++ b/Runtime/Component/Child/LineStyle.cs @@ -96,7 +96,7 @@ namespace XCharts.Runtime /// /// the width of line. /// |线宽。 - /// /// + /// public float width { get { return m_Width; } @@ -105,7 +105,7 @@ namespace XCharts.Runtime /// /// the length of line. /// |线长。 - /// /// + /// public float length { get { return m_Length; } diff --git a/Runtime/Component/Child/SymbolStyle.cs b/Runtime/Component/Child/SymbolStyle.cs index 496059e8..3b8677a5 100644 --- a/Runtime/Component/Child/SymbolStyle.cs +++ b/Runtime/Component/Child/SymbolStyle.cs @@ -150,6 +150,10 @@ namespace XCharts.Runtime get { return m_Image; } set { if (PropertyUtil.SetClass(ref m_Image, value)) SetAllDirty(); } } + /// + /// the fill type of image. + /// |图形填充类型。 + /// public Image.Type imageType { get { return m_ImageType; } diff --git a/Runtime/Component/Child/TextPadding.cs b/Runtime/Component/Child/TextPadding.cs index 27353586..7031f4f0 100644 --- a/Runtime/Component/Child/TextPadding.cs +++ b/Runtime/Component/Child/TextPadding.cs @@ -30,27 +30,46 @@ namespace XCharts.Runtime m_Bottom = bottom; m_Left = left; } - + /// + /// show padding. + /// 是否显示。 + /// public bool show { get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetComponentDirty(); } } + /// + /// padding of top. + /// |顶部间距。 + /// public float top { get { return m_Top; } set { if (PropertyUtil.SetStruct(ref m_Top, value)) SetComponentDirty(); } } + /// + /// padding of right. + /// |右部间距。 + /// public float right { get { return m_Right; } set { if (PropertyUtil.SetStruct(ref m_Right, value)) SetComponentDirty(); } } + /// + /// padding of bottom. + /// |底部间距。 + /// public float bottom { get { return m_Bottom; } set { if (PropertyUtil.SetStruct(ref m_Bottom, value)) SetComponentDirty(); } } + /// + /// padding of left. + /// |左边间距。 + /// public float left { get { return m_Left; } diff --git a/Runtime/Component/Child/TextStyle.cs b/Runtime/Component/Child/TextStyle.cs index 9ea38a0b..d8c4179a 100644 --- a/Runtime/Component/Child/TextStyle.cs +++ b/Runtime/Component/Child/TextStyle.cs @@ -127,17 +127,33 @@ namespace XCharts.Runtime set { if (PropertyUtil.SetStruct(ref m_Alignment, value)) SetComponentDirty(); } } #if dUI_TextMeshPro + /// + /// the font of textmeshpro. + /// |TextMeshPro字体。 + /// public TMP_FontAsset tmpFont { get { return m_TMPFont; } set { if (PropertyUtil.SetClass(ref m_TMPFont, value)) SetComponentDirty(); } } - + /// + /// the font style of TextMeshPro. + /// |TextMeshPro字体类型。 + /// public FontStyles tmpFontStyle { get { return m_TMPFontStyle; } set { if (PropertyUtil.SetStruct(ref m_TMPFontStyle, value)) SetComponentDirty(); } } + /// + /// the text alignment of TextMeshPro. + /// |TextMeshPro字体对齐方式。 + /// + public TextAlignmentOptions tmpFontStyle + { + get { return m_TMPAlignment; } + set { if (PropertyUtil.SetStruct(ref m_TMPAlignment, value)) SetComponentDirty(); } + } #endif public TextStyle() { } diff --git a/Runtime/Component/Comment/CommentItem.cs b/Runtime/Component/Comment/CommentItem.cs index 766e780c..3b0db35e 100644 --- a/Runtime/Component/Comment/CommentItem.cs +++ b/Runtime/Component/Comment/CommentItem.cs @@ -32,7 +32,15 @@ namespace XCharts.Runtime /// |注解的文本内容。 /// public string content { get { return m_Content; } set { if (PropertyUtil.SetClass(ref m_Content, value)) SetComponentDirty(); } } + /// + /// the mark rect of comment. + /// |注解区域。 + /// public Rect markRect { get { return m_MarkRect; } set { if (PropertyUtil.SetStruct(ref m_MarkRect, value)) SetVerticesDirty(); } } + /// + /// the mark rect style. + /// |注解标记区域样式。 + /// public CommentMarkStyle markStyle { get { return m_MarkStyle; } set { if (PropertyUtil.SetClass(ref m_MarkStyle, value)) SetVerticesDirty(); } } /// /// The text style of all comments. diff --git a/Runtime/Component/Comment/CommentMarkStyle.cs b/Runtime/Component/Comment/CommentMarkStyle.cs index cc776aa2..174c58aa 100644 --- a/Runtime/Component/Comment/CommentMarkStyle.cs +++ b/Runtime/Component/Comment/CommentMarkStyle.cs @@ -4,8 +4,8 @@ using UnityEngine; namespace XCharts.Runtime { /// - /// comment of chart. - /// |注解项。 + /// the comment mark style. + /// |注解项区域样式。 /// [Serializable] public class CommentMarkStyle : ChildComponent @@ -18,6 +18,10 @@ namespace XCharts.Runtime /// |是否显示当前注解项。 /// public bool show { get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); } } + /// + /// line style of comment mark area. + /// |线条样式。 + /// public LineStyle lineStyle { get { return m_LineStyle; } set { if (PropertyUtil.SetClass(ref m_LineStyle, value)) SetVerticesDirty(); } } } } \ No newline at end of file diff --git a/Runtime/Component/DataZoom/DataZoom.cs b/Runtime/Component/DataZoom/DataZoom.cs index d361cd5b..33692b66 100644 --- a/Runtime/Component/DataZoom/DataZoom.cs +++ b/Runtime/Component/DataZoom/DataZoom.cs @@ -69,7 +69,7 @@ namespace XCharts.Runtime [SerializeField] private bool m_ShowDataShadow; [SerializeField] private bool m_ShowDetail; [SerializeField] private bool m_ZoomLock; - [SerializeField] private bool m_Realtime; + //[SerializeField] private bool m_Realtime; [SerializeField] protected Color32 m_FillerColor; [SerializeField] protected Color32 m_BorderColor; [SerializeField] protected float m_BorderWidth; @@ -81,8 +81,8 @@ namespace XCharts.Runtime [SerializeField] private RangeMode m_RangeMode; [SerializeField] private float m_Start; [SerializeField] private float m_End; - [SerializeField] private float m_StartValue; - [SerializeField] private float m_EndValue; + //[SerializeField] private float m_StartValue; + //[SerializeField] private float m_EndValue; [SerializeField] private int m_MinShowNum = 1; [Range(1f, 20f)] [SerializeField] private float m_ScrollSensitivity = 1.1f; @@ -168,7 +168,7 @@ namespace XCharts.Runtime /// /// 是否支持框选。提供一个选框进行数据区域缩放。 /// - private bool supportSelect + public bool supportSelect { get { return m_SupportSelect; } set { if (PropertyUtil.SetStruct(ref m_SupportSelect, value)) SetVerticesDirty(); } diff --git a/Runtime/Component/Emphasis/Emphasis.cs b/Runtime/Component/Emphasis/Emphasis.cs index 00197fa7..90d64640 100644 --- a/Runtime/Component/Emphasis/Emphasis.cs +++ b/Runtime/Component/Emphasis/Emphasis.cs @@ -37,6 +37,9 @@ namespace XCharts.Runtime get { return m_Label; } set { if (PropertyUtil.SetClass(ref m_Label, value, true)) SetAllDirty(); } } + /// + /// 图形文本引导线样式。 + /// public LabelLine labelLine { get { return m_LabelLine; } diff --git a/Runtime/Component/Legend/Legend.cs b/Runtime/Component/Legend/Legend.cs index c2ff2c67..504850ca 100644 --- a/Runtime/Component/Legend/Legend.cs +++ b/Runtime/Component/Legend/Legend.cs @@ -233,6 +233,10 @@ namespace XCharts.Runtime get { return m_Icons; } set { if (value != null) { m_Icons = value; SetComponentDirty(); } } } + /// + /// the colors of legend item. + /// 图例标记的颜色列表。 + /// public List colors { get { return m_Colors; } diff --git a/Runtime/Component/Mark/MarkArea.cs b/Runtime/Component/Mark/MarkArea.cs index 47ea3447..560d6af8 100644 --- a/Runtime/Component/Mark/MarkArea.cs +++ b/Runtime/Component/Mark/MarkArea.cs @@ -26,6 +26,10 @@ namespace XCharts.Runtime Median } + /// + /// Used to mark an area in chart. For example, mark a time interval. + /// |图表标域,常用于标记图表中某个范围的数据。 + /// [System.Serializable] [ComponentHandler(typeof(MarkAreaHandler), true)] public class MarkArea : MainComponent @@ -40,37 +44,59 @@ namespace XCharts.Runtime public ChartLabel runtimeLabel { get; internal set; } public Vector3 runtimeLabelPosition { get; internal set; } public Rect runtimeRect { get; internal set; } - + /// + /// 是否显示标域。 + /// public bool show { get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); } } + /// + /// The text of markArea. + /// 标域显示的文本。 + /// public string text { get { return m_Text; } set { if (PropertyUtil.SetClass(ref m_Text, value)) SetComponentDirty(); } } + /// + /// Serie index of markArea. + /// 标域影响的Serie索引。 + /// public int serieIndex { get { return m_SerieIndex; } set { if (PropertyUtil.SetStruct(ref m_SerieIndex, value)) SetVerticesDirty(); } } + /// + /// 标域范围的起始数据。 + /// public MarkAreaData start { get { return m_Start; } set { if (PropertyUtil.SetClass(ref m_Start, value)) SetVerticesDirty(); } } + /// + /// 标域范围的结束数据。 + /// public MarkAreaData end { get { return m_End; } set { if (PropertyUtil.SetClass(ref m_End, value)) SetVerticesDirty(); } } + /// + /// 标域样式。 + /// public ItemStyle itemStyle { get { return m_ItemStyle; } set { if (PropertyUtil.SetClass(ref m_ItemStyle, value)) SetVerticesDirty(); } } + /// + /// 标域文本样式。 + /// public LabelStyle label { get { return m_Label; } @@ -85,6 +111,9 @@ namespace XCharts.Runtime } } + /// + /// 标域的数据。 + /// [System.Serializable] public class MarkAreaData : ChildComponent { @@ -96,6 +125,10 @@ namespace XCharts.Runtime [SerializeField] private double m_XValue; [SerializeField] private double m_YValue; public double runtimeValue { get; internal set; } + /// + /// Name of the marker, which will display as a label. + /// |标注名称。会作为文字显示。 + /// public string name { get { return m_Name; } diff --git a/Runtime/Component/Mark/MarkLine.cs b/Runtime/Component/Mark/MarkLine.cs index 9b709ef2..76929290 100644 --- a/Runtime/Component/Mark/MarkLine.cs +++ b/Runtime/Component/Mark/MarkLine.cs @@ -49,6 +49,10 @@ namespace XCharts.Runtime get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); } } + /// + /// The serie index of markLine. + /// |标线影响的Serie索引。 + /// public int serieIndex { get { return m_SerieIndex; } @@ -99,7 +103,7 @@ namespace XCharts.Runtime } /// /// Data of marking line. - /// 图表标线的数据。 + /// |图表标线的数据。 /// [System.Serializable] public class MarkLineData : ChildComponent diff --git a/Runtime/Component/Tooltip/Tooltip.cs b/Runtime/Component/Tooltip/Tooltip.cs index c656f7dc..7ff3abec 100644 --- a/Runtime/Component/Tooltip/Tooltip.cs +++ b/Runtime/Component/Tooltip/Tooltip.cs @@ -286,31 +286,55 @@ namespace XCharts.Runtime get { return m_BorderColor; } set { if (PropertyUtil.SetColor(ref m_BorderColor, value)) SetVerticesDirty(); } } + /// + /// enable fixedX. + /// |是否固定X位置。 + /// public bool fixedXEnable { get { return m_FixedXEnable; } set { if (PropertyUtil.SetStruct(ref m_FixedXEnable, value)) SetVerticesDirty(); } } + /// + /// the x positionn of fixedX. + /// |固定X位置的坐标。 + /// public float fixedX { get { return m_FixedX; } set { if (PropertyUtil.SetStruct(ref m_FixedX, value)) SetVerticesDirty(); } } + /// + /// enable fixedY. + /// |是否固定Y位置。 + /// public bool fixedYEnable { get { return m_FixedYEnable; } set { if (PropertyUtil.SetStruct(ref m_FixedYEnable, value)) SetVerticesDirty(); } } + /// + /// the y position of fixedY. + /// |固定Y位置的坐标。 + /// public float fixedY { get { return m_FixedY; } set { if (PropertyUtil.SetStruct(ref m_FixedY, value)) SetVerticesDirty(); } } + /// + /// height of title text. + /// |标题文本的高。 + /// public float titleHeight { get { return m_TitleHeight; } set { if (PropertyUtil.SetStruct(ref m_TitleHeight, value)) SetComponentDirty(); } } + /// + /// height of content text. + /// |数据项文本的高。 + /// public float itemHeight { get { return m_ItemHeight; } @@ -326,14 +350,18 @@ namespace XCharts.Runtime set { if (value != null) { m_IndicatorLabelStyle = value; SetComponentDirty(); } } } /// - /// 标题的文本样式。 + /// the textstyle of title. + /// |标题的文本样式。 /// public LabelStyle titleLabelStyle { get { return m_TitleLabelStyle; } set { if (value != null) { m_TitleLabelStyle = value; SetComponentDirty(); } } } - + /// + /// the textstyle list of content. + /// |内容部分的文本样式列表。和列一一对应。 + /// public List contentLabelStyles { get { return m_ContentLabelStyles; } diff --git a/Runtime/Internal/Attributes/IgnoreDocAttribute.cs b/Runtime/Internal/Attributes/IgnoreDocAttribute.cs new file mode 100644 index 00000000..dbbc3076 --- /dev/null +++ b/Runtime/Internal/Attributes/IgnoreDocAttribute.cs @@ -0,0 +1,12 @@ +using System; + +namespace XCharts.Runtime +{ + [AttributeUsage(AttributeTargets.Field, AllowMultiple = false)] + public class IgnoreDoc : Attribute + { + public IgnoreDoc() + { + } + } +} \ No newline at end of file diff --git a/Runtime/Internal/Attributes/IgnoreDocAttribute.cs.meta b/Runtime/Internal/Attributes/IgnoreDocAttribute.cs.meta new file mode 100644 index 00000000..aab5242f --- /dev/null +++ b/Runtime/Internal/Attributes/IgnoreDocAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bd89bf9e568d34de089f71258f2bd211 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Serie/Serie.ExtraComponent.cs b/Runtime/Serie/Serie.ExtraComponent.cs index a46d23e3..01f21b9d 100644 --- a/Runtime/Serie/Serie.ExtraComponent.cs +++ b/Runtime/Serie/Serie.ExtraComponent.cs @@ -19,15 +19,15 @@ namespace XCharts.Runtime { typeof(EmphasisLabelLine), "m_EmphasisLabelLines" }, }; - [SerializeField] private List m_Labels = new List(); - [SerializeField] private List m_LabelLines = new List(); - [SerializeField] private List m_EndLabels = new List(); - [SerializeField] private List m_LineArrows = new List(); - [SerializeField] private List m_AreaStyles = new List(); - [SerializeField] private List m_TitleStyles = new List(); - [SerializeField] private List m_EmphasisItemStyles = new List(); - [SerializeField] private List m_EmphasisLabels = new List(); - [SerializeField] private List m_EmphasisLabelLines = new List(); + [SerializeField][IgnoreDoc] private List m_Labels = new List(); + [SerializeField][IgnoreDoc] private List m_LabelLines = new List(); + [SerializeField][IgnoreDoc] private List m_EndLabels = new List(); + [SerializeField][IgnoreDoc] private List m_LineArrows = new List(); + [SerializeField][IgnoreDoc] private List m_AreaStyles = new List(); + [SerializeField][IgnoreDoc] private List m_TitleStyles = new List(); + [SerializeField][IgnoreDoc] private List m_EmphasisItemStyles = new List(); + [SerializeField][IgnoreDoc] private List m_EmphasisLabels = new List(); + [SerializeField][IgnoreDoc] private List m_EmphasisLabelLines = new List(); /// /// The style of area. diff --git a/Runtime/Serie/Serie.cs b/Runtime/Serie/Serie.cs index de197928..96895ea2 100644 --- a/Runtime/Serie/Serie.cs +++ b/Runtime/Serie/Serie.cs @@ -214,7 +214,6 @@ namespace XCharts.Runtime [SerializeField][Range(1, 10)] private int m_ShowDataDimension; [SerializeField] private bool m_ShowDataName; - [SerializeField] private bool m_ShowDataIcon; [SerializeField] private bool m_Clip = false; [SerializeField] private bool m_Ignore = false; [SerializeField] private double m_IgnoreValue = 0; @@ -388,8 +387,7 @@ namespace XCharts.Runtime } /// /// The max number of serie data cache. - /// |The first data will be remove when the size of serie data is larger then maxCache. - /// |default:0,unlimited. + /// The first data will be remove when the size of serie data is larger then maxCache. /// |系列中可缓存的最大数据量。默认为0没有限制,大于0时超过指定值会移除旧数据再插入新数据。 /// public int maxCache @@ -478,11 +476,11 @@ namespace XCharts.Runtime } /// /// The gap between bars between different series, is a percent value like '0.3f' , which means 30% of the bar width, can be set as a fixed value. - /// |Set barGap as '-1' can overlap bars that belong to different series, which is useful when making a series of bar be background. - /// |In a single coodinate system, this attribute is shared by multiple 'bar' series. - /// |This attribute should be set on the last 'bar' series in the coodinate system, - /// then it will be adopted by all 'bar' series in the coordinate system. - /// 不同系列的柱间距离。为百分比(如 '0.3f',表示柱子宽度的 30%) + /// Set barGap as '-1' can overlap bars that belong to different series, which is useful when making a series of bar be background. + /// In a single coodinate system, this attribute is shared by multiple 'bar' series. + /// This attribute should be set on the last 'bar' series in the coodinate system, + /// then it will be adopted by all 'bar' series in the coordinate system. + /// |不同系列的柱间距离。为百分比(如 '0.3f',表示柱子宽度的 30%) /// 如果想要两个系列的柱子重叠,可以设置 barGap 为 '-1f'。这在用柱子做背景的时候有用。 /// 在同一坐标系上,此属性会被多个 'bar' 系列共享。此属性应设置于此坐标系中最后一个 'bar' 系列上才会生效,并且是对此坐标系中所有 'bar' 系列生效。 /// diff --git a/Runtime/Serie/SerieData.cs b/Runtime/Serie/SerieData.cs index 7e815cc9..bfa99c19 100644 --- a/Runtime/Serie/SerieData.cs +++ b/Runtime/Serie/SerieData.cs @@ -40,16 +40,16 @@ namespace XCharts.Runtime [SerializeField] private bool m_Ignore; [SerializeField] private bool m_Selected; [SerializeField] private float m_Radius; - [SerializeField] private List m_ItemStyles = new List(); - [SerializeField] private List m_Labels = new List(); - [SerializeField] private List m_LabelLines = new List(); - [SerializeField] private List m_Symbols = new List(); - [SerializeField] private List m_LineStyles = new List(); - [SerializeField] private List m_AreaStyles = new List(); - [SerializeField] private List m_TitleStyles = new List(); - [SerializeField] private List m_EmphasisItemStyles = new List(); - [SerializeField] private List m_EmphasisLabels = new List(); - [SerializeField] private List m_EmphasisLabelLines = new List(); + [SerializeField][IgnoreDoc] private List m_ItemStyles = new List(); + [SerializeField][IgnoreDoc] private List m_Labels = new List(); + [SerializeField][IgnoreDoc] private List m_LabelLines = new List(); + [SerializeField][IgnoreDoc] private List m_Symbols = new List(); + [SerializeField][IgnoreDoc] private List m_LineStyles = new List(); + [SerializeField][IgnoreDoc] private List m_AreaStyles = new List(); + [SerializeField][IgnoreDoc] private List m_TitleStyles = new List(); + [SerializeField][IgnoreDoc] private List m_EmphasisItemStyles = new List(); + [SerializeField][IgnoreDoc] private List m_EmphasisLabels = new List(); + [SerializeField][IgnoreDoc] private List m_EmphasisLabelLines = new List(); [SerializeField] private List m_Data = new List(); [NonSerialized] public SerieDataContext context = new SerieDataContext(); @@ -59,7 +59,10 @@ namespace XCharts.Runtime public ChartLabel titleObject { get; set; } private bool m_Show = true; - + /// + /// the index of SerieData. + /// |数据项索引。 + /// public override int index { get { return m_Index; } set { m_Index = value; } } /// /// the name of data item. @@ -67,9 +70,14 @@ namespace XCharts.Runtime /// public string name { get { return m_Name; } set { m_Name = value; } } /// - /// 数据项的唯一id。唯一id不是必须设置的。 + /// the id of data. + /// |数据项的唯一id。唯一id不是必须设置的。 /// public string id { get { return m_Id; } set { m_Id = value; } } + /// + /// the id of parent SerieData. + /// |父节点id。父节点id不是必须设置的。 + /// public string parentId { get { return m_ParentId; } set { m_ParentId = value; } } /// /// 是否忽略数据。当为 true 时,数据不进行绘制。 diff --git a/Runtime/Theme/ComponentTheme.cs b/Runtime/Theme/ComponentTheme.cs index e68fdfb8..91141cff 100644 --- a/Runtime/Theme/ComponentTheme.cs +++ b/Runtime/Theme/ComponentTheme.cs @@ -57,7 +57,7 @@ namespace XCharts.Runtime #if dUI_TextMeshPro /// /// the font of chart text。 - /// 字体。 + /// |字体。 /// public TMP_FontAsset tmpFont { diff --git a/Runtime/Theme/Theme.cs b/Runtime/Theme/Theme.cs index da0b32cc..bd6e4bc6 100644 --- a/Runtime/Theme/Theme.cs +++ b/Runtime/Theme/Theme.cs @@ -49,6 +49,10 @@ namespace XCharts.Runtime get { return m_ThemeType; } set { PropertyUtil.SetStruct(ref m_ThemeType, value); } } + /// + /// the name of theme. + /// |主题名称。 + /// public string themeName { get { return m_ThemeName; } @@ -91,7 +95,7 @@ namespace XCharts.Runtime #if dUI_TextMeshPro /// /// the font of chart text。 - /// 字体。 + /// |主题字体。 /// public TMP_FontAsset tmpFont { @@ -105,7 +109,7 @@ namespace XCharts.Runtime #endif /// /// the font of chart text。 - /// 字体。 + /// |主题字体。 /// public Font font {