From 2e954490ecd5a8268de2688c9770cdf2e8f10511 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 24 Mar 2022 21:48:53 +0800 Subject: [PATCH] 3.0 --- CHANGELOG.md | 2 +- Documentation/CHANGELOG-EN.md | 2 +- .../{XChartsAPI.md => XChartsAPI-EN.md} | 8 +- .../{xcharts-api-EN.md => XChartsAPI-ZH.md} | 21 +- Documentation/XChartsConfiguration-EN.md | 1407 +++++++++++++++++ Documentation/XChartsConfiguration-ZH.md | 1407 +++++++++++++++++ ...ons-and-answers-EN.md => XChartsFQA-EN.md} | 0 .../{XCharts问答.md => XChartsFQA-ZH.md} | 12 +- ...5分钟上手教程.md => XChartsTutorial01-EN.md} | 18 +- Documentation/XChartsTutorial01-ZH.md | 231 +++ Documentation/XCharts配置项手册.md | 1065 ------------- Documentation/config-EN.md.meta | 7 + Documentation/config-ZH.md.meta | 7 + Documentation/xcharts-configuration-EN.md | 959 ----------- README.md | 8 +- Runtime/Component/Axis/Axis.cs | 14 +- Runtime/Component/Child/AreaStyle.cs | 6 +- Runtime/Component/Child/LabelStyle.cs | 20 +- Runtime/Component/DataZoom/DataZoom.cs | 62 +- Runtime/Component/Radar/RadarCoord.cs | 14 +- Runtime/Component/Tooltip/Tooltip.cs | 78 +- 21 files changed, 3187 insertions(+), 2161 deletions(-) rename Documentation/{XChartsAPI.md => XChartsAPI-EN.md} (98%) rename Documentation/{xcharts-api-EN.md => XChartsAPI-ZH.md} (90%) create mode 100644 Documentation/XChartsConfiguration-EN.md create mode 100644 Documentation/XChartsConfiguration-ZH.md rename Documentation/{xcharts-questions-and-answers-EN.md => XChartsFQA-EN.md} (100%) rename Documentation/{XCharts问答.md => XChartsFQA-ZH.md} (97%) rename Documentation/{XCharts教程:5分钟上手教程.md => XChartsTutorial01-EN.md} (92%) create mode 100644 Documentation/XChartsTutorial01-ZH.md delete mode 100644 Documentation/XCharts配置项手册.md create mode 100644 Documentation/config-EN.md.meta create mode 100644 Documentation/config-ZH.md.meta delete mode 100644 Documentation/xcharts-configuration-EN.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 42a19034..f156a129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -269,7 +269,7 @@ ## v1.6.0 * (2020.08.24) 发布`v1.6.0`版本 -* (2020.08.23) 重构代码,将与绘制相关的`Color`改为`Color32`,减少隐式转换(更新后会导致自定义的颜色丢失,可参考[问答29](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Documentation/XCharts问答.md)进行升级) +* (2020.08.23) 重构代码,将与绘制相关的`Color`改为`Color32`,减少隐式转换(更新后会导致自定义的颜色丢失,可参考[问答29](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Documentation/XChartsFQA-ZH.md)进行升级) * (2020.08.15) 优化`PieChart`绘制表现效果#85 * (2020.08.11) 增加`LiquidChart`数据变更动画#83 * (2020.08.11) 优化`PieChart`文本堆叠和引线效果#85 diff --git a/Documentation/CHANGELOG-EN.md b/Documentation/CHANGELOG-EN.md index abca7e09..bf95f773 100644 --- a/Documentation/CHANGELOG-EN.md +++ b/Documentation/CHANGELOG-EN.md @@ -215,7 +215,7 @@ Since the data type is upgraded to `double`, the implicit conversion of `float` ## v1.6.0 * (2020.08.24) Release `v1.6.0` version -* (2020.08.23) Refactor code, replace `Color` with `Color32` for reduce implicit conversion (Can cause custom colors to lose, reference [Q&A 29](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Documentation/xcharts-questions-and-answers-EN.md) to upgrade) +* (2020.08.23) Refactor code, replace `Color` with `Color32` for reduce implicit conversion (Can cause custom colors to lose, reference [Q&A 29](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Documentation/XChartsFQA-ZH.md) to upgrade) * (2020.08.15) Optimized `PieChart` drawing performance effect #85 * (2020.08.11) Added `LiquidChart` data change animation#83 * (2020.08.11) Optimized `PieChart` text stack and lead line effects#85 diff --git a/Documentation/XChartsAPI.md b/Documentation/XChartsAPI-EN.md similarity index 98% rename from Documentation/XChartsAPI.md rename to Documentation/XChartsAPI-EN.md index b453dad0..a788f93a 100644 --- a/Documentation/XChartsAPI.md +++ b/Documentation/XChartsAPI-EN.md @@ -1,8 +1,8 @@ # XCharts API [返回首页](https://github.com/XCharts-Team/XCharts) -[XCharts配置项手册](XCharts配置项手册.md) -[XCharts问答](XCharts问答.md) +[XCharts配置项手册](XChartsConfiguration-ZH.md) +[XCharts问答](XChartsFQA-ZH.md) ## `BaseChart` @@ -146,6 +146,6 @@ * `RingChart.UpdateMax(float value)`:更新第一个系列第一个数据项的最大值。 [返回首页](https://github.com/XCharts-Team/XCharts) -[XCharts配置项手册](XCharts配置项手册.md) -[XCharts问答](XCharts问答.md) +[XCharts配置项手册](XChartsConfiguration-ZH.md) +[XCharts问答](XChartsFQA-ZH.md) diff --git a/Documentation/xcharts-api-EN.md b/Documentation/XChartsAPI-ZH.md similarity index 90% rename from Documentation/xcharts-api-EN.md rename to Documentation/XChartsAPI-ZH.md index 47a1d6df..a788f93a 100644 --- a/Documentation/xcharts-api-EN.md +++ b/Documentation/XChartsAPI-ZH.md @@ -1,8 +1,8 @@ # XCharts API [返回首页](https://github.com/XCharts-Team/XCharts) -[XCharts配置项手册](XCharts配置项手册.md) -[XCharts问答](XCharts问答.md) +[XCharts配置项手册](XChartsConfiguration-ZH.md) +[XCharts问答](XChartsFQA-ZH.md) ## `BaseChart` @@ -28,6 +28,7 @@ * `BaseChart.onDrag`:鼠标拖拽回调。 * `BaseChart.onEndDrag`:鼠标结束拖拽回调。 * `BaseChart.onScroll`:鼠标滚动回调。 +* `BaseChart.onPointerClickPie`:点击柱条回调。参数:`eventData`, `serieIndex`, `dataIndex` * `BaseChart.SetSize(float width, float height)`: 设置图表的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform)。 * `BaseChart.ClearData()`:清除所有数据,系列列表会保留,只是移除列表中系列的数据。 * `BaseChart.RemoveData()`:清除所有系列和图例数据,系列列表也会被清除。 @@ -83,6 +84,13 @@ * `CoordinateChart.ClearAxisData()`:清除所有x轴和y轴的类目数据。 * `CoordinateChart.AddXAxisData(string category, int xAxisIndex = 0)`:添加一个类目数据到指定的 `X` 轴。 * `CoordinateChart.AddYAxisData(string category, int yAxisIndex = 0)`:添加一个类目数据到指定的 `Y` 轴。 +* `CoordinateChart.AddXAxisIcon(Sprite icon, int xAxisIndex = 0)`:添加一个图标到指定的 `X` 轴。 +* `CoordinateChart.AddYAxisIcon(Sprite icon, int yAxisIndex = 0)`:添加一个图标到指定的 `Y` 轴。 +* `CoordinateChart.UpdateXAxisData(int index, string category, int xAxisIndex = 0)`:更新 `X` 轴的类目数据。 +* `CoordinateChart.UpdateYAxisData(int index, string category, int yAxisIndex = 0)`:更新 `Y` 轴的类目数据。 +* `CoordinateChart.UpdateXAxisIcon(int index, Sprite icon, int xAxisIndex = 0)`:更新 `X` 轴的图标。 +* `CoordinateChart.UpdateYAxisIcon(int index, Sprite icon, int yAxisIndex = 0)`:更新 `Y` 轴的图标。 + * `CoordinateChart.IsValue()`:是否是纯数值坐标。 * `CoordinateChart.RefreshDataZoom()`:在下一帧刷新DataZoom组件。 * `CoordinateChart.RefreshAxisMinMaxValue()`:立即刷新数值坐标轴的最大最小值(更新坐标轴标签并触发重绘)。 @@ -107,11 +115,6 @@ * `BarChart.onPointerClickBar`:点击柱条回调。参数:`eventData`, `dataIndex` -## `PieChart` - -* 继承自 `BaseChart`。 - -* `PieChart.onPointerClickPie`:点击柱条回调。参数:`eventData`, `serieIndex`, `dataIndex` ## `RadarChart` @@ -143,6 +146,6 @@ * `RingChart.UpdateMax(float value)`:更新第一个系列第一个数据项的最大值。 [返回首页](https://github.com/XCharts-Team/XCharts) -[XCharts配置项手册](XCharts配置项手册.md) -[XCharts问答](XCharts问答.md) +[XCharts配置项手册](XChartsConfiguration-ZH.md) +[XCharts问答](XChartsFQA-ZH.md) diff --git a/Documentation/XChartsConfiguration-EN.md b/Documentation/XChartsConfiguration-EN.md new file mode 100644 index 00000000..823fa56c --- /dev/null +++ b/Documentation/XChartsConfiguration-EN.md @@ -0,0 +1,1407 @@ +# Chart Configuration + +[XCharts Homepage](https://github.com/XCharts-Team/XCharts) +[XCharts API](XChartsAPI-EN.md) +[XCharts Q&A](XChartsFQA-EN.md) + + +## Serie + +- [Bar](#Bar) +- [BaseScatter](#BaseScatter) +- [Candlestick](#Candlestick) +- [EffectScatter](#EffectScatter) +- [Heatmap](#Heatmap) +- [Line](#Line) +- [Parallel](#Parallel) +- [Pie](#Pie) +- [Radar](#Radar) +- [Ring](#Ring) +- [Scatter](#Scatter) +- [Serie](#Serie) +- [SimplifiedBar](#SimplifiedBar) +- [SimplifiedCandlestick](#SimplifiedCandlestick) +- [SimplifiedLine](#SimplifiedLine) + +## MainComponent + +- [AngleAxis](#AngleAxis) +- [Axis](#Axis) +- [Background](#Background) +- [CalendarCoord](#CalendarCoord) +- [CoordSystem](#CoordSystem) +- [DataZoom](#DataZoom) +- [GridCoord](#GridCoord) +- [Legend](#Legend) +- [MarkArea](#MarkArea) +- [MarkLine](#MarkLine) +- [ParallelAxis](#ParallelAxis) +- [ParallelCoord](#ParallelCoord) +- [PolarCoord](#PolarCoord) +- [RadarCoord](#RadarCoord) +- [RadiusAxis](#RadiusAxis) +- [Settings](#Settings) +- [SingleAxis](#SingleAxis) +- [SingleAxisCoord](#SingleAxisCoord) +- [Title](#Title) +- [Tooltip](#Tooltip) +- [VisualMap](#VisualMap) +- [XAxis](#XAxis) +- [YAxis](#YAxis) + +## ChildComponent + +- [AngleAxisTheme](#AngleAxisTheme) +- [AnimationStyle](#AnimationStyle) +- [AreaStyle](#AreaStyle) +- [ArrowStyle](#ArrowStyle) +- [AxisLabel](#AxisLabel) +- [AxisLine](#AxisLine) +- [AxisName](#AxisName) +- [AxisSplitArea](#AxisSplitArea) +- [AxisSplitLine](#AxisSplitLine) +- [AxisTheme](#AxisTheme) +- [AxisTick](#AxisTick) +- [BaseAxisTheme](#BaseAxisTheme) +- [BaseLine](#BaseLine) +- [ComponentTheme](#ComponentTheme) +- [DataZoomTheme](#DataZoomTheme) +- [Emphasis](#Emphasis) +- [EndLabelStyle](#EndLabelStyle) +- [IconStyle](#IconStyle) +- [ItemStyle](#ItemStyle) +- [LabelLine](#LabelLine) +- [LabelStyle](#LabelStyle) +- [LegendTheme](#LegendTheme) +- [Level](#Level) +- [LevelStyle](#LevelStyle) +- [LineArrow](#LineArrow) +- [LineStyle](#LineStyle) +- [Location](#Location) +- [MarkAreaData](#MarkAreaData) +- [MarkLineData](#MarkLineData) +- [PolarAxisTheme](#PolarAxisTheme) +- [RadarAxisTheme](#RadarAxisTheme) +- [RadiusAxisTheme](#RadiusAxisTheme) +- [SerieData](#SerieData) +- [SerieTheme](#SerieTheme) +- [StageColor](#StageColor) +- [SubTitleTheme](#SubTitleTheme) +- [SymbolStyle](#SymbolStyle) +- [TextLimit](#TextLimit) +- [TextStyle](#TextStyle) +- [ThemeStyle](#ThemeStyle) +- [TitleStyle](#TitleStyle) +- [TitleTheme](#TitleTheme) +- [TooltipTheme](#TooltipTheme) +- [VisualMapPieces](#VisualMapPieces) +- [VisualMapTheme](#VisualMapTheme) + +## ISerieExtraComponent + +- [AreaStyle](#AreaStyle) +- [Emphasis](#Emphasis) +- [IconStyle](#IconStyle) +- [LabelLine](#LabelLine) +- [LabelStyle](#LabelStyle) +- [LineArrow](#LineArrow) +- [TitleStyle](#TitleStyle) + +## ISerieDataComponent + +- [AreaStyle](#AreaStyle) +- [Emphasis](#Emphasis) +- [IconStyle](#IconStyle) +- [ItemStyle](#ItemStyle) +- [LabelLine](#LabelLine) +- [LabelStyle](#LabelStyle) +- [LineStyle](#LineStyle) +- [SymbolStyle](#SymbolStyle) +- [TitleStyle](#TitleStyle) + +## Other + +- [BaseSerie](#BaseSerie) +- [ChartText](#ChartText) +- [ChildComponent](#ChildComponent) +- [DebugInfo](#DebugInfo) +- [Indicator](#Indicator) +- [Lang](#Lang) +- [LangTime](#LangTime) +- [MainComponent](#MainComponent) +- [Theme](#Theme) +- [XCResourcesImporter](#XCResourcesImporter) +- [XCSettings](#XCSettings) + +## `AngleAxis` + +Inherits or Implemented: [Axis](#Axis) + +Angle axis of Polar Coordinate. + +|field|default|comment| +|--|--|--| +| `startAngle` |0 | Starting angle of axis. 0 degrees by default, standing for right position of center. | + +## `AngleAxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `AnimationStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +the animation of serie. + +|field|default|comment| +|--|--|--| +| `enable` |true | Whether to enable animation. | +| `type` | | The type of animation.
`AnimationType`:
- `Default`: he default. An animation playback mode will be selected according to the actual situation.
- `LeftToRight`: Play the animation from left to right.
- `BottomToTop`: Play the animation from bottom to top.
- `InsideOut`: Play animations from the inside out.
- `AlongPath`: Play the animation along the path.
- `Clockwise`: Play the animation clockwise.
| +| `easting` | | Easing method used for the first animation.
`AnimationEasing`:
- `Linear`:
| +| `threshold` |2000 | Whether to set graphic number threshold to animation. Animation will be disabled when graphic number is larger than threshold. | +| `fadeInDuration` |1000 | The milliseconds duration of the fadeIn animation. | +| `fadeInDelay` |0 | The milliseconds delay before updating the first animation. | +| `fadeOutDuration` |1000f | The milliseconds duration of the fadeOut animation. | +| `fadeOutDelay` |0 | 渐出动画延时(毫秒)。如果要设置单个数据项的延时,可以用代码定制:customFadeOutDelay。 | +| `dataChangeEnable` |true | 是否开启数据变更动画。 | +| `dataChangeDuration` |500 | The milliseconds duration of the data change animation. | +| `actualDuration` | | The milliseconds actual duration of the first animation. | +| `alongWithLinePath` | | | + +## `AreaStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +The style of area. + +|field|default|comment| +|--|--|--| +| `show` |true | Set this to false to prevent the areafrom showing. | +| `origin` | | the origin of area.
`AreaStyle.AreaOrigin`:
- `Auto`: to fill between axis line to data.
- `Start`: to fill between min axis value (when not inverse) to data.
- `End`: to fill between max axis value (when not inverse) to data.
| +| `color` | | the color of area,default use serie color. | +| `toColor` | | Gradient color, start color to toColor. | +| `opacity` |0.6f | Opacity of the component. Supports value from 0 to 1, and the component will not be drawn when set to 0. | +| `highlightColor` | | the color of area,default use serie color. | +| `highlightToColor` | | Gradient color, start highlightColor to highlightToColor. | + +## `ArrowStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `width` |10 | The widht of arrow. | +| `height` |15 | The height of arrow. | +| `offset` |0 | The offset of arrow. | +| `dent` |3 | The dent of arrow. | +| `color` |Color.clear | the color of arrow. | + +## `Axis` + +Inherits or Implemented: [MainComponent](#MainComponent) + +The axis in rectangular coordinate. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to show axis. | +| `type` | | the type of axis.
`Axis.AxisType`:
- `Value`: Numerical axis, suitable for continuous data.
- `Category`: Category axis, suitable for discrete category data. Data should only be set via data for this type.
- `Log`: Log axis, suitable for log data.
- `Time`: Time axis, suitable for continuous time series data.
| +| `minMaxType` | | the type of axis minmax.
`Axis.AxisMinMaxType`:
- `Default`: 0 - maximum.
- `MinMax`: minimum - maximum.
- `Custom`: Customize the minimum and maximum.
| +| `gridIndex` | | The index of the grid on which the axis are located, by default, is in the first grid. | +| `polarIndex` | | The index of the polar on which the axis are located, by default, is in the first polar. | +| `parallelIndex` | | The index of the parallel on which the axis are located, by default, is in the first parallel. | +| `position` | | the position of axis in grid.
`Axis.AxisPosition`:
- `Left`: the position of axis in grid.
- `Right`: the position of axis in grid.
- `Bottom`: the position of axis in grid.
- `Top`: the position of axis in grid.
| +| `offset` | | the offset of axis from the default position. Useful when the same position has multiple axes. | +| `min` | | The minimun value of axis.Valid when `minMaxType` is `Custom` | +| `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 | | +| `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. | +| `ceilRate` |0 | The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated. | +| `inverse` |false | Whether the axis are reversed or not. Invalid in `Category` axis. | +| `clockwise` |true | Whether the positive position of axis is in clockwise. True for clockwise by default. | +| `insertDataToHead` | | Whether to add new data at the head or at the end of the list. | +| `iconStyle` | | 图标样式。 [IconStyle](IconStyle)| +| `icons` | | 类目数据对应的图标。 | +| `data` | | Category data, available in type: 'Category' axis. | +| `axisLine` | | [AxisLine](AxisLine)| +| `axisName` | | axis name. [AxisName](AxisName)| +| `axisTick` | | axis tick. [AxisTick](AxisTick)| +| `axisLabel` | | axis label. [AxisLabel](AxisLabel)| +| `splitLine` | | axis split line. [AxisSplitLine](AxisSplitLine)| +| `splitArea` | | axis split area. [AxisSplitArea](AxisSplitArea)| + +## `AxisLabel` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +Settings related to axis label. + +|field|default|comment| +|--|--|--| +| `show` |true | Set this to false to prevent the axis label from appearing. | +| `formatter` | | | +| `interval` |0 | The display interval of the axis label. | +| `inside` |false | Set this to true so the axis labels face the inside direction. | +| `distance` | | The distance between the axis label and the axis line. | +| `numericFormatter` | | Standard numeric format strings. | +| `showAsPositiveNumber` |false | Show negative number as positive number. | +| `onZero` |false | 刻度标签显示在0刻度上。 | +| `width` |0f | 文本的宽。为0时会自动匹配。 | +| `height` |0f | 文本的高。为0时会自动匹配。 | +| `showStartLabel` |true | Whether to display the first label. | +| `showEndLabel` |true | Whether to display the last label. | +| `textLimit` | | 文本限制。 [TextLimit](TextLimit)| +| `textStyle` | | The text style of axis name. [TextStyle](TextStyle)| + +## `AxisLine` + +Inherits or Implemented: [BaseLine](#BaseLine) + +Settings related to axis line. + +|field|default|comment| +|--|--|--| +| `onZero` | | When mutiple axes exists, this option can be used to specify which axis can be "onZero" to. | +| `showArrow` | | Whether to show the arrow symbol of axis. | +| `arrow` | | the arrow of line. [ArrowStyle](ArrowStyle)| + +## `AxisName` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +the name of axis. + +|field|default|comment| +|--|--|--| +| `show` | | Whether to show axis name. | +| `name` | | the name of axis. | +| `formatter` | | The formatter of indicator's name. | +| `location` | | Location of axis name. [Location](Location)| +| `textStyle` | | The text style of axis name. [TextStyle](TextStyle)| + +## `AxisSplitArea` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +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. | + +## `AxisSplitLine` + +Inherits or Implemented: [BaseLine](#BaseLine) + +Split line of axis in grid area. + +|field|default|comment| +|--|--|--| +| `interval` | | | +| `distance` | | The distance between the split line and axis line. | +| `autoColor` | | | + +## `AxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `AxisTick` + +Inherits or Implemented: [BaseLine](#BaseLine) + +Settings related to axis tick. + +|field|default|comment| +|--|--|--| +| `alignWithLabel` | | Align axis tick with label, which is available only when boundaryGap is set to be true in category axis. | +| `inside` | | Set this to true so the axis labels face the inside direction. | +| `showStartTick` | | Whether to display the first tick. | +| `showEndTick` | | Whether to display the last tick. | +| `distance` | | The distance between the tick line and axis line. | +| `splitNumber` |0 | Number of segments that the axis is split into. | +| `autoColor` | | | + +## `Background` + +Inherits or Implemented: [MainComponent](#MainComponent) + +Background component. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to enable the 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. | + +## `Bar` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `BaseAxisTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `lineType` | | the type of line. | +| `lineWidth` |1f | the width of line. | +| `lineLength` |0f | the length of line. | +| `lineColor` | | the color of line. | +| `splitLineType` | | the type of split line. | +| `splitLineWidth` |1f | the width of split line. | +| `splitLineLength` |0f | the length of split line. | +| `splitLineColor` | | the color of line. | +| `tickWidth` |1f | the width of tick. | +| `tickLength` |5f | the length of tick. | +| `tickColor` | | the color of tick. | +| `splitAreaColors` | | | + +## `BaseLine` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +Settings related to base line. + +|field|default|comment| +|--|--|--| +| `show` | | Set this to false to prevent the axis line from showing. | +| `lineStyle` | | 线条样式 [LineStyle](LineStyle)| + +## `BaseScatter` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `BaseSerie` + + +## `CalendarCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[IUpdateRuntimeData](#IUpdateRuntimeData),[ISerieContainer](#ISerieContainer) + + +## `Candlestick` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `ChartText` + + +## `ChildComponent` + + +## `ComponentTheme` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `font` | | the font of text. | +| `textColor` | | the color of text. | +| `textBackgroundColor` | | the color of text. | +| `fontSize` |18 | the font size of text. | +| `tMPFont` | | the font of chart text。 字体。 | + +## `CoordSystem` + +Inherits or Implemented: [MainComponent](#MainComponent) + +Coordinate system component. + + +## `DataZoom` + +Inherits or Implemented: [MainComponent](#MainComponent),[IUpdateRuntimeData](#IUpdateRuntimeData) + +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. + +|field|default|comment| +|--|--|--| +| `enable` |true | Whether to show dataZoom. | +| `filterMode` | | The mode of data filter.
`DataZoom.FilterMode`:
- `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.
- `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.
- `Empty`: data that outside the window will be set to NaN, which will not lead to changes of windows of other axes.
- `None`: Do not filter data.
| +| `xAxisIndexs` | | Specify which xAxis is controlled by the dataZoom. | +| `yAxisIndexs` | | Specify which yAxis is controlled by the dataZoom. | +| `supportInside` | | Whether built-in support is supported. | +| `supportInsideScroll` |true | 是否支持坐标系内滚动 | +| `supportInsideDrag` |true | 是否支持坐标系内拖拽 | +| `supportSlider` | | Whether a slider is supported. There are separate sliders on which the user zooms or roams. | +| `supportSelect` | | 是否支持框选。提供一个选框进行数据区域缩放。 | +| `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` | | 边框宽。 | +| `backgroundColor` | | The background color of the component. | +| `left` | | Distance between dataZoom component and the left side of the container. left value is a instant pixel value like 10 or float value [0-1]. | +| `right` | | Distance between dataZoom component and the right side of the container. right value is a instant pixel value like 10 or float value [0-1]. | +| `top` | | Distance between dataZoom component and the top side of the container. top value is a instant pixel value like 10 or float value [0-1]. | +| `bottom` | | Distance between dataZoom component and the bottom side of the container. bottom value is a instant pixel value like 10 or float value [0-1]. | +| `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. 数据窗口范围的结束百分比。范围是: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`: 垂直
| +| `textStyle` | | font style. [TextStyle](TextStyle)| +| `lineStyle` | | 阴影线条样式。 [LineStyle](LineStyle)| +| `areaStyle` | | 阴影填充样式。 [AreaStyle](AreaStyle)| + +## `DataZoomTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `borderWidth` | | the width of border line. | +| `dataLineWidth` | | the width of data line. | +| `fillerColor` | | the color of dataZoom data area. | +| `borderColor` | | the color of dataZoom border. | +| `dataLineColor` | | the color of data area line. | +| `dataAreaColor` | | the color of data area line. | +| `backgroundColor` | | the background color of datazoom. | + +## `DebugInfo` + +|field|default|comment| +|--|--|--| +| `show` |true | | +| `showDebugInfo` |false | | +| `showAllChartObject` |false | | +| `foldSeries` |false | | +| `debugInfoTextStyle` | | [TextStyle](TextStyle)| + +## `EffectScatter` + +Inherits or Implemented: [BaseScatter](#BaseScatter) + + +## `Emphasis` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +高亮的图形样式和文本标签样式。 + +|field|default|comment| +|--|--|--| +| `show` | | 是否启用高亮样式。 | +| `label` | | 图形文本标签。 [LabelStyle](LabelStyle)| +| `labelLine` | | [LabelLine](LabelLine)| +| `itemStyle` | | 图形样式。 [ItemStyle](ItemStyle)| + +## `EndLabelStyle` + +Inherits or Implemented: [LabelStyle](#LabelStyle) + + +## `GridCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[IUpdateRuntimeData](#IUpdateRuntimeData),[ISerieContainer](#ISerieContainer) + +Grid component. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to show the grid in rectangular coordinate. | +| `left` |0.1f | Distance between grid component and the left side of the container. | +| `right` |0.08f | Distance between grid component and the right side of the container. | +| `top` |0.22f | Distance between grid component and the top side of the container. | +| `bottom` |0.12f | Distance between grid component and the bottom side of the container. | +| `backgroundColor` | | Background color of grid, which is transparent by default. | +| `showBorder` |false | Whether to show the grid border. | +| `borderWidth` |0f | Border width of grid. | +| `borderColor` | | The color of grid border. | + +## `Heatmap` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `IconStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +|field|default|comment| +|--|--|--| +| `show` |false | Whether the data icon is show. | +| `layer` | | 显示在上层还是在下层。
`IconStyle.Layer`:
- `UnderLabel`:
- `AboveLabel`:
| +| `align` | | 水平方向对齐方式。
`Align`:
- `Center`: 对齐方式
- `Left`: 对齐方式
- `Right`: 对齐方式
| +| `sprite` | | The image of icon. | +| `color` | | 图标颜色。 | +| `width` |20 | 图标宽。 | +| `height` |20 | 图标高。 | +| `offset` | | 图标偏移。 | +| `autoHideWhenLabelEmpty` |false | 当label内容为空时是否自动隐藏图标 | + +## `Indicator` + +Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart. + +|field|default|comment| +|--|--|--| +| `name` | | | +| `max` | | The maximum value of indicator, with default value of 0, but we recommend to set it manually. | +| `min` | | The minimum value of indicator, with default value of 0. | +| `range` | | Normal range. When the value is outside this range, the display color is automatically changed. | +| `show` | | [default:true] Set this to false to prevent the radar from showing. | +| `shape` | | Radar render type, in which 'Polygon' and 'Circle' are supported.
`RadarCoord.Shape`:
- `Polygon`: Radar render type, in which 'Polygon' and 'Circle' are supported.
- `Circle`: Radar render type, in which 'Polygon' and 'Circle' are supported.
| +| `radius` |100 | the radius of radar. | +| `splitNumber` |5 | Segments of indicator axis. | +| `center` | | the center of radar chart. | +| `axisLine` | | axis line. [AxisLine](AxisLine)| +| `axisName` | | Name options for radar indicators. [AxisName](AxisName)| +| `splitLine` | | split line. [AxisSplitLine](AxisSplitLine)| +| `splitArea` | | Split area of axis in grid area. [AxisSplitArea](AxisSplitArea)| +| `indicator` |true | Whether to show indicator. | +| `positionType` | | The position type of indicator.
`RadarCoord.PositionType`:
- `Vertice`: Display at the vertex.
- `Between`: Display at the middle of line.
| +| `indicatorGap` |10 | The gap of indicator and radar. | +| `ceilRate` |0 | The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated. | +| `isAxisTooltip` | | 是否Tooltip显示轴线上的所有数据。 | +| `outRangeColor` |Color.red | The color displayed when data out of range. | +| `connectCenter` |false | Whether serie data connect to radar center with line. | +| `lineGradient` |true | Whether need gradient for data line. | +| `indicatorList` | | the indicator list. | + +## `ItemStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) + +图形样式。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否启用。 | +| `color` | | 数据项颜色。 | +| `color0` | | 数据项颜色。 | +| `toColor` | | Gradient color1. | +| `toColor2` | | Gradient color2.Only valid in line diagrams. | +| `backgroundColor` | | 数据项背景颜色。 | +| `backgroundWidth` | | 数据项背景宽度。 | +| `centerColor` | | 中心区域颜色。 | +| `centerGap` | | 中心区域间隙。 | +| `borderWidth` |0 | 边框宽。 | +| `borderColor` | | 边框的颜色。 | +| `borderColor0` | | 边框的颜色。 | +| `borderToColor` | | 边框的渐变色。 | +| `opacity` |1 | 透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 | +| `itemMarker` | | 提示框单项的字符标志。用在Tooltip中。 | +| `itemFormatter` | | 提示框单项的字符串模版格式器。具体配置参考`Tooltip`的`formatter` | +| `numericFormatter` | | Standard numeric format strings. | +| `cornerRadius` | | The radius of rounded corner. Its unit is px. Use array to respectively specify the 4 corner radiuses((clockwise upper left, upper right, bottom right and bottom left)). | + +## `LabelLine` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +|field|default|comment| +|--|--|--| +| `show` |true | Whether the label line is showed. | +| `lineType` | | the type of visual guide line.
`LineType`:
- `Normal`: the normal line chart, 普通折线图。
- `Smooth`: the smooth line chart, 平滑曲线。
- `StepStart`: step line.
- `StepMiddle`: step line.
- `StepEnd`: step line.
| +| `lineColor` |ChartConst.clearColor32 | the color of visual guild line. | +| `lineWidth` |1.0f | the width of visual guild line. | +| `lineGap` |1.0f | the gap of container and guild line. | +| `lineLength1` |25f | The length of the first segment of visual guide line. | +| `lineLength2` |15f | The length of the second segment of visual guide line. | + +## `LabelStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +Text label of chart, to explain some data information about graphic item like value, name and so on. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether the label is showed. | +| `Position` | | | +| `offset` | | offset to the host graphic element. | +| `distance` | | 距离轴线的距离。 | +| `formatter` | | | +| `paddingLeftRight` |2f | the text padding of left and right. defaut:2. | +| `paddingTopBottom` |2f | the text padding of top and bottom. defaut:2. | +| `backgroundWidth` |0 | the width of background. If set as default value 0, it means than the background width auto set as the text width. | +| `backgroundHeight` |0 | the height of background. If set as default value 0, it means than the background height auto set as the text height. | +| `numericFormatter` | | Standard numeric format strings. | +| `autoOffset` |false | 是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 | +| `autoColor` |false | 是否开启自动颜色。当开启时,会根据已支持的serie自动设置颜色。 | +| `textStyle` | | the sytle of text. [TextStyle](TextStyle)| + +## `Lang` + +Inherits or Implemented: [ScriptableObject](#ScriptableObject) + +Language. + + +## `LangTime` + + +## `Legend` + +Inherits or Implemented: [MainComponent](#MainComponent),[IPropertyChanged](#IPropertyChanged) + +Legend component.The legend component shows different sets of tags, colors, and names. You can control which series are not displayed by clicking on the legend. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to show legend component. | +| `iconType` | | Type of legend.
`Type`:
- `Base`:
- `Serie`:
- `Top`:
| +| `selectedMode` | | Selected mode of legend, which controls whether series can be toggled displaying by clicking legends.
`VisualMap.SelectedMode`:
- `Multiple`: 多选。
- `Single`: 单选。
| +| `orient` | | Specify whether the layout of legend component is horizontal or vertical.
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `location` | | The location of legend. [Location](Location)| +| `itemWidth` |25.0f | Image width of legend symbol. | +| `itemHeight` |12.0f | Image height of legend symbol. | +| `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. | +| `textAutoColor` |false | Whether the legend text matches the color automatically. | +| `formatter` | | | +| `textStyle` | | the style of text. [TextStyle](TextStyle)| +| `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` | | 自定义的图例标记图形。 | + +## `LegendTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `unableColor` | | the color of text. | + +## `Level` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `label` | | [LabelStyle](LabelStyle)| +| `upperLabel` | | [LabelStyle](LabelStyle)| +| `itemStyle` | | [ItemStyle](ItemStyle)| + +## `LevelStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `show` |false | 是否启用LevelStyle | +| `levels` | | 各层节点对应的配置。当enableLevels为true时生效,levels[0]对应的第一层的配置,levels[1]对应第二层,依次类推。当levels中没有对应层时用默认的设置。 | + +## `Line` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `LineArrow` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent) + +|field|default|comment| +|--|--|--| +| `show` | | Whether to show the arrow. | +| `Position` | | | +| `arrow` | | the arrow of line. [ArrowStyle](ArrowStyle)| + +## `LineStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) + +The style of line. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether show line. | +| `type` | | the type of line.
`Type`:
- `Base`:
- `Serie`:
- `Top`:
| +| `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 | | +| `opacity` |1 | Opacity of the line. Supports value from 0 to 1, and the line will not be drawn when set to 0. | + +## `Location` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[IPropertyChanged](#IPropertyChanged) + +Location type. Quick to set the general location. + +|field|default|comment| +|--|--|--| +| `align` | | 对齐方式。
`Align`:
- `Center`: 对齐方式
- `Left`: 对齐方式
- `Right`: 对齐方式
| +| `left` | | Distance between component and the left side of the container. | +| `right` | | Distance between component and the left side of the container. | +| `top` | | Distance between component and the left side of the container. | +| `bottom` | | Distance between component and the left side of the container. | + +## `MainComponent` + +Inherits or Implemented: [IComparable](#IComparable) + + +## `MarkArea` + +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)| + +## `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` | | | +| `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. | +| `xValue` | | The value specified on the X-axis. A value specified when the X-axis is the category axis represents the index of the category axis data, otherwise a specific value. | +| `yValue` | | That's the value on the Y-axis. The value specified when the Y axis is the category axis represents the index of the category axis data, otherwise the specific value. | + +## `MarkLine` + +Inherits or Implemented: [MainComponent](#MainComponent) + +Use a line in the chart to illustrate. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to display the marking line. | +| `serieIndex` |0 | | +| `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. | + +## `MarkLineData` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +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` | | | +| `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. | +| `xValue` | | The value specified on the X-axis. A value specified when the X-axis is the category axis represents the index of the category axis data, otherwise a specific value. | +| `yValue` | | That's the value on the Y-axis. The value specified when the Y axis is the category axis represents the index of the category axis data, otherwise the specific value. | +| `group` |0 | Grouping. When the group is not 0, it means that this data is the starting point or end point of the marking line. Data consistent with the group form a marking line. | +| `zeroPosition` |false | Is the origin of the coordinate system. | +| `startSymbol` | | The symbol of the start point of markline. [SymbolStyle](SymbolStyle)| +| `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` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `ParallelAxis` + +Inherits or Implemented: [Axis](#Axis) + + +## `ParallelCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[IUpdateRuntimeData](#IUpdateRuntimeData),[ISerieContainer](#ISerieContainer) + +Grid component. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to show the grid in rectangular coordinate. | +| `orient` | | Orientation of the axis. By default, it's 'Vertical'. You can set it to be 'Horizonal' to make a vertical axis.
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `left` |0.1f | Distance between grid component and the left side of the container. | +| `right` |0.08f | Distance between grid component and the right side of the container. | +| `top` |0.22f | Distance between grid component and the top side of the container. | +| `bottom` |0.12f | Distance between grid component and the bottom side of the container. | +| `backgroundColor` | | Background color of grid, which is transparent by default. | + +## `Pie` + +Inherits or Implemented: [Serie](#Serie) + + +## `PolarAxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `PolarCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[ISerieContainer](#ISerieContainer) + +Polar coordinate can be used in scatter and line chart. Every polar coordinate has an angleAxis and a radiusAxis. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to show the polor component. | +| `center` | | [default:[0.5f,0.45f]]The center of ploar. The center[0] is the x-coordinate, and the center[1] is the y-coordinate. | +| `radius` |0.35f | [default:0.35f]the radius of polar. | +| `backgroundColor` | | [default:Color.clear]Background color of polar, which is transparent by default. | + +## `Radar` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `RadarAxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `RadarCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[ISerieContainer](#ISerieContainer) + +Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适用于雷达图。 + + +## `RadiusAxis` + +Inherits or Implemented: [Axis](#Axis) + +Radial axis of polar coordinate. + + +## `RadiusAxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `Ring` + +Inherits or Implemented: [Serie](#Serie) + + +## `Scatter` + +Inherits or Implemented: [BaseScatter](#BaseScatter) + + +## `Serie` + +Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) + +系列。 + +|field|default|comment| +|--|--|--| +| `index` | | The index of serie. | +| `show` |true | Whether to show serie in chart. | +| `coordSystem` | | the chart coord system of serie. | +| `serieType` | | the type of serie. | +| `serieName` | | Series name used for displaying in tooltip and filtering with legend. | +| `stack` | | If stack the value. On the same category axis, the series with the same stack name would be put on top of each other. | +| `xAxisIndex` |0 | the index of XAxis. | +| `yAxisIndex` |0 | the index of YAxis. | +| `radarIndex` |0 | Index of radar component that radar chart uses. | +| `vesselIndex` |0 | Index of vesel component that liquid chart uses. | +| `polarIndex` |0 | Index of polar component that serie uses. | +| `singleAxisIndex` |0 | Index of single axis component that serie uses. | +| `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. | +| `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时会实时计算所有数据的平均值。 | +| `lineType` | | The type of line chart.
`LineType`:
- `Normal`: the normal line chart, 普通折线图。
- `Smooth`: the smooth line chart, 平滑曲线。
- `StepStart`: step line.
- `StepMiddle`: step line.
- `StepEnd`: step line.
| +| `barType` | | 柱形图类型。
`BarType`:
- `Normal`: 普通柱形图
- `Zebra`: 斑马柱形图
- `Capsule`: 胶囊柱形图
| +| `barPercentStack` |false | 柱形图是否为百分比堆积。相同stack的serie只要有一个barPercentStack为true,则就显示成百分比堆叠柱状图。 | +| `barWidth` |0.6f | The width of the bar. Adaptive when default 0. | +| `barGap` |0.3f; // 30 | 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. | +| `barZebraWidth` |4f | 斑马线的粗细。 | +| `barZebraGap` |2f | 斑马线的间距。 | +| `min` | | 最小值。 | +| `max` | | 最大值。 | +| `minSize` |0f | 数据最小值 min 映射的宽度。 | +| `maxSize` |1f | 数据最大值 max 映射的宽度。 | +| `startAngle` | | 起始角度。和时钟一样,12点钟位置是0度,顺时针到360度。 | +| `endAngle` | | 结束角度。和时钟一样,12点钟位置是0度,顺时针到360度。 | +| `minAngle` | | The minimum angle of sector(0-360). It prevents some sector from being too small when value is small. | +| `clockwise` |true | 是否顺时针。 | +| `roundCap` | | 是否开启圆弧效果。 | +| `splitNumber` | | 刻度分割段数。最大可设置36。 | +| `clickOffset` |true | Whether offset when mouse click pie chart item. | +| `roseType` | | Whether to show as Nightingale chart.
`RoseType`:
- `None`: Don't show as Nightingale chart.不展示成南丁格尔玫瑰图
- `Radius`: Use central angle to show the percentage of data, radius to show data size.
- `Area`: All the sectors will share the same central angle, the data size is shown only through radiuses.
| +| `gap` | | gap of item. | +| `center` | | the center of chart. | +| `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才有效。 | +| `ignoreLineBreak` |false | 忽略数据时折线是断开还是连接。默认false为连接。 | +| `showAsPositiveNumber` |false | Show negative number as positive number. | +| `large` |true | 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。 开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。 缺点:优化后不能自定义设置单个数据项的样式,不能显示Label。 | +| `largeThreshold` |200 | 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 | +| `avoidLabelOverlap` |false | 在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。 | +| `radarType` | | 雷达图类型。
`RadarType`:
- `Multiple`: 多圈雷达图。此时可一个雷达里绘制多个圈,一个serieData就可组成一个圈(多维数据)。
- `Single`: 单圈雷达图。此时一个雷达只能绘制一个圈,多个serieData组成一个圈,数据取自`data[1]`。
| +| `placeHolder` |false | 占位模式。占位模式时,数据有效但不参与渲染和显示。 | +| `dataSortType` | | 组件的数据排序。
`SerieDataSortType`:
- `None`: 按 data 的顺序
- `Ascending`: 升序
- `Descending`: 降序
| +| `orient` | | 组件的朝向。
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `align` | | 组件水平方向对齐方式。
`Align`:
- `Center`: 对齐方式
- `Left`: 对齐方式
- `Right`: 对齐方式
| +| `left` | | Distance between component and the left side of the container. | +| `right` | | Distance between component and the right side of the container. | +| `top` | | Distance between component and the top side of the container. | +| `bottom` | | Distance between component and the bottom side of the container. | +| `insertDataToHead` | | Whether to add new data at the head or at the end of the list. | +| `lineStyle` | | The style of line. [LineStyle](LineStyle)| +| `symbol` | | the symbol of serie data item. [SymbolStyle](SymbolStyle)| +| `animation` | | The start animation. [AnimationStyle](AnimationStyle)| +| `itemStyle` | | The style of data item. [ItemStyle](ItemStyle)| +| `data` | | 系列中的数据内容数组。SerieData可以设置1到n维数据。 | + +## `SerieData` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +A data item of serie. + +|field|default|comment| +|--|--|--| +| `index` | | | +| `name` | | the name of data item. | +| `id` | | 数据项的唯一id。唯一id不是必须设置的。 | +| `parentId` | | | +| `itemStyles` | | | +| `labels` | | | +| `labelLines` | | | +| `emphases` | | | +| `symbols` | | | +| `iconStyles` | | | +| `lineStyles` | | | +| `areaStyles` | | | +| `titleStyles` | | | +| `data` | | An arbitrary dimension data list of data item. | + +## `SerieTheme` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `lineWidth` | | the color of text. | +| `lineSymbolSize` | | | +| `scatterSymbolSize` | | | +| `pieTooltipExtraRadius` | | 饼图鼠标移到高亮时的额外半径 | +| `selectedRate` |1.3f | | +| `pieSelectedOffset` | | 饼图选中时的中心点偏移 | +| `candlestickColor` |Color32(235, 84, 84, 255) | K线图阳线(涨)填充色 | +| `candlestickColor0` |Color32(71, 178, 98, 255) | K线图阴线(跌)填充色 | +| `candlestickBorderWidth` |1 | K线图边框宽度 | +| `candlestickBorderColor` |Color32(235, 84, 84, 255) | K线图阳线(跌)边框色 | +| `candlestickBorderColor0` |Color32(71, 178, 98, 255) | K线图阴线(跌)边框色 | + +## `Settings` + +Inherits or Implemented: [MainComponent](#MainComponent) + +Global parameter setting component. The default value can be used in general, and can be adjusted when necessary. + +|field|default|comment| +|--|--|--| +| `show` |true | | +| `maxPainter` |10 | max painter. | +| `reversePainter` |false | Painter是否逆序。逆序时index大的serie最先绘制。 | +| `basePainterMaterial` | | Base Pointer 材质球,设置后会影响Axis等。 | +| `seriePainterMaterial` | | Serie Pointer 材质球,设置后会影响所有Serie。 | +| `topPainterMaterial` | | Top Pointer 材质球,设置后会影响Tooltip等。 | +| `lineSmoothStyle` |3f | Curve smoothing factor. By adjusting the smoothing coefficient, the curvature of the curve can be changed, and different curves with slightly different appearance can be obtained. | +| `lineSmoothness` |2f | Smoothness of curve. The smaller the value, the smoother the curve, but the number of vertices will increase. | +| `lineSegmentDistance` |3f | The partition distance of a line segment. A line in a normal line chart is made up of many segments, the number of which is determined by the change in value. The smaller the number of segments, the higher the number of vertices. When the area with gradient is filled, the larger the value, the worse the transition effect. | +| `cicleSmoothness` |2f | the smoothess of cricle. | +| `legendIconLineWidth` |2 | the width of line serie legend. | +| `legendIconCornerRadius` | | The radius of rounded corner. Its unit is px. Use array to respectively specify the 4 corner radiuses((clockwise upper left, upper right, bottom right and bottom left)). | + +## `SimplifiedBar` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer),[ISimplifiedSerie](#ISimplifiedSerie) + + +## `SimplifiedCandlestick` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer),[ISimplifiedSerie](#ISimplifiedSerie) + + +## `SimplifiedLine` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer),[ISimplifiedSerie](#ISimplifiedSerie) + + +## `SingleAxis` + +Inherits or Implemented: [Axis](#Axis),[IUpdateRuntimeData](#IUpdateRuntimeData) + +Single axis. + +|field|default|comment| +|--|--|--| +| `orient` | | Orientation of the axis. By default, it's 'Horizontal'. You can set it to be 'Vertical' to make a vertical axis.
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `left` |0.1f | Distance between component and the left side of the container. | +| `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 | | + +## `SingleAxisCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem) + + +## `StageColor` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `percent` | | 结束位置百分比。 | +| `color` | | 颜色。 | + +## `SubTitleTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + + +## `SymbolStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) + +系列数据项的标记的图形 + +|field|default|comment| +|--|--|--| +| `show` |true | Whether the symbol is showed. | +| `type` | | the type of symbol.
`SymbolType`:
- `None`: 不显示标记。
- `Custom`: 自定义标记。
- `Circle`: 圆形。
- `EmptyCircle`: 空心圆。
- `Rect`: 正方形。可通过设置`itemStyle`的`cornerRadius`变成圆角矩形。
- `EmptyRect`: 空心正方形。
- `Triangle`: 三角形。
- `EmptyTriangle`: 空心三角形。
- `Diamond`: 菱形。
- `EmptyDiamond`: 空心菱形。
- `Arrow`: 箭头。
- `EmptyArrow`: 空心箭头。
| +| `sizeType` | | the type of symbol size.
`SymbolSizeType`:
- `Custom`: Specify constant for symbol size.
- `FromData`: Specify the dataIndex and dataScale to calculate symbol size.
- `Function`: Specify function for symbol size.
| +| `size` |0f | the size of symbol. | +| `selectedSize` |0f | the size of selected symbol. | +| `dataIndex` |1 | whitch data index is when the sizeType assined as FromData. | +| `dataScale` |1 | the scale of data when sizeType assined as FromData. | +| `selectedDataScale` |1.5f | the scale of selected data when sizeType assined as FromData. | +| `sizeFunction` | | the function of size when sizeType assined as Function. | +| `selectedSizeFunction` | | the function of size when sizeType assined as Function. | +| `startIndex` | | the index start to show symbol. | +| `interval` | | the interval of show symbol. | +| `forceShowLast` |false | whether to show the last symbol. | +| `gap` |0 | the gap of symbol and line segment. | +| `width` |0f | 图形的宽。 | +| `height` |0f | 图形的高。 | +| `repeat` |false | 图形是否重复。 | +| `offset` |Vector2.zero | 图形的偏移。 | +| `image` | | 自定义的标记图形。 | +| `imageType` | | | + +## `TextLimit` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +Text character limitation and adaptation component. When the length of the text exceeds the set length, it is cropped and suffixes are appended to the end.Only valid in the category axis. + +|field|default|comment| +|--|--|--| +| `enable` |false | Whether to enable text limit. | +| `maxWidth` |0 | Set the maximum width. A default of 0 indicates automatic fetch; otherwise, custom. | +| `gap` |1 | White pixel distance at both ends. | +| `suffix` | | Suffixes when the length exceeds. | + +## `TextStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +Settings related to text. + +|field|default|comment| +|--|--|--| +| `font` | | the font of text. When `null`, the theme's font is used by default. | +| `autoWrap` |false | 是否自动换行。 | +| `autoAlign` |true | 文本是否让系统自动选对齐方式。为false时才会用alignment。 | +| `rotate` |0 | Rotation of text. | +| `extraWidth` |0 | Extra width of text preferred width. | +| `offset` |Vector2.zero | the offset of position. | +| `color` | | the color of text. | +| `autoBackgroundColor` |false | | +| `backgroundColor` | | the color of text. | +| `fontSize` |0 | font size. | +| `fontStyle` | | font style. | +| `lineSpacing` |1f | text line spacing. | +| `alignment` | | 对齐方式。 | +| `tMPFont` | | | +| `tMPFontStyle` | | | +| `tMPAlignment` | | | + +## `Theme` + +Inherits or Implemented: [ScriptableObject](#ScriptableObject) + +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。 字体。 | +| `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. | +| `common` | | [ComponentTheme](ComponentTheme)| +| `title` | | [TitleTheme](TitleTheme)| +| `subTitle` | | [SubTitleTheme](SubTitleTheme)| +| `legend` | | [LegendTheme](LegendTheme)| +| `axis` | | [AxisTheme](AxisTheme)| +| `tooltip` | | [TooltipTheme](TooltipTheme)| +| `dataZoom` | | [DataZoomTheme](DataZoomTheme)| +| `visualMap` | | [VisualMapTheme](VisualMapTheme)| +| `serie` | | [SerieTheme](SerieTheme)| + +## `ThemeStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +Theme. + +|field|default|comment| +|--|--|--| +| `show` |true | | +| `sharedTheme` | | [Theme](Theme)| +| `enableCustomTheme` | | | +| `customFont` | | | +| `customBackgroundColor` | | the custom background color of chart. | +| `customColorPalette` | | | + +## `Title` + +Inherits or Implemented: [MainComponent](#MainComponent),[IPropertyChanged](#IPropertyChanged) + +Title component, including main title and subtitle. + +|field|default|comment| +|--|--|--| +| `show` |true | [default:true] Set this to false to prevent the title from showing. | +| `text` | | The main title text, supporting \n for newlines. | +| `textStyle` | | The text style of main title. [TextStyle](TextStyle)| +| `subText` | | Subtitle text, supporting for \n for newlines. | +| `subTextStyle` | | The text style of sub title. [TextStyle](TextStyle)| +| `itemGap` |0 | [default:8] The gap between the main title and subtitle. | +| `location` | | The location of title component. [Location](Location)| + +## `TitleStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent),[ISerieExtraComponent](#ISerieExtraComponent) + +the title of serie. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to show title. | +| `offsetCenter` |Vector2(0, -0.2f) | The offset position relative to the center. | +| `textStyle` | | the color of text. [TextStyle](TextStyle)| + +## `TitleTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + + +## `Tooltip` + +Inherits or Implemented: [MainComponent](#MainComponent) + +Tooltip component. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to show the tooltip component. | +| `type` | | Indicator type.
`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` | | | +| `marker` | | the marker of serie. | +| `fixedWidth` |0 | Fixed width. Higher priority than minWidth. | +| `fixedHeight` |0 | Fixed height. Higher priority than minHeight. | +| `minWidth` |0 | Minimum width. If fixedWidth has a value, get fixedWidth first. | +| `minHeight` |0 | Minimum height. If fixedHeight has a value, take priority over fixedHeight. | +| `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'. | +| `paddingLeftRight` |10 | the text padding of left and right. defaut:5. | +| `paddingTopBottom` |10 | the text padding of top and bottom. defaut:5. | +| `ignoreDataShow` |false | Whether to show ignored data on tooltip. | +| `ignoreDataDefaultContent` | | The default display character information for ignored data. | +| `showContent` |true | Whether to show the tooltip floating layer, whose default value is true. It should be configurated to be false, if you only need tooltip to trigger the event or show the axisPointer without content. | +| `alwayShowContent` |false | Whether to trigger after always display. | +| `offset` |Vector2(18f, -25f) | The position offset of tooltip relative to the mouse position. | +| `backgroundImage` | | The background image 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 | | +| `borderColor` |Color32(230, 230, 230, 255) | the color of tooltip border. | +| `lineStyle` | | the line style of indicator line. [LineStyle](LineStyle)| +| `labelTextStyle` | | the text style of content. [TextStyle](TextStyle)| +| `titleTextStyle` | | 标题的文本样式。 [TextStyle](TextStyle)| +| `columnsTextStyle` | | | + +## `TooltipTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `lineType` | | the type of line. | +| `lineWidth` |1f | the width of line. | +| `lineColor` | | the color of line. | +| `areaColor` | | the color of line. | +| `labelTextColor` | | the text color of tooltip cross indicator's axis label. | +| `labelBackgroundColor` | | the background color of tooltip cross indicator's axis label. | + +## `VisualMap` + +Inherits or Implemented: [MainComponent](#MainComponent) + +VisualMap component. Mapping data to visual elements such as colors. + +|field|default|comment| +|--|--|--| +| `show` |true | Whether to display components. If set to false, it will not show up, but the data mapping function still exists. | +| `type` | | the type of visualmap component.
`Type`:
- `Base`:
- `Serie`:
- `Top`:
| +| `selectedMode` | | the selected mode for Piecewise visualMap.
`VisualMap.SelectedMode`:
- `Multiple`: 多选。
- `Single`: 单选。
| +| `serieIndex` |0 | the serie index of visualMap. | +| `min` |0 | 范围最小值 | +| `max` |100 | 范围最大值 | +| `range` | | Specifies the position of the numeric value corresponding to the handle. Range should be within the range of [min,max]. | +| `text` | | Text on both ends. | +| `textGap` | | The distance between the two text bodies. | +| `splitNumber` |5 | 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` |false | Whether the handle used for dragging is displayed (the handle can be dragged to adjust the selected range). | +| `realtime` |true | Whether to update in real time while dragging. | +| `itemWidth` |20f | The width of the figure, that is, the width of the color bar. | +| `itemHeight` |140f | The height of the figure, that is, the height of the color bar. | +| `itemGap` |10f | 每个图元之间的间隔距离。 | +| `borderWidth` |0 | Border line width. | +| `dimension` |-1 | Specifies "which dimension" of the data to map to the visual element. "Data" is series.data. | +| `hoverLink` |true | 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. | +| `autoMinMax` |true | Automatically set min, Max value 自动设置min,max的值 | +| `orient` | | Specify whether the layout of component is horizontal or vertical.
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `location` | | The location of component. [Location](Location)| +| `inRange` | | Defines the visual color in the selected range. | +| `outOfRange` | | Defines a visual color outside of the selected range. | +| `pieces` | | 分段式每一段的相关配置。 | + +## `VisualMapPieces` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `min` | | 范围最小值 | +| `max` | | 范围最大值 | +| `label` | | 文字描述 | +| `color` | | 颜色 | + +## `VisualMapTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `borderWidth` | | the width of border. | +| `borderColor` | | the color of dataZoom border. | +| `backgroundColor` | | the background color of visualmap. | +| `triangeLen` |20f | 可视化组件的调节三角形边长。 | + +## `XAxis` + +Inherits or Implemented: [Axis](#Axis) + +The x axis in cartesian(rectangular) coordinate. + + +## `XCResourcesImporter` + +|field|default|comment| +|--|--|--| +| `XCResourcesImporter` | | | + +## `XCSettings` + +Inherits or Implemented: [ScriptableObject](#ScriptableObject) + +|field|default|comment| +|--|--|--| +| `lang` | | [Lang](Lang)| +| `font` | | | +| `tMPFont` | | | +| `fontSizeLv1` |28 | | +| `fontSizeLv2` |24 | | +| `fontSizeLv3` |20 | | +| `fontSizeLv4` |18 | | +| `axisLineType` | | | +| `axisLineWidth` |0.8f | | +| `axisSplitLineType` | | | +| `axisSplitLineWidth` |0.8f | | +| `axisTickWidth` |0.8f | | +| `axisTickLength` |5f | | +| `gaugeAxisLineWidth` |15f | | +| `gaugeAxisSplitLineWidth` |0.8f | | +| `gaugeAxisSplitLineLength` |15f | | +| `gaugeAxisTickWidth` |0.8f | | +| `gaugeAxisTickLength` |5f | | +| `tootipLineWidth` |0.8f | | +| `dataZoomBorderWidth` |0.5f | | +| `dataZoomDataLineWidth` |0.5f | | +| `visualMapBorderWidth` |0f | | +| `serieLineWidth` |1.8f | | +| `serieLineSymbolSize` |5f | | +| `serieScatterSymbolSize` |20f | | +| `serieSelectedRate` |1.3f | | +| `serieCandlestickBorderWidth` |1f | | +| `editorShowAllListData` |false | | +| `maxPainter` |10 | | +| `lineSmoothStyle` |3f | | +| `lineSmoothness` |2f | | +| `lineSegmentDistance` |3f | | +| `cicleSmoothness` |2f | | +| `visualMapTriangeLen` |20f | | +| `pieTooltipExtraRadius` |8f | | +| `pieSelectedOffset` |8f | | +| `customThemes` | | | + +## `YAxis` + +Inherits or Implemented: [Axis](#Axis) + +The x axis in cartesian(rectangular) coordinate. + +n[XCharts Homepage](https://github.com/XCharts-Team/XCharts) +[XCharts API](XChartsAPI-EN.md) +[XCharts Q&A](XChartsFQA-EN.md) diff --git a/Documentation/XChartsConfiguration-ZH.md b/Documentation/XChartsConfiguration-ZH.md new file mode 100644 index 00000000..ec9a28de --- /dev/null +++ b/Documentation/XChartsConfiguration-ZH.md @@ -0,0 +1,1407 @@ +# 配置项手册 + +[返回首页](https://github.com/XCharts-Team/XCharts) +[XChartsAPI接口](XChartsAPI-ZH.md) +[XCharts问答](XChartsFQA-ZH.md) + + +## Serie 系列 + +- [Bar](#Bar) +- [BaseScatter](#BaseScatter) +- [Candlestick](#Candlestick) +- [EffectScatter](#EffectScatter) +- [Heatmap](#Heatmap) +- [Line](#Line) +- [Parallel](#Parallel) +- [Pie](#Pie) +- [Radar](#Radar) +- [Ring](#Ring) +- [Scatter](#Scatter) +- [Serie](#Serie) +- [SimplifiedBar](#SimplifiedBar) +- [SimplifiedCandlestick](#SimplifiedCandlestick) +- [SimplifiedLine](#SimplifiedLine) + +## MainComponent 主组件 + +- [AngleAxis](#AngleAxis) +- [Axis](#Axis) +- [Background](#Background) +- [CalendarCoord](#CalendarCoord) +- [CoordSystem](#CoordSystem) +- [DataZoom](#DataZoom) +- [GridCoord](#GridCoord) +- [Legend](#Legend) +- [MarkArea](#MarkArea) +- [MarkLine](#MarkLine) +- [ParallelAxis](#ParallelAxis) +- [ParallelCoord](#ParallelCoord) +- [PolarCoord](#PolarCoord) +- [RadarCoord](#RadarCoord) +- [RadiusAxis](#RadiusAxis) +- [Settings](#Settings) +- [SingleAxis](#SingleAxis) +- [SingleAxisCoord](#SingleAxisCoord) +- [Title](#Title) +- [Tooltip](#Tooltip) +- [VisualMap](#VisualMap) +- [XAxis](#XAxis) +- [YAxis](#YAxis) + +## ChildComponent 子组件 + +- [AngleAxisTheme](#AngleAxisTheme) +- [AnimationStyle](#AnimationStyle) +- [AreaStyle](#AreaStyle) +- [ArrowStyle](#ArrowStyle) +- [AxisLabel](#AxisLabel) +- [AxisLine](#AxisLine) +- [AxisName](#AxisName) +- [AxisSplitArea](#AxisSplitArea) +- [AxisSplitLine](#AxisSplitLine) +- [AxisTheme](#AxisTheme) +- [AxisTick](#AxisTick) +- [BaseAxisTheme](#BaseAxisTheme) +- [BaseLine](#BaseLine) +- [ComponentTheme](#ComponentTheme) +- [DataZoomTheme](#DataZoomTheme) +- [Emphasis](#Emphasis) +- [EndLabelStyle](#EndLabelStyle) +- [IconStyle](#IconStyle) +- [ItemStyle](#ItemStyle) +- [LabelLine](#LabelLine) +- [LabelStyle](#LabelStyle) +- [LegendTheme](#LegendTheme) +- [Level](#Level) +- [LevelStyle](#LevelStyle) +- [LineArrow](#LineArrow) +- [LineStyle](#LineStyle) +- [Location](#Location) +- [MarkAreaData](#MarkAreaData) +- [MarkLineData](#MarkLineData) +- [PolarAxisTheme](#PolarAxisTheme) +- [RadarAxisTheme](#RadarAxisTheme) +- [RadiusAxisTheme](#RadiusAxisTheme) +- [SerieData](#SerieData) +- [SerieTheme](#SerieTheme) +- [StageColor](#StageColor) +- [SubTitleTheme](#SubTitleTheme) +- [SymbolStyle](#SymbolStyle) +- [TextLimit](#TextLimit) +- [TextStyle](#TextStyle) +- [ThemeStyle](#ThemeStyle) +- [TitleStyle](#TitleStyle) +- [TitleTheme](#TitleTheme) +- [TooltipTheme](#TooltipTheme) +- [VisualMapPieces](#VisualMapPieces) +- [VisualMapTheme](#VisualMapTheme) + +## ISerieExtraComponent Serie额外组件 + +- [AreaStyle](#AreaStyle) +- [Emphasis](#Emphasis) +- [IconStyle](#IconStyle) +- [LabelLine](#LabelLine) +- [LabelStyle](#LabelStyle) +- [LineArrow](#LineArrow) +- [TitleStyle](#TitleStyle) + +## ISerieDataComponent SerieData额外组件 + +- [AreaStyle](#AreaStyle) +- [Emphasis](#Emphasis) +- [IconStyle](#IconStyle) +- [ItemStyle](#ItemStyle) +- [LabelLine](#LabelLine) +- [LabelStyle](#LabelStyle) +- [LineStyle](#LineStyle) +- [SymbolStyle](#SymbolStyle) +- [TitleStyle](#TitleStyle) + +## Other 其他 + +- [BaseSerie](#BaseSerie) +- [ChartText](#ChartText) +- [ChildComponent](#ChildComponent) +- [DebugInfo](#DebugInfo) +- [Indicator](#Indicator) +- [Lang](#Lang) +- [LangTime](#LangTime) +- [MainComponent](#MainComponent) +- [Theme](#Theme) +- [XCResourcesImporter](#XCResourcesImporter) +- [XCSettings](#XCSettings) + +## `AngleAxis` + +Inherits or Implemented: [Axis](#Axis) + +极坐标系的角度轴。 + +|field|default|comment| +|--|--|--| +| `startAngle` |0 | 起始刻度的角度,默认为 0 度,即圆心的正右方。 | + +## `AngleAxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `AnimationStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +动画表现。 + +|field|default|comment| +|--|--|--| +| `enable` |true | 是否开启动画效果。 | +| `type` | | 动画类型。
`AnimationType`:
- `Default`: 默认。内部会根据实际情况选择一种动画播放方式。
- `LeftToRight`: 从左往右播放动画。
- `BottomToTop`: 从下往上播放动画。
- `InsideOut`: 由内到外播放动画。
- `AlongPath`: 沿着路径播放动画。
- `Clockwise`: 顺时针播放动画。
| +| `easting` | | 动画的缓动效果。
`AnimationEasing`:
- `Linear`:
| +| `threshold` |2000 | 是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。 | +| `fadeInDuration` |1000 | 设定的渐入动画时长(毫秒)。如果要设置单个数据项的渐入时长,可以用代码定制:customFadeInDuration。 | +| `fadeInDelay` |0 | 渐入动画延时(毫秒)。如果要设置单个数据项的延时,可以用代码定制:customFadeInDelay。 | +| `fadeOutDuration` |1000f | 设定的渐出动画时长(毫秒)。如果要设置单个数据项的渐出时长,可以用代码定制:customFadeOutDuration。 | +| `fadeOutDelay` |0 | 渐出动画延时(毫秒)。如果要设置单个数据项的延时,可以用代码定制:customFadeOutDelay。 | +| `dataChangeEnable` |true | 是否开启数据变更动画。 | +| `dataChangeDuration` |500 | 数据变更的动画时长(毫秒)。 | +| `actualDuration` | | 实际的动画时长(毫秒)。 | +| `alongWithLinePath` | | | + +## `AreaStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +区域填充样式。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示区域填充。 | +| `origin` | | 区域填充的起始位置。
`AreaStyle.AreaOrigin`:
- `Auto`: 填充坐标轴轴线到数据间的区域。
- `Start`: 填充坐标轴底部到数据间的区域。
- `End`: 填充坐标轴顶部到数据间的区域。
| +| `color` | | 区域填充的颜色,如果toColor不是默认值,则表示渐变色的起点颜色。 | +| `toColor` | | 渐变色的终点颜色。 | +| `opacity` |0.6f | 图形透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 | +| `highlightColor` | | 高亮时区域填充的颜色,如果highlightToColor不是默认值,则表示渐变色的起点颜色。 | +| `highlightToColor` | | 高亮时渐变色的终点颜色。 | + +## `ArrowStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `width` |10 | 箭头宽。 | +| `height` |15 | 箭头高。 | +| `offset` |0 | 箭头偏移。 | +| `dent` |3 | 箭头的凹度。 | +| `color` |Color.clear | 箭头颜色。 | + +## `Axis` + +Inherits or Implemented: [MainComponent](#MainComponent) + +直角坐标系的坐标轴组件。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示坐标轴。 | +| `type` | | 坐标轴类型。
`Axis.AxisType`:
- `Value`:
- `Category`:
- `Log`: 对数轴。适用于对数数据。
- `Time`: 时间轴。适用于连续的时序数据。
| +| `minMaxType` | | 坐标轴刻度最大最小值显示类型。
`Axis.AxisMinMaxType`:
- `Default`: 0-最大值。
- `MinMax`: 最小值-最大值。
- `Custom`: 自定义最小值最大值。
| +| `gridIndex` | | 坐标轴所在的 grid 的索引,默认位于第一个 grid。 | +| `polarIndex` | | 坐标轴所在的 ploar 的索引,默认位于第一个 polar。 | +| `parallelIndex` | | 坐标轴所在的 parallel 的索引,默认位于第一个 parallel。 | +| `position` | | 坐标轴在Grid中的位置。
`Axis.AxisPosition`:
- `Left`: 坐标轴在Grid中的位置
- `Right`: 坐标轴在Grid中的位置
- `Bottom`: 坐标轴在Grid中的位置
- `Top`: 坐标轴在Grid中的位置
| +| `offset` | | 坐标轴相对默认位置的偏移。在相同position有多个坐标轴时有用。 | +| `min` | | 设定的坐标轴刻度最小值,当minMaxType为Custom时有效。 | +| `max` | | 设定的坐标轴刻度最大值,当minMaxType为Custom时有效。 | +| `splitNumber` |0 | 坐标轴的期望的分割段数。默认为0表示自动分割。 | +| `interval` |0 | 强制设置坐标轴分割间隔。无法在类目轴中使用。 | +| `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 失效。 | +| `ceilRate` |0 | 最大最小值向上取整的倍率。默认为0时自动计算。 | +| `inverse` |false | 是否反向坐标轴。在类目轴中无效。 | +| `clockwise` |true | 刻度增长是否按顺时针,默认顺时针。 | +| `insertDataToHead` | | 添加新数据时是在列表的头部还是尾部加入。 | +| `iconStyle` | | 图标样式。 [IconStyle](IconStyle)| +| `icons` | | 类目数据对应的图标。 | +| `data` | | 类目数据,在类目轴(type: 'category')中有效。 | +| `axisLine` | | [AxisLine](AxisLine)| +| `axisName` | | 坐标轴名称。 [AxisName](AxisName)| +| `axisTick` | | 坐标轴刻度。 [AxisTick](AxisTick)| +| `axisLabel` | | 坐标轴刻度标签。 [AxisLabel](AxisLabel)| +| `splitLine` | | 坐标轴分割线。 [AxisSplitLine](AxisSplitLine)| +| `splitArea` | | 坐标轴分割区域。 [AxisSplitArea](AxisSplitArea)| + +## `AxisLabel` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +坐标轴刻度标签的相关设置。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示刻度标签。 | +| `formatter` | | | +| `interval` |0 | 坐标轴刻度标签的显示间隔,在类目轴中有效。0表示显示所有标签,1表示隔一个隔显示一个标签,以此类推。 | +| `inside` |false | 刻度标签是否朝内,默认朝外。 | +| `distance` | | 刻度标签与轴线之间的距离。 | +| `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 | +| `showAsPositiveNumber` |false | 将负数数值显示为正数。一般和`Serie`的`showAsPositiveNumber`配合使用。 | +| `onZero` |false | 刻度标签显示在0刻度上。 | +| `width` |0f | 文本的宽。为0时会自动匹配。 | +| `height` |0f | 文本的高。为0时会自动匹配。 | +| `showStartLabel` |true | 是否显示第一个文本。 | +| `showEndLabel` |true | 是否显示最后一个文本。 | +| `textLimit` | | 文本限制。 [TextLimit](TextLimit)| +| `textStyle` | | 文本样式。 [TextStyle](TextStyle)| + +## `AxisLine` + +Inherits or Implemented: [BaseLine](#BaseLine) + +坐标轴轴线。 + +|field|default|comment| +|--|--|--| +| `onZero` | | X 轴或者 Y 轴的轴线是否在另一个轴的 0 刻度上,只有在另一个轴为数值轴且包含 0 刻度时有效。 | +| `showArrow` | | 是否显示箭头。 | +| `arrow` | | 轴线箭头。 [ArrowStyle](ArrowStyle)| + +## `AxisName` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +坐标轴名称。 + +|field|default|comment| +|--|--|--| +| `show` | | 是否显示坐标名称。 | +| `name` | | 坐标轴名称。 | +| `formatter` | | 指示器名称显示的格式器。可用在雷达图。 | +| `location` | | 坐标轴名称显示位置。 [Location](Location)| +| `textStyle` | | 文本样式。 [TextStyle](TextStyle)| + +## `AxisSplitArea` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +坐标轴在 grid 区域中的分隔区域,默认不显示。 + +|field|default|comment| +|--|--|--| +| `show` | | 是否显示分隔区域。 | +| `color` | | Dark and light colors in turns are used by default. | + +## `AxisSplitLine` + +Inherits or Implemented: [BaseLine](#BaseLine) + +坐标轴在 grid 区域中的分隔线。 + +|field|default|comment| +|--|--|--| +| `interval` | | | +| `distance` | | 刻度线与轴线的距离。 | +| `autoColor` | | | + +## `AxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `AxisTick` + +Inherits or Implemented: [BaseLine](#BaseLine) + +坐标轴刻度相关设置。 + +|field|default|comment| +|--|--|--| +| `alignWithLabel` | | 类目轴中在 boundaryGap 为 true 的时候有效,可以保证刻度线和标签对齐。 | +| `inside` | | 坐标轴刻度是否朝内,默认朝外。 | +| `showStartTick` | | 是否显示第一个刻度。 | +| `showEndTick` | | 是否显示最后一个刻度。 | +| `distance` | | 刻度线与轴线的距离。 | +| `splitNumber` |0 | 分隔线之间分割的刻度数。 | +| `autoColor` | | | + +## `Background` + +Inherits or Implemented: [MainComponent](#MainComponent) + +背景组件。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否启用背景组件。 | +| `image` | | 背景图。 | +| `imageType` | | 背景图填充类型。 | +| `imageColor` | | 背景图颜色。 | +| `hideThemeBackgroundColor` |true | 当background组件开启时,是否隐藏主题中设置的背景色。 | + +## `Bar` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `BaseAxisTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `lineType` | | 坐标轴线类型。 | +| `lineWidth` |1f | 坐标轴线宽。 | +| `lineLength` |0f | 坐标轴线长。 | +| `lineColor` | | 坐标轴线颜色。 | +| `splitLineType` | | 分割线线类型。 | +| `splitLineWidth` |1f | 分割线线宽。 | +| `splitLineLength` |0f | 分割线线长。 | +| `splitLineColor` | | 分割线线颜色。 | +| `tickWidth` |1f | 刻度线线宽。 | +| `tickLength` |5f | 刻度线线长。 | +| `tickColor` | | 坐标轴线颜色。 | +| `splitAreaColors` | | | + +## `BaseLine` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +线条基础配置。 + +|field|default|comment| +|--|--|--| +| `show` | | 是否显示坐标轴轴线。 | +| `lineStyle` | | 线条样式 [LineStyle](LineStyle)| + +## `BaseScatter` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `BaseSerie` + + +## `CalendarCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[IUpdateRuntimeData](#IUpdateRuntimeData),[ISerieContainer](#ISerieContainer) + + +## `Candlestick` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `ChartText` + + +## `ChildComponent` + + +## `ComponentTheme` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `font` | | 字体。 | +| `textColor` | | 文本颜色。 | +| `textBackgroundColor` | | 文本颜色。 | +| `fontSize` |18 | 文本字体大小。 | +| `tMPFont` | | the font of chart text。 字体。 | + +## `CoordSystem` + +Inherits or Implemented: [MainComponent](#MainComponent) + +坐标系系统。 + + +## `DataZoom` + +Inherits or Implemented: [MainComponent](#MainComponent),[IUpdateRuntimeData](#IUpdateRuntimeData) + +DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。 + +|field|default|comment| +|--|--|--| +| `enable` |true | 是否显示缩放区域。 | +| `filterMode` | | 数据过滤类型。
`DataZoom.FilterMode`:
- `Filter`: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。
- `WeakFilter`: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。
- `Empty`: 当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。
- `None`: 不过滤数据,只改变数轴范围。
| +| `xAxisIndexs` | | 控制的 x 轴索引列表。 | +| `yAxisIndexs` | | 控制的 y 轴索引列表。 | +| `supportInside` | | 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). | +| `supportInsideScroll` |true | 是否支持坐标系内滚动 | +| `supportInsideDrag` |true | 是否支持坐标系内拖拽 | +| `supportSlider` | | 是否支持滑动条。有单独的滑动条,用户在滑动条上进行缩放或漫游。 | +| `supportSelect` | | 是否支持框选。提供一个选框进行数据区域缩放。 | +| `showDataShadow` | | 是否显示数据阴影。数据阴影可以简单地反应数据走势。 | +| `showDetail` | | 是否显示detail,即拖拽时候显示详细数值信息。 | +| `zoomLock` | | 是否锁定选择区域(或叫做数据窗口)的大小。 如果设置为 true 则锁定选择区域的大小,也就是说,只能平移,不能缩放。 | +| `realtime` | | | +| `fillerColor` | | 数据区域颜色。 | +| `borderColor` | | 边框颜色。 | +| `borderWidth` | | 边框宽。 | +| `backgroundColor` | | 组件的背景颜色。 | +| `left` | | 组件离容器左侧的距离。 | +| `right` | | 组件离容器右侧的距离。 | +| `top` | | 组件离容器上侧的距离。 | +| `bottom` | | 组件离容器下侧的距离。 | +| `rangeMode` | | 取绝对值还是百分比。
`DataZoom.RangeMode`:
- `//Value`: The value type of start and end.取值类型
- `Percent`: 百分比。
| +| `start` | | 数据窗口范围的起始百分比。范围是:0 ~ 100。 | +| `end` | | The end percentage of the window out of the data extent, in the range of 0 ~ 100. 数据窗口范围的结束百分比。范围是:0 ~ 100。 | +| `startValue` | | | +| `endValue` | | | +| `minShowNum` |1 | 最小显示数据个数。当DataZoom放大到最大时,最小显示的数据个数。 | +| `scrollSensitivity` |1.1f | 缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。 | +| `orient` | | 布局方式是横还是竖。不仅是布局方式,对于直角坐标系而言,也决定了,缺省情况控制横向数轴还是纵向数轴。
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `textStyle` | | 文字格式。 [TextStyle](TextStyle)| +| `lineStyle` | | 阴影线条样式。 [LineStyle](LineStyle)| +| `areaStyle` | | 阴影填充样式。 [AreaStyle](AreaStyle)| + +## `DataZoomTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `borderWidth` | | 边框线宽。 | +| `dataLineWidth` | | 数据阴影线宽。 | +| `fillerColor` | | 数据区域颜色。 | +| `borderColor` | | 边框颜色。 | +| `dataLineColor` | | 数据阴影的线条颜色。 | +| `dataAreaColor` | | 数据阴影的填充颜色。 | +| `backgroundColor` | | 背景颜色。 | + +## `DebugInfo` + +|field|default|comment| +|--|--|--| +| `show` |true | | +| `showDebugInfo` |false | | +| `showAllChartObject` |false | | +| `foldSeries` |false | | +| `debugInfoTextStyle` | | [TextStyle](TextStyle)| + +## `EffectScatter` + +Inherits or Implemented: [BaseScatter](#BaseScatter) + + +## `Emphasis` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +高亮的图形样式和文本标签样式。 + +|field|default|comment| +|--|--|--| +| `show` | | 是否启用高亮样式。 | +| `label` | | 图形文本标签。 [LabelStyle](LabelStyle)| +| `labelLine` | | [LabelLine](LabelLine)| +| `itemStyle` | | 图形样式。 [ItemStyle](ItemStyle)| + +## `EndLabelStyle` + +Inherits or Implemented: [LabelStyle](#LabelStyle) + + +## `GridCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[IUpdateRuntimeData](#IUpdateRuntimeData),[ISerieContainer](#ISerieContainer) + +Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示直角坐标系网格。 | +| `left` |0.1f | grid 组件离容器左侧的距离。 | +| `right` |0.08f | grid 组件离容器右侧的距离。 | +| `top` |0.22f | grid 组件离容器上侧的距离。 | +| `bottom` |0.12f | grid 组件离容器下侧的距离。 | +| `backgroundColor` | | 网格背景色,默认透明。 | +| `showBorder` |false | 是否显示网格边框。 | +| `borderWidth` |0f | 网格边框宽。 | +| `borderColor` | | 网格边框颜色。 | + +## `Heatmap` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `IconStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +|field|default|comment| +|--|--|--| +| `show` |false | 是否显示图标。 | +| `layer` | | 显示在上层还是在下层。
`IconStyle.Layer`:
- `UnderLabel`:
- `AboveLabel`:
| +| `align` | | 水平方向对齐方式。
`Align`:
- `Center`: 对齐方式
- `Left`: 对齐方式
- `Right`: 对齐方式
| +| `sprite` | | 图标的图片。 | +| `color` | | 图标颜色。 | +| `width` |20 | 图标宽。 | +| `height` |20 | 图标高。 | +| `offset` | | 图标偏移。 | +| `autoHideWhenLabelEmpty` |false | 当label内容为空时是否自动隐藏图标 | + +## `Indicator` + +雷达图的指示器,用来指定雷达图中的多个变量(维度)。 + +|field|default|comment| +|--|--|--| +| `name` | | | +| `max` | | 指示器的最大值,默认为 0 无限制。 | +| `min` | | 指示器的最小值,默认为 0 无限制。 | +| `range` | | 正常值范围。当数值不在这个范围时,会自动变更显示颜色。 | +| `show` | | 是否显示雷达坐标系组件。 | +| `shape` | | 雷达图绘制类型,支持 'Polygon' 和 'Circle'。
`RadarCoord.Shape`:
- `Polygon`: 雷达图绘制类型,支持 'Polygon' 和 'Circle'。
- `Circle`: 雷达图绘制类型,支持 'Polygon' 和 'Circle'。
| +| `radius` |100 | 雷达图的半径。 | +| `splitNumber` |5 | 指示器轴的分割段数。 | +| `center` | | 雷达图的中心点。数组的第一项是横坐标,第二项是纵坐标。 当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。 | +| `axisLine` | | 轴线。 [AxisLine](AxisLine)| +| `axisName` | | 雷达图每个指示器名称的配置项。 [AxisName](AxisName)| +| `splitLine` | | 分割线。 [AxisSplitLine](AxisSplitLine)| +| `splitArea` | | 分割区域。 [AxisSplitArea](AxisSplitArea)| +| `indicator` |true | 是否显示指示器。 | +| `positionType` | | 显示位置类型。
`RadarCoord.PositionType`:
- `Vertice`: 显示在顶点处。
- `Between`: 显示在两者之间。
| +| `indicatorGap` |10 | 指示器和雷达的间距。 | +| `ceilRate` |0 | 最大最小值向上取整的倍率。默认为0时自动计算。 | +| `isAxisTooltip` | | 是否Tooltip显示轴线上的所有数据。 | +| `outRangeColor` |Color.red | 数值超出范围时显示的颜色。 | +| `connectCenter` |false | 数值是否连线到中心点。 | +| `lineGradient` |true | 数值线段是否需要渐变。 | +| `indicatorList` | | 指示器列表。 | + +## `ItemStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) + +图形样式。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否启用。 | +| `color` | | 数据项颜色。 | +| `color0` | | 数据项颜色。 | +| `toColor` | | 渐变色的颜色1。 | +| `toColor2` | | 渐变色的颜色2。只在折线图中有效。 | +| `backgroundColor` | | 数据项背景颜色。 | +| `backgroundWidth` | | 数据项背景宽度。 | +| `centerColor` | | 中心区域颜色。 | +| `centerGap` | | 中心区域间隙。 | +| `borderWidth` |0 | 边框宽。 | +| `borderColor` | | 边框的颜色。 | +| `borderColor0` | | 边框的颜色。 | +| `borderToColor` | | 边框的渐变色。 | +| `opacity` |1 | 透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 | +| `itemMarker` | | 提示框单项的字符标志。用在Tooltip中。 | +| `itemFormatter` | | 提示框单项的字符串模版格式器。具体配置参考`Tooltip`的`formatter` | +| `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 | +| `cornerRadius` | | 圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。 | + +## `LabelLine` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示视觉引导线。 | +| `lineType` | | 视觉引导线类型。
`LineType`:
- `Normal`: the normal line chart, 普通折线图。
- `Smooth`: the smooth line chart, 平滑曲线。
- `StepStart`: 阶梯线图:当前点。
- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。
- `StepEnd`: 阶梯线图:下一个拐点。
| +| `lineColor` |ChartConst.clearColor32 | 视觉引导线颜色。默认和serie一致取自调色板。 | +| `lineWidth` |1.0f | 视觉引导线的宽度。 | +| `lineGap` |1.0f | 视觉引导线和容器的间距。 | +| `lineLength1` |25f | 视觉引导线第一段的长度。 | +| `lineLength2` |15f | 视觉引导线第二段的长度。 | + +## `LabelStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent) + +图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示文本标签。 | +| `Position` | | | +| `offset` | | 距离图形元素的偏移 | +| `distance` | | 距离轴线的距离。 | +| `formatter` | | | +| `paddingLeftRight` |2f | 左右边距。 | +| `paddingTopBottom` |2f | 上下边距。 | +| `backgroundWidth` |0 | 标签的背景宽度。一般不用指定,不指定时则自动是文字的宽度。 | +| `backgroundHeight` |0 | 标签的背景高度。一般不用指定,不指定时则自动是文字的高度。 | +| `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 | +| `autoOffset` |false | 是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 | +| `autoColor` |false | 是否开启自动颜色。当开启时,会根据已支持的serie自动设置颜色。 | +| `textStyle` | | 文本样式。 [TextStyle](TextStyle)| + +## `Lang` + +Inherits or Implemented: [ScriptableObject](#ScriptableObject) + +国际化语言表。 + + +## `LangTime` + + +## `Legend` + +Inherits or Implemented: [MainComponent](#MainComponent),[IPropertyChanged](#IPropertyChanged) + +图例组件。 图例组件展现了不同系列的标记,颜色和名字。可以通过点击图例控制哪些系列不显示。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示图例组件。 | +| `iconType` | | 图例类型。 [default:Type.Auto]
`Type`:
- `Base`:
- `Serie`:
- `Top`:
| +| `selectedMode` | | 选择模式。控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 None 关闭。 [default:SelectedMode.Multiple]
`VisualMap.SelectedMode`:
- `Multiple`: 多选。
- `Single`: 单选。
| +| `orient` | | 布局方式是横还是竖。 [default:Orient.Horizonal]
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `location` | | 图例显示的位置。 [default:Location.defaultTop] [Location](Location)| +| `itemWidth` |25.0f | 图例标记的图形宽度。 [default:24f] | +| `itemHeight` |12.0f | 图例标记的图形高度。 [default:12f] | +| `itemGap` |10f | 图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 [default:10f] | +| `itemAutoColor` |true | 图例标记的图形是否自动匹配颜色。 [default:true] | +| `textAutoColor` |false | 图例标记的文本是否自动匹配颜色。 [default:false] | +| `formatter` | | | +| `textStyle` | | 文本样式。 [TextStyle](TextStyle)| +| `data` | | If data is not specified, it will be auto collected from series. | +| `icons` | | 自定义的图例标记图形。 | + +## `LegendTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `unableColor` | | 文本颜色。 | + +## `Level` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `label` | | [LabelStyle](LabelStyle)| +| `upperLabel` | | [LabelStyle](LabelStyle)| +| `itemStyle` | | [ItemStyle](ItemStyle)| + +## `LevelStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `show` |false | 是否启用LevelStyle | +| `levels` | | 各层节点对应的配置。当enableLevels为true时生效,levels[0]对应的第一层的配置,levels[1]对应第二层,依次类推。当levels中没有对应层时用默认的设置。 | + +## `Line` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `LineArrow` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent](#ISerieExtraComponent) + +|field|default|comment| +|--|--|--| +| `show` | | 是否显示箭头。 | +| `Position` | | | +| `arrow` | | 箭头。 [ArrowStyle](ArrowStyle)| + +## `LineStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) + +线条样式。 注: 修改 lineStyle 中的颜色不会影响图例颜色,如果需要图例颜色和折线图颜色一致,需修改 itemStyle.color,线条颜色默认也会取该颜色。 toColor,toColor2可设置水平方向的渐变,如需要设置垂直方向的渐变,可使用VisualMap。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。 | +| `type` | | 线的类型。
`Type`:
- `Base`:
- `Serie`:
- `Top`:
| +| `color` | | 线的颜色。 | +| `toColor` | | 线的渐变颜色(需要水平方向渐变时)。 | +| `toColor2` | | 线的渐变颜色2(需要水平方向三个渐变色的渐变时)。 | +| `width` |0 | | +| `length` |0 | | +| `opacity` |1 | 线的透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 | + +## `Location` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[IPropertyChanged](#IPropertyChanged) + +位置类型。通过Align快速设置大体位置,再通过left,right,top,bottom微调具体位置。 + +|field|default|comment| +|--|--|--| +| `align` | | 对齐方式。
`Align`:
- `Center`: 对齐方式
- `Left`: 对齐方式
- `Right`: 对齐方式
| +| `left` | | 离容器左侧的距离。 | +| `right` | | 离容器右侧的距离。 | +| `top` | | 离容器上侧的距离。 | +| `bottom` | | 离容器下侧的距离。 | + +## `MainComponent` + +Inherits or Implemented: [IComparable](#IComparable) + + +## `MarkArea` + +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)| + +## `MarkAreaData` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `type` | | 特殊的标域类型,用于标注最大值最小值等。
`MarkAreaType`:
- `None`: 标域类型
- `Min`: 最小值。
- `Max`: 最大值。
- `Average`: 平均值。
- `Median`: 中位数。
| +| `name` | | | +| `dimension` |1 | 从哪个维度的数据计算最大最小值等。 | +| `xPosition` | | 相对原点的 x 坐标,单位像素。当type为None时有效。 | +| `yPosition` | | 相对原点的 y 坐标,单位像素。当type为None时有效。 | +| `xValue` | | X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 | +| `yValue` | | Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 | + +## `MarkLine` + +Inherits or Implemented: [MainComponent](#MainComponent) + +图表标线。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示标线。 | +| `serieIndex` |0 | | +| `animation` | | 标线的动画样式。 [AnimationStyle](AnimationStyle)| +| `data` | | 标线的数据列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表 示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。 | + +## `MarkLineData` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +Data of marking line. 图表标线的数据。 + +|field|default|comment| +|--|--|--| +| `type` | | 特殊的标线类型,用于标注最大值最小值等。
`MarkLineType`:
- `None`: 标线类型
- `Min`: 最小值。
- `Max`: 最大值。
- `Average`: 平均值。
- `Median`: 中位数。
| +| `name` | | | +| `dimension` |1 | 从哪个维度的数据计算最大最小值等。 | +| `xPosition` | | 相对原点的 x 坐标,单位像素。当type为None时有效。 | +| `yPosition` | | 相对原点的 y 坐标,单位像素。当type为None时有效。 | +| `xValue` | | X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 | +| `yValue` | | Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 | +| `group` |0 | 分组。当group不为0时,表示这个data是标线的起点或终点,group一致的data组成一条标线。 | +| `zeroPosition` |false | 是否为坐标系原点。 | +| `startSymbol` | | 起始点的图形标记。 [SymbolStyle](SymbolStyle)| +| `endSymbol` | | 结束点的图形标记。 [SymbolStyle](SymbolStyle)| +| `lineStyle` | | 标线样式。 [LineStyle](LineStyle)| +| `label` | | 文本样式。可设置position为Start、Middle和End在不同的位置显示文本。 [LabelStyle](LabelStyle)| +| `emphasis` | | [Emphasis](Emphasis)| + +## `Parallel` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `ParallelAxis` + +Inherits or Implemented: [Axis](#Axis) + + +## `ParallelCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[IUpdateRuntimeData](#IUpdateRuntimeData),[ISerieContainer](#ISerieContainer) + +Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示直角坐标系网格。 | +| `orient` | | 坐标轴朝向。默认为垂直朝向。
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `left` |0.1f | grid 组件离容器左侧的距离。 | +| `right` |0.08f | grid 组件离容器右侧的距离。 | +| `top` |0.22f | grid 组件离容器上侧的距离。 | +| `bottom` |0.12f | grid 组件离容器下侧的距离。 | +| `backgroundColor` | | 网格背景色,默认透明。 | + +## `Pie` + +Inherits or Implemented: [Serie](#Serie) + + +## `PolarAxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `PolarCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[ISerieContainer](#ISerieContainer) + +极坐标系组件。 极坐标系,可以用于散点图和折线图。每个极坐标系拥有一个角度轴和一个半径轴。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示极坐标。 | +| `center` | | When value between 0 and 1 represents a percentage relative to the chart. | +| `radius` |0.35f | 极坐标的半径。 | +| `backgroundColor` | | 极坐标的背景色,默认透明。 | + +## `Radar` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer) + + +## `RadarAxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `RadarCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem),[ISerieContainer](#ISerieContainer) + +Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适用于雷达图。 + + +## `RadiusAxis` + +Inherits or Implemented: [Axis](#Axis) + +极坐标系的径向轴。 + + +## `RadiusAxisTheme` + +Inherits or Implemented: [BaseAxisTheme](#BaseAxisTheme) + + +## `Ring` + +Inherits or Implemented: [Serie](#Serie) + + +## `Scatter` + +Inherits or Implemented: [BaseScatter](#BaseScatter) + + +## `Serie` + +Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) + +系列。 + +|field|default|comment| +|--|--|--| +| `index` | | 系列索引。 | +| `show` |true | 系列是否显示在图表上。 | +| `coordSystem` | | 使用的坐标系。 | +| `serieType` | | 系列类型。 | +| `serieName` | | 系列名称,用于 tooltip 的显示,legend 的图例筛选。 | +| `stack` | | 数据堆叠,同个类目轴上系列配置相同的stack值后,后一个系列的值会在前一个系列的值上相加。 | +| `xAxisIndex` |0 | 使用X轴的index。 | +| `yAxisIndex` |0 | 使用Y轴的index。 | +| `radarIndex` |0 | 雷达图所使用的 radar 组件的 index。 | +| `vesselIndex` |0 | 水位图所使用的 vessel 组件的 index。 | +| `polarIndex` |0 | 所使用的 polar 组件的 index。 | +| `singleAxisIndex` |0 | 所使用的 singleAxis 组件的 index。 | +| `parallelIndex` |0 | 所使用的 parallel coord 组件的 index。 | +| `minShow` | | 系列所显示数据的最小索引 | +| `maxShow` | | 系列所显示数据的最大索引 | +| `maxCache` | | The first data will be remove when the size of serie data is larger then maxCache. | +| `sampleDist` |0 | 采样的最小像素距离,默认为0时不采样。当两个数据点间的水平距离小于改值时,开启采样,保证两点间的水平距离不小于改值。 | +| `sampleType` | | 采样类型。当sampleDist大于0时有效。
`SampleType`:
- `Peak`: 取峰值。
- `Average`: 取过滤点的平均值。
- `Max`: 取过滤点的最大值。
- `Min`: 取过滤点的最小值。
- `Sum`: 取过滤点的和。
| +| `sampleAverage` |0 | 设定的采样平均值。当sampleType 为 Peak 时,用于和过滤数据的平均值做对比是取最大值还是最小值。默认为0时会实时计算所有数据的平均值。 | +| `lineType` | | 折线图样式类型。
`LineType`:
- `Normal`: the normal line chart, 普通折线图。
- `Smooth`: the smooth line chart, 平滑曲线。
- `StepStart`: 阶梯线图:当前点。
- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。
- `StepEnd`: 阶梯线图:下一个拐点。
| +| `barType` | | 柱形图类型。
`BarType`:
- `Normal`: 普通柱形图
- `Zebra`: 斑马柱形图
- `Capsule`: 胶囊柱形图
| +| `barPercentStack` |false | 柱形图是否为百分比堆积。相同stack的serie只要有一个barPercentStack为true,则就显示成百分比堆叠柱状图。 | +| `barWidth` |0.6f | 柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 | +| `barGap` |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. | +| `barZebraWidth` |4f | 斑马线的粗细。 | +| `barZebraGap` |2f | 斑马线的间距。 | +| `min` | | 最小值。 | +| `max` | | 最大值。 | +| `minSize` |0f | 数据最小值 min 映射的宽度。 | +| `maxSize` |1f | 数据最大值 max 映射的宽度。 | +| `startAngle` | | 起始角度。和时钟一样,12点钟位置是0度,顺时针到360度。 | +| `endAngle` | | 结束角度。和时钟一样,12点钟位置是0度,顺时针到360度。 | +| `minAngle` | | 最小的扇区角度(0-360)。用于防止某个值过小导致扇区太小影响交互。 | +| `clockwise` |true | 是否顺时针。 | +| `roundCap` | | 是否开启圆弧效果。 | +| `splitNumber` | | 刻度分割段数。最大可设置36。 | +| `clickOffset` |true | 鼠标点击时是否开启偏移,一般用在PieChart图表中。 | +| `roseType` | | 是否展示成南丁格尔图,通过半径区分数据大小。
`RoseType`:
- `None`: Don't show as Nightingale chart.不展示成南丁格尔玫瑰图
- `Radius`: 扇区圆心角展现数据的百分比,半径展现数据的大小。
- `Area`: 所有扇区圆心角相同,仅通过半径展现数据大小。
| +| `gap` | | 间距。 | +| `center` | | 中心点。 | +| `radius` | | 半径。radius[0]表示内径,radius[1]表示外径。 | +| `showDataDimension` | | 数据项里的数据维数。 | +| `showDataName` | | 在Editor的inpsector上是否显示name参数 | +| `showDataIcon` | | | +| `clip` |false | 是否裁剪超出坐标系部分的图形。 | +| `ignore` |false | 是否开启忽略数据。当为 true 时,数据值为 ignoreValue 时不进行绘制。 | +| `ignoreValue` |0 | 忽略数据的默认值。当ignore为true才有效。 | +| `ignoreLineBreak` |false | 忽略数据时折线是断开还是连接。默认false为连接。 | +| `showAsPositiveNumber` |false | 将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。 | +| `large` |true | 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。 开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。 缺点:优化后不能自定义设置单个数据项的样式,不能显示Label。 | +| `largeThreshold` |200 | 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 | +| `avoidLabelOverlap` |false | 在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。 | +| `radarType` | | 雷达图类型。
`RadarType`:
- `Multiple`: 多圈雷达图。此时可一个雷达里绘制多个圈,一个serieData就可组成一个圈(多维数据)。
- `Single`: 单圈雷达图。此时一个雷达只能绘制一个圈,多个serieData组成一个圈,数据取自`data[1]`。
| +| `placeHolder` |false | 占位模式。占位模式时,数据有效但不参与渲染和显示。 | +| `dataSortType` | | 组件的数据排序。
`SerieDataSortType`:
- `None`: 按 data 的顺序
- `Ascending`: 升序
- `Descending`: 降序
| +| `orient` | | 组件的朝向。
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `align` | | 组件水平方向对齐方式。
`Align`:
- `Center`: 对齐方式
- `Left`: 对齐方式
- `Right`: 对齐方式
| +| `left` | | 组件离容器左侧的距离。 | +| `right` | | 组件离容器右侧的距离。 | +| `top` | | 组件离容器上侧的距离。 | +| `bottom` | | 组件离容器下侧的距离。 | +| `insertDataToHead` | | 添加新数据时是在列表的头部还是尾部加入。 | +| `lineStyle` | | 线条样式。 [LineStyle](LineStyle)| +| `symbol` | | 标记的图形。 [SymbolStyle](SymbolStyle)| +| `animation` | | 起始动画。 [AnimationStyle](AnimationStyle)| +| `itemStyle` | | 图形样式。 [ItemStyle](ItemStyle)| +| `data` | | 系列中的数据内容数组。SerieData可以设置1到n维数据。 | + +## `SerieData` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +系列中的一个数据项。可存储数据名和1-n维个数据。 + +|field|default|comment| +|--|--|--| +| `index` | | | +| `name` | | 数据项名称。 | +| `id` | | 数据项的唯一id。唯一id不是必须设置的。 | +| `parentId` | | | +| `itemStyles` | | | +| `labels` | | | +| `labelLines` | | | +| `emphases` | | | +| `symbols` | | | +| `iconStyles` | | | +| `lineStyles` | | | +| `areaStyles` | | | +| `titleStyles` | | | +| `data` | | 可指定任意维数的数值列表。 | + +## `SerieTheme` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `lineWidth` | | 文本颜色。 | +| `lineSymbolSize` | | | +| `scatterSymbolSize` | | | +| `pieTooltipExtraRadius` | | 饼图鼠标移到高亮时的额外半径 | +| `selectedRate` |1.3f | | +| `pieSelectedOffset` | | 饼图选中时的中心点偏移 | +| `candlestickColor` |Color32(235, 84, 84, 255) | K线图阳线(涨)填充色 | +| `candlestickColor0` |Color32(71, 178, 98, 255) | K线图阴线(跌)填充色 | +| `candlestickBorderWidth` |1 | K线图边框宽度 | +| `candlestickBorderColor` |Color32(235, 84, 84, 255) | K线图阳线(跌)边框色 | +| `candlestickBorderColor0` |Color32(71, 178, 98, 255) | K线图阴线(跌)边框色 | + +## `Settings` + +Inherits or Implemented: [MainComponent](#MainComponent) + +全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。 + +|field|default|comment| +|--|--|--| +| `show` |true | | +| `maxPainter` |10 | 设定的painter数量。 | +| `reversePainter` |false | Painter是否逆序。逆序时index大的serie最先绘制。 | +| `basePainterMaterial` | | Base Pointer 材质球,设置后会影响Axis等。 | +| `seriePainterMaterial` | | Serie Pointer 材质球,设置后会影响所有Serie。 | +| `topPainterMaterial` | | Top Pointer 材质球,设置后会影响Tooltip等。 | +| `lineSmoothStyle` |3f | 曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。 | +| `lineSmoothness` |2f | When the area with gradient is filled, the larger the value, the worse the transition effect. | +| `lineSegmentDistance` |3f | 线段的分割距离。普通折线图的线是由很多线段组成,段数由该数值决定。值越小段数越多,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。 | +| `cicleSmoothness` |2f | 圆形的平滑度。数越小圆越平滑,但顶点数也会随之增加。 | +| `legendIconLineWidth` |2 | Line类型图例图标的线条宽度。 | +| `legendIconCornerRadius` | | 图例圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。 | + +## `SimplifiedBar` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer),[ISimplifiedSerie](#ISimplifiedSerie) + + +## `SimplifiedCandlestick` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer),[ISimplifiedSerie](#ISimplifiedSerie) + + +## `SimplifiedLine` + +Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContainer),[ISimplifiedSerie](#ISimplifiedSerie) + + +## `SingleAxis` + +Inherits or Implemented: [Axis](#Axis),[IUpdateRuntimeData](#IUpdateRuntimeData) + +单轴。 + +|field|default|comment| +|--|--|--| +| `orient` | | 坐标轴朝向。默认为水平朝向。
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `left` |0.1f | 组件离容器左侧的距离。 | +| `right` |0.1f | 组件离容器右侧的距离。 | +| `top` |0f | 组件离容器上侧的距离。 | +| `bottom` |0.2f | 组件离容器下侧的距离。 | +| `width` |0 | | +| `height` |50 | | + +## `SingleAxisCoord` + +Inherits or Implemented: [CoordSystem](#CoordSystem) + + +## `StageColor` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `percent` | | 结束位置百分比。 | +| `color` | | 颜色。 | + +## `SubTitleTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + + +## `SymbolStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) + +系列数据项的标记的图形 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示标记。 | +| `type` | | 标记类型。
`SymbolType`:
- `None`: 不显示标记。
- `Custom`: 自定义标记。
- `Circle`: 圆形。
- `EmptyCircle`: 空心圆。
- `Rect`: 正方形。可通过设置`itemStyle`的`cornerRadius`变成圆角矩形。
- `EmptyRect`: 空心正方形。
- `Triangle`: 三角形。
- `EmptyTriangle`: 空心三角形。
- `Diamond`: 菱形。
- `EmptyDiamond`: 空心菱形。
- `Arrow`: 箭头。
- `EmptyArrow`: 空心箭头。
| +| `sizeType` | | 标记图形的大小获取方式。
`SymbolSizeType`:
- `Custom`: 自定义大小。
- `FromData`: 通过 dataIndex 从数据中获取,再乘以一个比例系数 dataScale 。
- `Function`: 通过委托函数获取。
| +| `size` |0f | 标记的大小。 | +| `selectedSize` |0f | 被选中的标记的大小。 | +| `dataIndex` |1 | 当sizeType指定为FromData时,指定的数据源索引。 | +| `dataScale` |1 | 当sizeType指定为FromData时,指定的倍数系数。 | +| `selectedDataScale` |1.5f | 当sizeType指定为FromData时,指定的高亮倍数系数。 | +| `sizeFunction` | | 当sizeType指定为Function时,指定的委托函数。 | +| `selectedSizeFunction` | | 当sizeType指定为Function时,指定的高亮委托函数。 | +| `startIndex` | | 开始显示图形标记的索引。 | +| `interval` | | 显示图形标记的间隔。0表示显示所有标签,1表示隔一个隔显示一个标签,以此类推。 | +| `forceShowLast` |false | 是否强制显示最后一个图形标记。 | +| `gap` |0 | 图形标记和线条的间隙距离。 | +| `width` |0f | 图形的宽。 | +| `height` |0f | 图形的高。 | +| `repeat` |false | 图形是否重复。 | +| `offset` |Vector2.zero | 图形的偏移。 | +| `image` | | 自定义的标记图形。 | +| `imageType` | | | + +## `TextLimit` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。 只在类目轴中有效。 + +|field|default|comment| +|--|--|--| +| `enable` |false | 是否启用文本自适应。 [default:true] | +| `maxWidth` |0 | Clipping occurs when the width of the text is greater than this value. | +| `gap` |1 | 两边留白像素距离。 [default:10f] | +| `suffix` | | 长度超出时的后缀。 [default: "..."] | + +## `TextStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +文本的相关设置。 + +|field|default|comment| +|--|--|--| +| `font` | | 文本字体。 [default: null] | +| `autoWrap` |false | 是否自动换行。 | +| `autoAlign` |true | 文本是否让系统自动选对齐方式。为false时才会用alignment。 | +| `rotate` |0 | 文本的旋转。 [default: `0f`] | +| `extraWidth` |0 | 额外的宽度 | +| `offset` |Vector2.zero | 坐标偏移。 [Default: `Vector2.zero`] | +| `color` | | 文本的颜色。 [default: `Color.clear`] | +| `autoBackgroundColor` |false | | +| `backgroundColor` | | 文本的背景颜色。 [default: `Color.clear`] | +| `fontSize` |0 | 文本字体大小。 [default: 18] | +| `fontStyle` | | 文本字体的风格。 [default: FontStyle.Normal] | +| `lineSpacing` |1f | 行间距。 [default: 1f] | +| `alignment` | | 对齐方式。 | +| `tMPFont` | | | +| `tMPFontStyle` | | | +| `tMPAlignment` | | | + +## `Theme` + +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。 字体。 | +| `contrastColor` | | 对比色。 | +| `backgroundColor` | | 背景颜色。 | +| `colorPalette` | | 调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。 | +| `common` | | [ComponentTheme](ComponentTheme)| +| `title` | | [TitleTheme](TitleTheme)| +| `subTitle` | | [SubTitleTheme](SubTitleTheme)| +| `legend` | | [LegendTheme](LegendTheme)| +| `axis` | | [AxisTheme](AxisTheme)| +| `tooltip` | | [TooltipTheme](TooltipTheme)| +| `dataZoom` | | [DataZoomTheme](DataZoomTheme)| +| `visualMap` | | [VisualMapTheme](VisualMapTheme)| +| `serie` | | [SerieTheme](SerieTheme)| + +## `ThemeStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +主题相关配置。 + +|field|default|comment| +|--|--|--| +| `show` |true | | +| `sharedTheme` | | [Theme](Theme)| +| `enableCustomTheme` | | | +| `customFont` | | | +| `customBackgroundColor` | | 自定义的背景颜色。 | +| `customColorPalette` | | | + +## `Title` + +Inherits or Implemented: [MainComponent](#MainComponent),[IPropertyChanged](#IPropertyChanged) + +标题组件,包含主标题和副标题。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示标题组件。 | +| `text` | | 主标题文本,支持使用 \n 换行。 | +| `textStyle` | | 主标题文本样式。 [TextStyle](TextStyle)| +| `subText` | | 副标题文本,支持使用 \n 换行。 | +| `subTextStyle` | | 副标题文本样式。 [TextStyle](TextStyle)| +| `itemGap` |0 | 主副标题之间的间距。 | +| `location` | | 标题显示位置。 [Location](Location)| + +## `TitleStyle` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent),[ISerieExtraComponent](#ISerieExtraComponent) + +标题相关设置。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示标题。 | +| `offsetCenter` |Vector2(0, -0.2f) | 相对于中心的偏移位置。 | +| `textStyle` | | 文本的颜色。 [TextStyle](TextStyle)| + +## `TitleTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + + +## `Tooltip` + +Inherits or Implemented: [MainComponent](#MainComponent) + +提示框组件。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示提示框组件。 | +| `type` | | 提示框指示器类型。
`Type`:
- `Base`:
- `Serie`:
- `Top`:
| +| `trigger` | | 触发类型。
`Tooltip.Trigger`:
- `Item`: 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。
- `Axis`: 坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。
- `None`: 什么都不触发。
| +| `itemFormatter` | | 提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。当formatter不为空时,优先使用formatter,否则使用itemFormatter。 | +| `titleFormatter` | | | +| `marker` | | serie的符号标志。 | +| `fixedWidth` |0 | 固定宽度。比 minWidth 优先。 | +| `fixedHeight` |0 | 固定高度。比 minHeight 优先。 | +| `minWidth` |0 | 最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。 | +| `minHeight` |0 | 最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。 | +| `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 | +| `paddingLeftRight` |10 | 左右边距。 | +| `paddingTopBottom` |10 | 上下边距。 | +| `ignoreDataShow` |false | 是否显示忽略数据在tooltip上。 | +| `ignoreDataDefaultContent` | | 被忽略数据的默认显示字符信息。 | +| `showContent` |true | 是否显示提示框浮层,默认显示。只需tooltip触发事件或显示axisPointer而不需要显示内容时可配置该项为false。 | +| `alwayShowContent` |false | 是否触发后一直显示提示框浮层。 | +| `offset` |Vector2(18f, -25f) | 提示框相对于鼠标位置的偏移。 | +| `backgroundImage` | | 提示框的背景图片。 | +| `backgroundColor` | | 提示框的背景颜色。 | +| `borderWidth` |2f | 边框线宽。 | +| `fixedXEnable` |false | | +| `fixedX` |0f | | +| `fixedYEnable` |false | | +| `fixedY` |0f | | +| `titleHeight` |25f | | +| `itemHeight` |25f | | +| `borderColor` |Color32(230, 230, 230, 255) | 边框颜色。 | +| `lineStyle` | | 指示线样式。 [LineStyle](LineStyle)| +| `labelTextStyle` | | 提示框标签的文本样式。 [TextStyle](TextStyle)| +| `titleTextStyle` | | 标题的文本样式。 [TextStyle](TextStyle)| +| `columnsTextStyle` | | | + +## `TooltipTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `lineType` | | 坐标轴线类型。 | +| `lineWidth` |1f | 指示线线宽。 | +| `lineColor` | | 指示线颜色。 | +| `areaColor` | | 区域指示的颜色。 | +| `labelTextColor` | | 十字指示器坐标轴标签的文本颜色。 | +| `labelBackgroundColor` | | 十字指示器坐标轴标签的背景颜色。 | + +## `VisualMap` + +Inherits or Implemented: [MainComponent](#MainComponent) + +视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。 + +|field|default|comment| +|--|--|--| +| `show` |true | 是否显示组件。如果设置为 false,不会显示,但是数据映射的功能还存在。 [default: true] | +| `type` | | 组件类型。
`Type`:
- `Base`:
- `Serie`:
- `Top`:
| +| `selectedMode` | | 选择模式。
`VisualMap.SelectedMode`:
- `Multiple`: 多选。
- `Single`: 单选。
| +| `serieIndex` |0 | 影响的serie索引。 | +| `min` |0 | 范围最小值 | +| `max` |100 | 范围最大值 | +| `range` | | 指定手柄对应数值的位置。range 应在[min,max]范围内。 | +| `text` | | 两端的文本,如 ['High', 'Low']。 | +| `textGap` | | 两端文字主体之间的距离,单位为px。 | +| `splitNumber` |5 | 对于连续型数据,自动平均切分成几段,默认为0时自动匹配inRange颜色列表大小。 | +| `calculable` |false | 是否显示拖拽用的手柄(手柄能拖拽调整选中范围)。 | +| `realtime` |true | 拖拽时,是否实时更新。 | +| `itemWidth` |20f | 图形的宽度,即颜色条的宽度。 | +| `itemHeight` |140f | 图形的高度,即颜色条的高度。 | +| `itemGap` |10f | 每个图元之间的间隔距离。 | +| `borderWidth` |0 | 边框线宽,单位px。 | +| `dimension` |-1 | Starting at 1, the default is 0 to take the last dimension in data. | +| `hoverLink` |true | 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. | +| `autoMinMax` |true | Automatically set min, Max value 自动设置min,max的值 | +| `orient` | | 布局方式是横还是竖。
`Orient`:
- `Horizonal`: 水平
- `Vertical`: 垂直
| +| `location` | | 组件显示的位置。 [Location](Location)| +| `inRange` | | 定义 在选中范围中 的视觉颜色。 | +| `outOfRange` | | 定义 在选中范围外 的视觉颜色。 | +| `pieces` | | 分段式每一段的相关配置。 | + +## `VisualMapPieces` + +Inherits or Implemented: [ChildComponent](#ChildComponent) + +|field|default|comment| +|--|--|--| +| `min` | | 范围最小值 | +| `max` | | 范围最大值 | +| `label` | | 文字描述 | +| `color` | | 颜色 | + +## `VisualMapTheme` + +Inherits or Implemented: [ComponentTheme](#ComponentTheme) + +|field|default|comment| +|--|--|--| +| `borderWidth` | | 边框线宽。 | +| `borderColor` | | 边框颜色。 | +| `backgroundColor` | | 背景颜色。 | +| `triangeLen` |20f | 可视化组件的调节三角形边长。 | + +## `XAxis` + +Inherits or Implemented: [Axis](#Axis) + +直角坐标系 grid 中的 x 轴。 + + +## `XCResourcesImporter` + +|field|default|comment| +|--|--|--| +| `XCResourcesImporter` | | | + +## `XCSettings` + +Inherits or Implemented: [ScriptableObject](#ScriptableObject) + +|field|default|comment| +|--|--|--| +| `lang` | | [Lang](Lang)| +| `font` | | | +| `tMPFont` | | | +| `fontSizeLv1` |28 | | +| `fontSizeLv2` |24 | | +| `fontSizeLv3` |20 | | +| `fontSizeLv4` |18 | | +| `axisLineType` | | | +| `axisLineWidth` |0.8f | | +| `axisSplitLineType` | | | +| `axisSplitLineWidth` |0.8f | | +| `axisTickWidth` |0.8f | | +| `axisTickLength` |5f | | +| `gaugeAxisLineWidth` |15f | | +| `gaugeAxisSplitLineWidth` |0.8f | | +| `gaugeAxisSplitLineLength` |15f | | +| `gaugeAxisTickWidth` |0.8f | | +| `gaugeAxisTickLength` |5f | | +| `tootipLineWidth` |0.8f | | +| `dataZoomBorderWidth` |0.5f | | +| `dataZoomDataLineWidth` |0.5f | | +| `visualMapBorderWidth` |0f | | +| `serieLineWidth` |1.8f | | +| `serieLineSymbolSize` |5f | | +| `serieScatterSymbolSize` |20f | | +| `serieSelectedRate` |1.3f | | +| `serieCandlestickBorderWidth` |1f | | +| `editorShowAllListData` |false | | +| `maxPainter` |10 | | +| `lineSmoothStyle` |3f | | +| `lineSmoothness` |2f | | +| `lineSegmentDistance` |3f | | +| `cicleSmoothness` |2f | | +| `visualMapTriangeLen` |20f | | +| `pieTooltipExtraRadius` |8f | | +| `pieSelectedOffset` |8f | | +| `customThemes` | | | + +## `YAxis` + +Inherits or Implemented: [Axis](#Axis) + +直角坐标系 grid 中的 y 轴。 + +n[返回首页](https://github.com/XCharts-Team/XCharts) +[XChartsAPI接口](XChartsAPI-ZH.md) +[XCharts问答](XChartsFQA-ZH.md) diff --git a/Documentation/xcharts-questions-and-answers-EN.md b/Documentation/XChartsFQA-EN.md similarity index 100% rename from Documentation/xcharts-questions-and-answers-EN.md rename to Documentation/XChartsFQA-EN.md diff --git a/Documentation/XCharts问答.md b/Documentation/XChartsFQA-ZH.md similarity index 97% rename from Documentation/XCharts问答.md rename to Documentation/XChartsFQA-ZH.md index 2852cb19..a87081b0 100644 --- a/Documentation/XCharts问答.md +++ b/Documentation/XChartsFQA-ZH.md @@ -1,8 +1,8 @@ # XCharts问答 [返回首页](https://github.com/XCharts-Team/XCharts) -[XChartsAPI接口](XChartsAPI.md) -[XCharts配置项手册](XCharts配置项手册.md) +[XChartsAPI](XChartsAPI-ZH.md) +[XCharts配置项手册](XChartsConfiguration-ZH.md) [QA 1:如何调整坐标轴与背景的边距?](#如何调整坐标轴与背景的边距) [QA 2:如何让初始动画重新播放?](#如何让初始动画重新播放) @@ -108,7 +108,7 @@ ## 如何自定义Tooltip的显示内容 -答:自定义总的内容可以通过`Tooltip`的`formatter`。如果只是想调整所有的`serie`的显示格式可以用`itemFormatter`和`titleFormatter`结合。如果想每个`serie`的显示格式不一样,可以定制`serie`的`itemStyle`里的`tooltipFormatter`。具体的用法请查阅[XCharts配置项手册](XCharts配置项手册.md)。 +答:自定义总的内容可以通过`Tooltip`的`formatter`。如果只是想调整所有的`serie`的显示格式可以用`itemFormatter`和`titleFormatter`结合。如果想每个`serie`的显示格式不一样,可以定制`serie`的`itemStyle`里的`tooltipFormatter`。具体的用法请查阅[XCharts配置项手册](XChartsConfiguration-ZH.md)。 ## 如何让Y轴显示多位小数 @@ -116,7 +116,7 @@ ## 如何用代码动态更新数据 -答:请查阅`Example`下的代码,`Example13_LineSimple.cs`就是一个简单添加数据构建折线图的例子,其他`Demo`也都是通过代码控制不同的组件实现不同的功能,相关API请查看文档:[XChartsAPI接口](XChartsAPI.md) 。 +答:请查阅`Example`下的代码,`Example13_LineSimple.cs`就是一个简单添加数据构建折线图的例子,其他`Demo`也都是通过代码控制不同的组件实现不同的功能,相关API请查看文档:[XChartsAPI接口](XChartsAPI-ZH.md) 。 ## 如何显示图例_为什么有时候图例无法显示 @@ -163,5 +163,5 @@ 7. 通过`菜单栏->XCharts->ImportColorConfig`将`color.config`导入即可恢复自定义的颜色(如果`color.config`不在升级后的项目的`Assets`下的话需要拷贝到此目录下)。 [返回首页](https://github.com/XCharts-Team/XCharts) -[XChartsAPI接口](XChartsAPI.md) -[XCharts配置项手册](XCharts配置项手册.md) +[XChartsAPI](XChartsAPI-ZH.md) +[XCharts配置项手册](XChartsConfiguration-ZH.md) diff --git a/Documentation/XCharts教程:5分钟上手教程.md b/Documentation/XChartsTutorial01-EN.md similarity index 92% rename from Documentation/XCharts教程:5分钟上手教程.md rename to Documentation/XChartsTutorial01-EN.md index 7748595f..d8c5c47e 100644 --- a/Documentation/XCharts教程:5分钟上手教程.md +++ b/Documentation/XChartsTutorial01-EN.md @@ -1,9 +1,9 @@ # 教程:5分钟上手 XCharts 3.0 [返回首页](https://github.com/XCharts-Team/XCharts) -[XCharts问答](https://github.com/XCharts-Team/XCharts/master/Documentation/XCharts问答.md) -[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI.md) -[XCharts配置项手册](https://github.com/XCharts-Team/XCharts/master/Documentation/XCharts配置项手册.md) +[XCharts问答](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsFQA-ZH.md) +[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI-ZH.md) +[XCharts配置项手册](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsConfiguration-ZH.md) ## 获取和导入 XCharts @@ -64,7 +64,7 @@ 功能越丰富就越需要更多的组件和参数支持。XCharts有多达几十种的主组件和子组件,每个组件有几个至几十个不等的可配置参数,以支持各种灵活而复杂的功能。 -首次接触XCharts者可在 `Inspector` 视图下可以添加和调整各个组件,`Game` 视图会实时反馈调整的效果,以熟悉各种组件实现的效果。各个组件的详细参数说明可查阅[XCharts配置项手册](XCharts配置项手册.md)。 +首次接触XCharts者可在 `Inspector` 视图下可以添加和调整各个组件,`Game` 视图会实时反馈调整的效果,以熟悉各种组件实现的效果。各个组件的详细参数说明可查阅[XCharts配置项手册](XChartsConfiguration-ZH.md)。 ## 如何快速调整参数 @@ -146,9 +146,9 @@ for (int i = 0; i < 10; i++) 完整代码请查阅`Examples`:`Example13_LineSimple.cs` -你还可以用代码控制更多的参数,`Examples`下还有更多的其他例子,凡是`Inspector`上看到的可配置的参数,都可以通过代码来设置。[XCharts配置项手册](XCharts配置项手册.md)里面的所有参数都是可以通过代码控制的。 +你还可以用代码控制更多的参数,`Examples`下还有更多的其他例子,凡是`Inspector`上看到的可配置的参数,都可以通过代码来设置。[XCharts配置项手册](XChartsConfiguration-ZH.md)里面的所有参数都是可以通过代码控制的。 -另外,除非定制,建议调用[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI.md) 里面的接口,这些接口内部会做一些关联处理,比如刷新图表等。如果自己调用了内部组件的接口,需要自己处理刷新等其他问题。 +另外,除非定制,建议调用[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI-ZH.md) 里面的接口,这些接口内部会做一些关联处理,比如刷新图表等。如果自己调用了内部组件的接口,需要自己处理刷新等其他问题。 ## 使用TextMeshPro @@ -226,6 +226,6 @@ itemStyle.color = Color.blue; ``` [返回首页](https://github.com/XCharts-Team/XCharts) -[XCharts问答](https://github.com/XCharts-Team/XCharts/master/Documentation/XCharts问答.md) -[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI.md) -[XCharts配置项手册](https://github.com/XCharts-Team/XCharts/master/Documentation/XCharts配置项手册.md) +[XCharts问答](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsFQA-ZH.md) +[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI-ZH.md) +[XCharts配置项手册](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsConfiguration-ZH.md) diff --git a/Documentation/XChartsTutorial01-ZH.md b/Documentation/XChartsTutorial01-ZH.md new file mode 100644 index 00000000..d8c5c47e --- /dev/null +++ b/Documentation/XChartsTutorial01-ZH.md @@ -0,0 +1,231 @@ +# 教程:5分钟上手 XCharts 3.0 + +[返回首页](https://github.com/XCharts-Team/XCharts) +[XCharts问答](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsFQA-ZH.md) +[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI-ZH.md) +[XCharts配置项手册](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsConfiguration-ZH.md) + +## 获取和导入 XCharts + +1. 直接放入XCharts源码到项目 + + 下载好XCharts源码后,直接将XCharts目录拷贝到Unity项目工程的Assets目录下。 + +2. 通过`Assets/Import Package`导入XCharts + + 下载好XCharts的.unitypackage文件后,打开Unity,菜单栏 Assets-->Import Package-->选中.unitypackage导入即可开始使用XCharts。 + +3. 通过`Package Manager`导入XCharts + + 对于Unity 2018.3以上版本,可通过 Package Manager来导入XCharts,打开Package Manager后,通过 `Add package form git URL...`,输入XCharts的github URL: https://github.com/XCharts-Team/XCharts.git#master 稍等片刻后即可使用XCharts。 + + 也可以直接将package加入到`manifest.json`文件:打开`Packages`目录下的`manifest.json`文件,在`dependencies`下加入: + + ``` json + "com.monitor1394.xcharts": "https://github.com/XCharts-Team/XCharts.git#master", + ``` + + 如需更新`XCharts`,删除`manifest.json`文件(部分Unity版本可能是packages-lock.json文件)的`lock`下的`com.monitor1394.xcharts`相关内容即会重新下载编译。 + +## 添加一个简单图表 + +在`Hierarchy`试图下右键或菜单栏`GameObject`下拉:`XCharts->LineChart`: + +![op_addchart](res/op_addchart.png) + +即可快速创建一个简单的折线图出来: + +![linechart1](res/linechart1.png) + +## 添加多个Seire + +如何在上图的基础上添加两条折线呢,只需`Add Serie`按钮,选择对应的`Serie`类型即可: +![op_addserie](res/op_addserie.png) +![linechart2](res/linechart2.png) + +## 添加其他组件 + +默认图表没有`Legend`,需要`Legend`组件可通过`Add Component`按钮添加: +![op_addcomponent](res/op_addcomponent.png) + +## 添加Serie组件 + +如果需要给折线图区域填充颜色,可单独给`Serie`添加`Component`: +![op_addseriecomponent](res/op_addseriecomponent.png) +![linechart3](res/linechart3.png) + +## 添加SerieData组件 + +如果需要个性化定制每个数据项的配置,可以单独给每个`SerieData`添加`Component`。比如我们给第一个折线图的第二个数据单独显示`Label`: +![op_addseriedatacomponent](res/op_addseriedatacomponent.png) +![linechart4](res/linechart4.png) + +## 更多组件和配置参数 + +功能越丰富就越需要更多的组件和参数支持。XCharts有多达几十种的主组件和子组件,每个组件有几个至几十个不等的可配置参数,以支持各种灵活而复杂的功能。 + +首次接触XCharts者可在 `Inspector` 视图下可以添加和调整各个组件,`Game` 视图会实时反馈调整的效果,以熟悉各种组件实现的效果。各个组件的详细参数说明可查阅[XCharts配置项手册](XChartsConfiguration-ZH.md)。 + +## 如何快速调整参数 + +`XCharts`是配置参数驱动。想要什么效果,你只需要去调整对应组件下的配置参数就可以,不需要去改`Hierarchy`试图下的节点,因为那些节点是由`XCharts`内部根据配置参数生成的。你改了也会变还原。 + +快速定位你想要改的效果对应的组件。这就需要对组件有一定的了解。比如我们想要让X轴的轴线末端显示箭头,如何定位?第一步,X轴定位到`XAxis0`;第二步,轴线定位到`AxisLine`;最后,再去看`AxisLine`组件下有没有这样的参数可以实现这个效果。 + +`XCharts`提供从全局`Theme`、系列`Serie`、单个数据项`SerieData`全方位的参数配置。优先级从大到小为:`SerieData`->`Serie`->`Theme`。以`ItemStyle`的颜色例,如果`SerieData`的`ItemStyle`配置有颜色值,则优先用这个颜色值。 + +## 用代码添加折线图 + +给`gameObject`挂上`LineChart`脚本: + +```C# +var chart = gameObject.GetComponent(); +if (chart == null) +{ + chart = gameObject.AddComponent(); + chart.Init(); +} +``` + +调整大小: + +```C# +chart.SetSize(580, 300);//代码动态设置尺寸,或直接操作chart.rectTransform,或直接在Inspector上改 +``` + +设置标题: + +```C# +var title = chart.GetOrAddChartComponent(); +title.text = "Simple Line"; +``` + +设置提示框和图例是否显示: + +```C# +var tooltip = chart.GetOrAddChartComponent<Tooltip>(); +tooltip.show = true; + +var legend = chart.GetOrAddChartComponent<Legend>(); +legend.show = false; +``` + +设置坐标轴: + +```C# +var xAxis = chart.GetOrAddChartComponent<XAxis>(); +xAxis.splitNumber = 10; +xAxis.boundaryGap = true; +xAxis.type = Axis.AxisType.Category; + +var yAxis = chart.GetOrAddChartComponent<YAxis>(); +yAxis.type = Axis.AxisType.Value; +``` + +清空默认数据,添加`Line`类型的`Serie`用于接收数据: + +```C# +chart.RemoveData(); +chart.AddSerie<Line>("line"); +``` + +添加10个数据: + +```C# +for (int i = 0; i < 10; i++) +{ + chart.AddXAxisData("x" + i); + chart.AddData(0, Random.Range(10, 20)); +} +``` + +这样一个简单的折线图就出来了: +![linechart-simple](res/linechart-simple.png) + +如果一个Chart里面有多个系列时,则Axis的data只需要加一次,不要多个循环加重复了。记住:Axis的数据个数要和Serie的数据个数一致。 + +完整代码请查阅`Examples`:`Example13_LineSimple.cs` + +你还可以用代码控制更多的参数,`Examples`下还有更多的其他例子,凡是`Inspector`上看到的可配置的参数,都可以通过代码来设置。[XCharts配置项手册](XChartsConfiguration-ZH.md)里面的所有参数都是可以通过代码控制的。 + +另外,除非定制,建议调用[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI-ZH.md) 里面的接口,这些接口内部会做一些关联处理,比如刷新图表等。如果自己调用了内部组件的接口,需要自己处理刷新等其他问题。 + +## 使用TextMeshPro + +XCharts支持TextMeshPro,但默认是不开启的,需要自己手动切换。可通过一下两种方式开启和关闭: +![textmeshpro1](res/op_textmeshpro.png) +![textmeshpro2](res/op_textmeshpro2.png) +开启后需要设置好TextMeshPro要用的全局字体,也可以在主题Theme里单独设置: +![textmeshpro-font](res/op_textmeshpro3.png) +建议在项目初就规划好是否使用TextMeshPro,在有很多图表的情况下再切换,可能导致某些图表无法正常初始化,这时可能需要每个图表单独的使用`Remove All Chart Object`来清理让图表重新初始化。 + +## 用代码改图表参数 + +`Inspector`上看到的所有参数都可以用代码来修改,关键是要定位好你要改的参数是在组件上、还是serie上、还是在具体的数据项上改。 + +### 改主组件上的参数 + +需要先获取组件,再修改里面的参数: + +```C# +var title = chart.GetOrAddChartComponent<Title>(); +title.text = "Simple LineChart"; +title.subText = "normal line"; + +var xAxis = chart.GetOrAddChartComponent<XAxis>(); +xAxis.splitNumber = 10; +xAxis.boundaryGap = true; +xAxis.type = Axis.AxisType.Category; +``` + +### 改Serie的参数 + +新添加Serie: + +```C# +var serie = chart.AddSerie<Pie>(); +serie.center[0] = 0.5f; +serie.center[1] = 0.5f; +serie.radius[0] = 80; +serie.radius[1] = 90; +serie.animation.dataChangeEnable = true; +serie.roundCap = true; +``` + +已存在的Serie: + +```C# +var serie = chart.GetSerie<Pie>(); +serie.center[0] = 0.5f; +serie.center[1] = 0.5f; +serie.radius[0] = 80; +serie.radius[1] = 90; +serie.animation.dataChangeEnable = true; +serie.roundCap = true; +``` + +给Serie添加额外组件: + +```C# +serie.AddExtraComponent<AreaStyle>(); + +var label = serie1.AddExtraComponent<LabelStyle>(); +label.offset = new Vector3(0,20,0); +``` + +### 改数据项SerieData上的参数 + +```C# +var serieData = chart.AddData(0, 20); +//var serieData = serie.GetSerieData(0); //从已有数据中获取 +serieData.radius = 10; + +var itemStyle = serieData.GetOrAddComponent<ItemStyle>(); //启用SerieData的Component +itemStyle.color = Color.blue; + +``` + +[返回首页](https://github.com/XCharts-Team/XCharts) +[XCharts问答](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsFQA-ZH.md) +[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI-ZH.md) +[XCharts配置项手册](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsConfiguration-ZH.md) diff --git a/Documentation/XCharts配置项手册.md b/Documentation/XCharts配置项手册.md deleted file mode 100644 index 20db7f91..00000000 --- a/Documentation/XCharts配置项手册.md +++ /dev/null @@ -1,1065 +0,0 @@ -# 配置项手册 - -[返回首页](https://github.com/XCharts-Team/XCharts) -[XChartsAPI接口](XChartsAPI.md) -[XCharts问答](XCharts问答.md) - -主组件: - -* [Axis 坐标轴](#XAxis) -* [Background 背景图](#Background) -* [DataZoom 区域缩放](#DataZoom) -* [Grid 网格](#Grid) -* [Legend 图例](#Legend) -* [Polar 极坐标](#Polar) -* [Radar 雷达](#Radar) -* [Series 系列](#Series) -* [Serie-Line 折线图](#Serie-Line) -* [Serie-Bar 柱形图](#Serie-Bar) -* [Serie-Pie 饼图](#Serie-Pie) -* [Serie-Radar 雷达图](#Serie-Radar) -* [Serie-Scatter 散点图](#Serie-Scatter) -* [Serie-Heatmap 热力图](#Serie-Heatmap) -* [Serie-Gauge 仪表盘](#Serie-Gauge) -* [Serie-Ring 环形图](#Serie-Ring) -* [Serie-Liquid 水位图](#Serie-Liquid) -* [Serie-Candlestick K线图](#Serie-Candlestick) -* [Settings 设置](#Settings) -* [Theme 主题](#Theme) -* [Tooltip 提示框](#Tooltip) -* [Vessel 容器](#Vessel) -* [Title 标题](#Title) -* [VisualMap 视觉映射](#VisualMap) - -子组件: - -* [AreaStyle 区域填充样式](#AreaStyle) -* [AxisLabel 坐标轴刻度标签](#AxisLabel) -* [AxisLine 坐标轴轴线](#AxisLine) -* [AxisName 坐标轴名称](#AxisName) -* [AxisSplitLine 坐标轴分割线条](#AxisSplitLine) -* [AxisSplitArea 坐标轴分割区域](#AxisSplitArea) -* [AxisTick 坐标轴刻度](#AxisTick) -* [Emphasis 高亮样式](#Emphasis) -* [ItemStyle 数据项样式](#ItemStyle) -* [LineArrow 折线图箭头](#LineArrow) -* [LineStyle 折线图样式](#LineStyle) -* [Location 位置](#Location) -* [MarkLine 标线](#MarkLine) -* [SerieAnimation 动画](#SerieAnimation) -* [SerieData 数据项](#SerieData) -* [SerieLabel 图形上的文本标签](#SerieLabel) -* [SerieSymbol 图形标记](#SerieSymbol) -* [TextLimit 文本自适应](#TextLimit) -* [TextStyle 文本样式](#TextStyle) -* [IconStyle 图标样式](#IconStyle) - -## `Theme` - -主题组件。主题用来配置图表的全局配色等其他参数。 - -相关参数: - -* `theme`:内置主题类型。有`Default`、`Light`、`Dark`三种可选内置主题。 -* `font`:所有文字的通用字体。 -* `backgroundColor`:图表背景颜色。 -* `titleTextColor`:主题的主标题文字颜色。 -* `titleSubTextColor`:主题的副标题文字颜色。 -* `legendTextColor`:图例的激活时文字颜色。 -* `legendUnableColor`:图例的非激活时文字颜色。 -* `axisTextColor`:坐标轴的文字颜色。 -* `axisLineColor`:坐标轴的轴线颜色。 -* `axisSplitLineColor`:坐标轴的分割线颜色,默认和轴线颜色一致。 -* `tooltipBackgroundColor`:提示框的背景颜色。 -* `tooltipFlagAreaColor`:提示框的阴影指示器的颜色。 -* `tooltipTextColor`:提示框的文字颜色。 -* `tooltipLabelColor`:提示框的十字指示器坐标轴标签的背景颜色。 -* `tooltipLineColor`:提示框的指示线的颜色。 -* `dataZoomTextColor`:区域缩放的文字颜色。 -* `dataZoomLineColor`:区域缩放的线条颜色。 -* `dataZoomSelectedColor`:区域缩放的选中区域颜色。 -* `colorPalette`:调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。 - -相关接口: - -* `GetColor(int index)`:获得调色盘对应系列索引的颜色值。 -* `GetColorStr(int index)`:获得指定系列索引的十六进制颜色值字符串。 -* `GetColor(string hexColorStr)`:将字符串颜色值转成Color。 - -## `Title` - -标题组件,包含主标题和副标题。 - -相关参数: - -* `show`:是否显示标题组件。 -* `text`:主标题文本,支持使用 `\n` 换行。 -* `textStyle`:主标题文本样式 [TextStyle](#TextStyle)。 -* `subText`:副标题文本,支持使用 `\n` 换行。 -* `subTextStyle`:副标题文本样式 [TextStyle](#TextStyle)。 -* `itemGap`:主副标题之间的间距。 -* `location`:标题显示位置 [Location](#Location)。 - -## `TitleStyle` - -标题样式。 - -* `show`:是否显示标题组件。 -* `rotate`:旋转。 -* `offset`:偏移。 -* `color`:颜色。 -* `fontSize`:字体大小。 -* `fontStyle`:字体风格。 - -## `Legend` - -图例组件。图例组件展现了不同系列的标记,颜色和名字。可以通过点击图例控制哪些系列不显示。 - -相关参数: - -* `show`:是否显示图例组件。 -* `iconType`:图例图标类型。有以下几种类型: - * `Auto`:自动匹配。 - * `Custom`:自定义图标。 - * `EmptyCircle`:空心圆。 - * `Circle`:实心圆。 - * `Rect`:正方形。可通过`Setting`的`legendIconCornerRadius`参数调整圆角。 - * `Triangle`:三角形。 - * `Diamond`:菱形。 -* `selectedMode`:选择模式。控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 `None` 关闭。有以下三种选择方式: - * `Multiple`:多选。 - * `Single`:单选。 - * `None`:无法选择。 -* `orient`:布局方式是横还是竖。 - * `Horizonal`:水平。 - * `Vertical`:垂直。 -* `location`:图例的显示位置 [Location](#Location)。 -* `itemWidth`:图例标记的图形宽度。 -* `itemHeight`:图例标记的图形高度。 -* `itemGap`:图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 -* `itemAutoColor`:图例标记的图形是否自动匹配颜色。 -* `formatter`:图例内容字符串模版格式器。支持用 `\n` 换行。模板变量为图例名称 `{name}` -* `data`:图例的数据数组。数组项通常为一个字符串,每一项代表一个系列的 `name`(如果是饼图,也可以是饼图单个数据的 `name`)。如果 `data` 没有被指定,会自动从当前系列中获取。指定 `data` 时里面的数据项和 `serie` 匹配时才会生效。 -* `icons`:自定义的图例标记图形。 -* `textStyle`:图例的内容文本样式 [TextStyle](#TextStyle)。 - -相关接口: - -* `ClearData()`:清空数据。 -* `ContainsData(string name)`:是否包括指定名字的图例。 -* `RemoveData(string name)`:移除指定名字的图例。 -* `AddData(string name)`:添加图例项。 -* `GetData(int index)`:获得指定索引的图例。 -* `GetIndex(string legendName)`:获得指定图例的索引。 - -## `Polar` - -极坐标系组件。极坐标系,可以用于散点图和折线图。每个极坐标系拥有一个角度轴和一个半径轴。 - -相关参数: - -* `show`:是否显示直角坐标系网格。 -* `center`:极坐标的中心点。数组的第一项是横坐标,第二项是纵坐标。当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。 -* `radius`:极坐标的半径。 -* `backgroundColor`:极坐标的背景色,默认透明。 - -## `Radar` - -* `shape`:雷达图绘制类型。 - * `Polygon`:多边形。 - * `Circle`:圆形。 -* `positionType`:显示位置类型。 - * `Vertice`:显示在顶点处。 - * `Between`:显示在顶点之间。 -* `radius`:雷达图的半径。 -* `center`:雷达图的中心点。数组的第一项是横坐标,第二项是纵坐标。当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。 -* `ceilRate`:最大最小值向上取整的倍率。默认为0时自动计算。 -* `splitNumber`:分割段数。默认为 `5`。 -* `isAxisTooltip`:是否Tooltip显示轴线上的所有数据。只对Mutiple类型的Radar有效。 -* `splitLine`:分割线条 [AxisSplitLine](#AxisSplitLine)。 -* `splitArea`:分割区域 [AxisSplitArea](#AxisSplitArea)。 -* `indicator`:是否显示指示器。 -* `indicatorGap`:指示器和雷达的间距。 -* `indicatorList`指示器列表 [Radar.Indicator](#Radar.Indicator)。 - -## `Radar.Indicator` - -* `name`:指示器名称。 -* `max`:指示器的最大值,默认为 0 无限制。 -* `min`:指示器的最小值,默认为 0 无限制。 -* `textStyle`:文本样式 [TextStyle](#TextStyle)。 - -## `TextLimit` - -* `enable`:是否启用文本自适应。默认为`true`。 -* `maxWidth`:设定最大宽度。默认为`0`表示自动获取,否则表示自定义。当文本的宽度大于该值进行裁剪。 -* `gap`:两边留白像素距离。默认为`10`。 -* `suffix`: 长度超出被裁剪后附加的后缀。默认为`...`。 - -## `TextStyle` - -* `rotate`:旋转。 -* `offset`:偏移。 -* `color`:颜色。 -* `backgroundColor`:背景颜色。 -* `font`:字体。 -* `fontSize`:字体大小。 -* `fontStyle`:字体风格。 -* `lineSpacing`:行间距。 -* `alignment`:对齐方式。 -* `autoWrap`:是否自动换行。 -* `autoAlign`:是否让系统自动设置对齐方式。为true时系统自动选择对齐方式,为false时用alignment。 - -## `Tooltip` - -提示框组件。 - -相关参数: - -* `show`:是否显示提示框组件。 -* `type`:提示框指示器类型。指示器类型有: - * `Line`:线性指示器。 - * `Shadow`:阴影指示器。 - * `None`:无指示器。 - * `Corss`:十字准星指示器。坐标轴显示`Label`和交叉线。 -* `formatter`:提示框内容字符串模版格式器。支持用 `\n` 换行。当`formatter`不为空时,优先使用`formatter`,否则使用`itemFormatter`。 - * 模板变量有`{.}`、`{a}`、`{b}`、`{c}`、`{d}`。 - * `{.}`为当前所指示或`index`为`0`的`serie`的对应颜色的圆点。 - * `{a}`为当前所指示或`index`为`0`的`serie`的系列名`name`。 - * `{b}`为当前所指示或`index`为`0`的`serie`的数据项`serieData`的`name`,或者类目值(如折线图的`X`轴)。 - * `{c}`为当前所指示或`index`为`0`的`serie`的`y`维(`dimesion`为`1`)的数值。 - * `{d}`为当前所指示或`index`为`0`的`serie`的`y`维(`dimesion`为`1`)百分比值,注意不带`%`号。 - * `{e}`为当前所指示或`index`为`0`的`serie`的数据项`serieData`的`name`。 - * `{.1}`表示指定`index`为`1`的`serie`对应颜色的圆点。 - * `{a1}`、`{b1}`、`{c1}`中的`1`表示指定`index`为`1`的`serie`。 - * `{c1:2}`表示索引为`1`的`serie`的当前指示数据项的第`3`个数据(一个数据项有多个数据,index为`2`表示第`3`个数据)。 - * `{c1:2-2}`表示索引为`1`的`serie`的第`3`个数据项的第`3`个数据(也就是要指定第几个数据项时必须要指定第几个数据)。 - * `{d1:2:f2}`表示单独指定了数值的格式化字符串为`f2`(不指定时用`numericFormatter`)。 - * 示例:`"{a}:{c}"`、`"{a1}:{c1:f1}"`、`"{a1}:{c1:1f1}"` -* `titleFormatter`:提示框标题内容的字符串模版格式器。支持用 `\n` 换行。仅当`itemFormatter`生效时才有效。可以单独设置占位符`{i}`表示忽略不显示标题内容。 -* `itemFormatter`:提示框单个`serie`或数据项内容的字符串模版格式器。支持用 `\n` 换行。当`formatter`不为空时,优先使用`formatter`,否则使用`itemFormatter`。 -* `numericFormatter`:标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式:`A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。 -* `fixedWidth`:固定宽度。当同时设置 `fixedWidth` 和 `minWidth` 时,`fixedWidth` 比 `minWidth` 优先级高。 -* `fixedHeight`:固定高度。当同时设置 `fixedHeight` 和 `minHeight` 时,`fixedHeight` 比 `minHeight` 优先级高。 -* `minWidth`:最小宽度。当同时设置 `fixedWidth` 和 `minWidth` 时,`fixedWidth` 比 `minWidth` 优先级高。 -* `minHeight`:最小高度。当同时设置 f`ixedHeight` 和 `minHeight` 时,`fixedHeight` 比 `minHeight` 优先级高。 -* `paddingLeftRight`:文字和边框的左右边距。 -* `paddingTopBottom`:文字和边框的上下边距。 -* `backgroundImage`:提示框的背景图。 -* `ignoreDataShow`:`(since v2.0.1)`是否显示忽略数据在`tooltip`上。 [defaut: `false`]。 -* `ignoreDataDefaultContent`:忽略数据的默认显示字符信息。 -* `alwayShow`:是否触发后一直显示。 -* `offset`:`(since v1.5.3)`提示框相对于鼠标位置的偏移。 - -* `lineStyle`:指示器线条样式 [LineStyle](#LineStyle)。 -* `textStyle`:显示内容文本样式 [TextStyle](#TextStyle)。 - -## `Vessel` - -容器组件。一般用于LiquidChart。 - -相关参数: - -* `show`:是否显示容器组件。 -* `shape`:容器形状。 -* `shapeWidth`:容器的厚度。 -* `gap`:间隙。容器和液体的间隙。 -* `center`:中心点。数组的第一项是横坐标,第二项是纵坐标。当值为0-1之间时表示百分比,设置成百分比时表示图表宽高最小值的百分比。 -* `backgroundColor`:背景色,默认透明。 -* `color`:容器颜色。当`autoColor`为`false`时生效。 -* `autoColor`:是否自动颜色。默认`true`。为`true`时颜色会和`serie`一致。 -* `radius`:半径。 -* `smoothness`:开启或关闭缩放区域功能。 -* `width`:容器的宽。shape为Rect时有效。 -* `height`:容器的高。shape为Rect时有效。 -* `cornerRadius`: 容器的圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。shape为Rect时有效。 - -## `DataZoom` - -区域缩放组件。用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。 -目前只支持控制 `X` 轴。 - -相关参数: - -* `enable`:开启或关闭缩放区域功能。 -* `supportInside`:是否支持内置缩放。内置于坐标系中,可在坐标系上通过鼠标拖拽、鼠标滚轮、手指滑动(触屏上)来缩放或漫游坐标系。 -* `supportSlider`:是否支持滑动条缩放。有单独的滑动条,可在滑动条上进行缩放或漫游。 -* ~~`filterMode`:数据过滤,暂未启用。支持以下几种类型:~~ - * ~~`Filter`:当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。~~ - * ~~`WeakFilter`:当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。~~ - * ~~`Empty`:当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。~~ - * ~~`None`:不过滤数据,只改变数轴范围。~~ -* ~~`xAxisIndex`:控制哪一个 `x` 轴。~~ -* ~~`yAxisIndex`:控制哪一个 `y` 轴。~~ -* `showDataShadow`:是否显示数据阴影。数据阴影可以简单地反应数据走势。 -* `showDetail`:是否显示 `detail`,即拖拽时候显示详细数值信息。 -* `zoomLock`:是否锁定选择区域(或叫做数据窗口)的大小。如果设置为 `true` 则锁定选择区域的大小,也就是说,只能平移,不能缩放。 -* ~~`realtime`:拖动时,是否实时更新系列的视图。如果设置为 `false`,则只在拖拽结束的时候更新。~~ -* `backgroundColor`:组件的背景颜色。 -* `selectedAreaColor`:框选区域颜色。 -* `bottom`:组件离容器下侧的距离。 -* `top`:组件离容器上侧的距离。 -* `left`:组件离容器左侧的距离。 -* `right`:组件离容器右侧的距离。 -* `height`:组件高度。 -* `rangeMode`:取值类型是取绝对值还是百分比。 - * `Percent`:百分比。 -* `start`:数据窗口范围的起始百分比。范围是:0 ~ 100。 -* `end`:数据窗口范围的结束百分比。范围是:0 ~ 100。 -* `scrollSensitivity`:缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。 -* `textStyle`:字体风格。 -* `minShowNum`:最小显示数据个数。当DataZoom放大到最大时,最小显示的数据个数。 - -## `VisualMap` - -视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。 - -* `enable`:开启或关闭视觉映射功能。 -* `show`:是否显示组件。如果设置为 `false`,不会显示,但是数据映射的功能还存在。 -* `type`:组件类型。支持以下类型: - * `Continuous`:连续型。 - * ~~`Piecewise`:分段型。~~ -* ~~`selectedMode`:分段型的选择模式,支持以下模式:~~ - * ~~`Multiple`:多选。~~ - * ~~`Single`:单选。~~ -* `autoMinMax`:自动设置`min`,`max`的值。 -* `min`:允许的最小值。`autoMinMax`为`false`时必须指定。`[min, max]` 形成了视觉映射的『定义域』。 -* `max`:允许的最大值。`autoMinMax`为`false`时必须指定。`[min, max]` 形成了视觉映射的『定义域』。 -* `range`:指定手柄对应数值的位置。range 应在 min max 范围内。 -* ~~`text`:两端的文本,如 ['High', 'Low']。~~ -* ~~`textGap`:两端文字主体之间的距离,单位为px。~~ -* `splitNumber`:对于连续型数据,自动平均切分成几段,默认为0时自动匹配inRange颜色列表大小。 -* `calculable`:是否显示拖拽用的手柄(手柄能拖拽调整选中范围)。 -* ~~`realtime`:拖拽时,是否实时更新。~~ -* `itemWidth`:图形的宽度,即颜色条的宽度。 -* `itemHeight`:图形的高度,即颜色条的高度。 -* `borderWidth`:边框线宽,单位px。 -* `dimension`:指定用数据的『哪个维度』,映射到视觉元素上。『数据』即 series.data。从1开始,默认为0取 data 中最后一个维度。 -* `hoverLink`:打开 hoverLink 功能时,鼠标悬浮到 visualMap 组件上时,鼠标位置对应的数值 在 图表中对应的图形元素,会高亮。 -* `orient`:布局方式是横还是竖。 -* `location`:组件显示在图表中的位置。 -* `inRange`:定义 在选中范围中 的视觉颜色。 -* ~~`outOfRange`:定义 在选中范围外 的视觉颜色。~~ - -## `Grid` - -网格组件。直角坐标系内绘图网格,单个 `grid` 内最多可以放置上下两个 `X` 轴,左右两个 `Y` 轴。可以在网格上绘制折线图,柱状图,散点图。目前最多只能存在一个 `grid` 组件。 - -相关参数: - -* `show`:是否显示直角坐标系网格组件。 -* `left`:组件离容器左侧的距离。 -* `right`:组件离容器右侧的距离。 -* `top`:组件离容器顶部的距离。 -* `bottom`:组件离容器底部的距离。 -* `backgroundColor`:背景颜色。 - -## `GaugeAxis` - -仪表盘坐标轴。 - -* `axisLine`:坐标轴轴线样式。 -* `splitLine`:坐标轴分割线样式。 -* `axisTick`:坐标轴刻度样式。 -* `axisLabel`:坐标轴刻度标签样式。 -* `axisLabelText`:坐标轴刻度标签自定义内容。当内容为空时,`axisLabel`根据刻度自动显示内容,否则取自该列表定义的内容。 - -## `GaugePointer` - -仪表盘指针。 - -* `width`:指针宽度。 -* `length`:指针长度。当为`0-1`的浮点数时表示相对仪表盘半径的百分比。 - -## `XAxis` - -直角坐标系 `grid` 中的 `X` 轴。单个 `grid` 组件最多只能放上下两个 `X` 轴。两个 `X` 轴存储在 `xAxes` 中。 - -相关参数: - -* `show`:是否显示 `X` 轴。默认 `xAxes[0]` 为 `true`,`xAxes[1]` 为 `false`。 -* `gridIndex`:坐标轴所在的 grid 的索引,默认位于第一个 grid。 -* `type`:坐标轴类型。默认为 `Category`。支持以下类型: - * `Value`:数值轴,用于连续数据。 - * `Category`:类目轴,适用于离散的类目数据,为该类型时必须通过 `data` 设置类目数据。 - * `Log`:对数轴,适用于对数数据。 -* `position`:坐标轴在Grid中的位置`AxisPosition`。支持以下类型: - * `Left`:左边。 - * `Right`:右边。 - * `Bottom`:底部。 - * `Top`:顶部。 -* `offset`:坐标轴相对默认位置的偏移。在相同position有多个坐标轴时有用。 -* `logBaseE`:对数轴是否以自然数 `e` 为底数,为 `true` 时 `logBase` 失效,只在对数轴(`type:'Log'`)中有效。 -* `logBase`:对数轴的底数,只在对数轴(`type:'Log'`)中有效。 -* `minMaxType`:坐标轴刻度最大最小值显示类型。默认为 `Default`。有以下三种类型: - * `Default`:0-最大值。 - * `MinMax`:最小值-最大值。 - * `Custom`:自定义的最小值-最大值。 -* `min`:设定的坐标轴刻度最小值,当 `minMaxType` 为 `Custom` 时有效。 -* `max`:设定的坐标轴刻度最大值,当 `minMaxType` 为 `Custom` 时有效。 -* `ceilRate`:最大最小值向上取整的倍率。默认为0时自动计算。 -* `splitNumber`:坐标轴的分割段数。默认为 `5`。当 `splitNumber` 设为 `0` 时,表示绘制所有的类目数据。 -* `interval`:强制设置坐标轴分割间隔。无法在类目轴中使用。设置该值时 `splitNumber` 无效。 -* `boundaryGap`:坐标轴两边是否留白。默认为 `true`。 -* `maxCache`:类目数据中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。 -* `inverse`:是否反向坐标轴。只在数值轴`Value`中有效。 -* `insertDataToHead`:添加新数据时是在列表的头部还是尾部加入。 -* `data`:类目数据,在类目轴(`type: 'Category'`)中有效。 -* `icons`:刻度的图标,在类目轴(`type: 'Category'`)中有效。 -* `axisLine`:坐标轴轴线相关配置 [AxisLine](#AxisLine)。 -* `axisName`:坐标轴名称相关配置 [AxisName](#AxisName)。 -* `axisTick`:坐标轴刻度相关配置 [AxisTick](#AxisTick)。 -* `axisLabel`:坐标轴刻度标签 [AxisLabel](#AxisLabel)。 -* `splitLine`:坐标轴轴线坐标轴分割线 [AxisSplitLine](#SplitLine)。 -* `splitArea`:坐标轴轴线坐标轴分割区域 [AxisSplitArea](#AxisSplitArea)。 -* `iconStyle`:坐标轴刻度图标的样式 [IconStyle](#IconStyle)。 - -相关接口: - -* `ClearData()`:清空类目数据。 -* `IsCategory()`:是否为类目轴。 -* `IsValue()`:是否为数值轴。 -* `AddData(string category, int maxDataNumber)`:添加一个类目到类目数据列表。 - -## `Background` - -背景组件。 -由于框架的局限性,背景组件使用有以下两个限制: -1:`chart`的父节点不能有布局控制类组件。 -2:`chart`的父节点只能有当前`chart`一个子节点。 -背景组件的开启需要通过接口来开启:`BaseChart.EnableBackground(bool flag)`。 - -相关参数: - -* `show`:是否显示启用背景组件。但能否激活背景组件还要受其他条件限制。 -* `image`:背景图。 -* `imageType`:背景图填充类型。 -* `imageColor`背景图颜色。默认`white`。 -* `hideThemeBackgroundColor`:当背景组件启用时,是否隐藏主题中设置的背景色。 - -## `YAxis` - -直角坐标系 `grid` 中的 `Y` 轴。单个 `grid` 组件最多只能放左右两个 `Y` 轴。两个 `Y` 轴存储在 `yAxes` 中。 - -相关参数: - -* `show`:是否显示 `Y` 轴。默认 `yAxes[0]` 为 `true`,`yAxes[1]` 为 `false`。 -* `type`:坐标轴类型。默认为 `Value`。有以下两种类型: - * `Value`:数值轴,用于连续数据。 - * `Category`:类目轴,适用于离散的类目数据,为该类型时必须通过 `data` 设置类目数据。 -* `minMaxType`:坐标轴刻度最大最小值显示类型。默认为 `Default`。有以下三种类型: - * `Default`:0-最大值。 - * `MinMax`:最小值-最大值。 - * `Custom`:自定义的最小值-最大值。 -* `min`:设定的坐标轴刻度最小值,当 `minMaxType` 为 `Custom` 时有效。 -* `max`:设定的坐标轴刻度最大值,当 `minMaxType` 为 `Custom` 时有效。 -* `splitNumber`:坐标轴的分割段数。默认为 `5`。 -* `interval`:强制设置坐标轴分割间隔。无法在类目轴中使用。设置改值时 `splitNumber` 无效。 -* `splitLineType`:分割线类型。默认为 `Dashed`。支持以下五种类型: - * `None`:不显示分割线。 - * `Solid`:实线。 - * `Dashed`:虚线。 - * `Dotted`:点线。 - * `DashDot`:点划线。 - * `DashDotDot`:双点划线。 -* `boundaryGap`:坐标轴两边是否留白。默认为 `false`。 -* `data`:类目数据,在类目轴(`type: 'Category'`)中有效。 -* `axisLine`:坐标轴轴线相关配置 [AxisLine](#AxisLine)。 -* `axisName`:坐标轴名称相关配置 [AxisName](#AxisName)。 -* `axisTick`:坐标轴刻度相关配置 [AxisTick](#AxisTick)。 -* `axisLabel`:坐标轴刻度标签 [AxisLabel](#AxisLabel)。 -* `splitArea`:坐标轴轴线坐标轴分割区域 [SplitArea](#SplitArea)。 - -相关接口: - -* `ClearData()`:清空类目数据。 -* `IsCategory()`:是否为类目轴。 -* `IsValue()`:是否为数值轴。 -* `AddData(string category, int maxDataNumber)`:添加一个类目到类目数据列表。 - -## `Series` - -系列列表。每个系列通过 type 决定自己的图表类型。 - -相关参数: - -* `show`:系列是否显示在图表上。 -* `type`:系列的图表类型。有以下几种类型: - * `Line`:折线图。 - * `Bar`:柱状图。 - * `Pie`:饼图。 - * `Radar`:雷达图。 - * `Scatter`:散点图。 - * `EffectScatter`:带有涟漪特效动画的散点图。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `stack`:数据堆叠。同个类目轴上系列配置相同的 `stack` 值后,后一个系列的值会在前一个系列的值上相加。 -* `axisIndex`:使用的坐标轴轴的 `index`,在单个图表实例中存在多个坐标轴轴的时候有用。 -* `radarIndex`:雷达图所使用的 `radar` 组件的 `index`。 -* `minShow`:系列显示数据的最小索引。 -* `maxShow`:系列显示数据的最大索引。 -* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。 -* `sampleDist`采样的最小水平像素距离,默认为`0`时不采样。当两个数据点间的水平像素距离小于该值时,开启采样,保证两点间的水平像素距离不小于该值。 -* `sampleType`:采样类型。当`sampleDist`大于`0`时有效。支持以下五种采样类型: - * `Peak`:取峰值。当过滤点的平均值大于等于`sampleAverage`时,取最大值;反之取最小值。 - * `Average`:取过滤点的平均值。 - * `Max`:取过滤点的最大值。 - * `Min`:取过滤点的最小值。 - * `Sum`:取过滤点之和。 -* `sampleAverage`:设定的采样平均值。当 `sampleType` 为 `Peak` 时,用于和过滤数据的平均值做对比是取最大值还是最小值。默认为`0`时会实时计算所有数据的平均值。 -* `areaStyle`:区域填充样式 [AreaStyle](#AreaStyle)。 -* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。 -* `lineType`:折线图样式类型。支持以下十种类型: - * `Normal`:普通折线图。 - * `Smooth`:平滑曲线。 - * `SmoothDash`:平滑虚线。 - * `StepStart`:阶梯线图:当前点。 - * `StepMiddle`:阶梯线图:当前点和下一个点的中间。 - * `StepEnd`:阶梯线图:下一个拐点。 - * `Dash`:虚线。 - * `Dot`:点线。 - * `DashDot`:点划线。 - * `DashDotDot`:双点划线。 -* `lineStyle`:线条样式 [LineStyle](#LineStyle)。 -* `barType`:柱状图类型。以下几种类型: - * `Normal`:普通柱状图。 - * `Zebra`:斑马柱状图。 - * `Capsule`:胶囊柱状图。 -* `barPercentStack`:是否百分比堆叠柱状图,相同 `stack` 的 `serie` 只要有一个 `barPercentStack` 为 `true`,则就显示成百分比堆叠柱状图。 -* `barWidth`:柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 -* `barGap`:不同系列的柱间距离。为百分比(如 `'0.3f'`,表示柱子宽度的 `30%`)。如果想要两个系列的柱子重叠,可以设置 `barGap` 为 `'-1f'`。这在用柱子做背景的时候有用。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。 -* `barCategoryGap`:同一系列的柱间距离,默认为类目间距的20%,可设固定值。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。 -* `barZebraWidth`:斑马线的粗细。`barType` 为 `Zebra` 时有效。 -* `barZebraGap`:斑马线的间距。`barType` 为 `Zebra` 时有效。 -* `pieClickOffset`:鼠标点击时是否开启偏移,一般用在PieChart图表中。 -* `pieRoseType`:是否展示成南丁格尔图,通过半径区分数据大小。 -* `pieSpace`:饼图项间的空隙留白。 -* `pieCenter`:饼图的中心点。 -* `pieRadius`:饼图的半径。`radius[0]` 表示内径,`radius[1]` 表示外径。 -* `roundCap`:启用圆弧效果。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `lineArrow`:折线图的箭头 [LineArrow](#LineArrow)。 -* `insertDataToHead`:添加新数据时是在列表的头部还是尾部加入。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Line` - -折线图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Line`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `stack`:数据堆叠。同个类目轴上系列配置相同的 `stack` 值后,后一个系列的值会在前一个系列的值上相加。 -* `xAxisIndex`:使用的坐标轴X轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。 -* `yAxisIndex`:使用的坐标轴Y轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。 -* `minShow`:系列显示数据的最小索引。 -* `maxShow`:系列显示数据的最大索引。 -* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。 -* `sampleDist`采样的最小水平像素距离,默认为`0`时不采样。当两个数据点间的水平像素距离小于该值时,开启采样,保证两点间的水平像素距离不小于该值。 -* `sampleType`:采样类型。当`sampleDist`大于`0`时有效。支持以下五种采样类型: - * `Peak`:取峰值。当过滤点的平均值大于等于`sampleAverage`时,取最大值;反之取最小值。 - * `Average`:取过滤点的平均值。 - * `Max`:取过滤点的最大值。 - * `Min`:取过滤点的最小值。 - * `Sum`:取过滤点之和。 -* `sampleAverage`:设定的采样平均值。当 `sampleType` 为 `Peak` 时,用于和过滤数据的平均值做对比是取最大值还是最小值。默认为`0`时会实时计算所有数据的平均值。 -* `clip`:是否裁剪超出坐标系部分的图形。 -* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。 -* `ignoreValue`:忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。 -* `showAsPositiveNumber`:将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。 -* `large`:是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点:优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。 -* `largeThreshold`:开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 -* `areaStyle`:区域填充样式 [AreaStyle](#AreaStyle)。 -* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。 -* `lineType`:折线图样式类型。支持以下十种类型: - * `Normal`:普通折线图。 - * `Smooth`:平滑曲线。 - * `SmoothDash`:平滑虚线。 - * `StepStart`:阶梯线图:当前点。 - * `StepMiddle`:阶梯线图:当前点和下一个点的中间。 - * `StepEnd`:阶梯线图:下一个拐点。 - * `Dash`:虚线。 - * `Dot`:点线。 - * `DashDot`:点划线。 - * `DashDotDot`:双点划线。 -* `lineStyle`:线条样式 [LineStyle](#LineStyle)。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `lineArrow`:折线图的箭头 [LineArrow](#LineArrow)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Bar` - -折线图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Bar`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `stack`:数据堆叠。同个类目轴上系列配置相同的 `stack` 值后,后一个系列的值会在前一个系列的值上相加。 -* `xAxisIndex`:使用的坐标轴X轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。 -* `yAxisIndex`:使用的坐标轴Y轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。 -* `minShow`:系列显示数据的最小索引。 -* `maxShow`:系列显示数据的最大索引。 -* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。 -* `barType`:柱状图类型。以下几种类型: - * `Normal`:普通柱状图。 - * `Zebra`:斑马柱状图。 - * `Capsule`:胶囊柱状图。 -* `barPercentStack`:是否百分比堆叠柱状图,相同 `stack` 的 `serie` 只要有一个 `barPercentStack` 为 `true`,则就显示成百分比堆叠柱状图。 -* `barWidth`:柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 -* `barGap`:不同系列的柱间距离。为百分比(如 `'0.3f'`,表示柱子宽度的 `30%`)。如果想要两个系列的柱子重叠,可以设置 `barGap` 为 `'-1f'`。这在用柱子做背景的时候有用。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。 -* `barCategoryGap`:同一系列的柱间距离,默认为类目间距的20%,可设固定值。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。 -* `barZebraWidth`:斑马线的粗细。`barType` 为 `Zebra` 时有效。 -* `barZebraGap`:斑马线的间距。`barType` 为 `Zebra` 时有效。 -* `clip`:是否裁剪超出坐标系部分的图形。 -* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。 -* `ignoreValue`:忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。 -* `showAsPositiveNumber`:将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。 -* `large`:是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点:优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。 -* `largeThreshold`:开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 -* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。 -* `itemStyle`:柱条样式 [ItemStyle](#ItemStyle)。 -* `areaStyle`:区域填充样式 [AreaStyle](#AreaStyle)。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Pie` - -饼图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Pie`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `pieRoseType`:南丁格尔玫瑰图类型,支持以下类型: - * `None`:不展示成南丁格尔玫瑰图。 - * `Radius`:扇区圆心角展现数据的百分比,半径展现数据的大小。 - * `Area`:所有扇区圆心角相同,仅通过半径展现数据大小。 -* `gap`:扇区间隙。 -* `center`:中心点坐标。当值为`0-1`的浮点数时表示百分比。 -* `radius`:半径。`radius[0]`为内径,`radius[1]`为外径。当内径大于0时即为圆环图。 -* `minAngle`:最小的扇区角度(0-360)。用于防止某个值过小导致扇区太小影响交互。 -* `roundCap`:是否启用圆弧效果。 -* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制,对应的`Label`和`Legend`也不会显示。 -* `ignoreValue`:忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。 -* `avoidLabelOverlap`:在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Radar` - -雷达图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Radar`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `radarType`:雷达图类型`RadarType`,支持以下类型: - * `Multiple`:多圈雷达图。此时可一个雷达里绘制多个圈,一个`serieData`就可组成一个圈(多维数据)。 - * `Single`:单圈雷达图。此时一个雷达只能绘制一个圈,多个`serieData`组成一个圈,数据取自`data[1]`。 -* `radarIndex`:雷达图所使用的 `radar` 组件的 `index`。 -* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。 -* `lineStyle`:线条样式 [LineStyle](#LineStyle)。 -* `itemStyle`:标记样式 [ItemStyle](#ItemStyle)。 -* `areaStyle`:区域填充样式 [AreaStyle](#AreaStyle)。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Scatter` - -散点图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Scatter`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `clip`:是否裁剪超出坐标系部分的图形。 -* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Heatmap` - -热力图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Scatter`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。 -* `ignoreValue`:忽略数据的默认值。默认值默认为`0`,当 `ignore` 为 `true` 才有效。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Gauge` - -仪表盘系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Gauge`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `gaugeType`:仪表盘类型,支持以下类型: - * `Pointer`:指针类型。 - * `ProgressBar`:进度条类型。 -* `center`:中心点坐标。当值为0-1的浮点数时表示百分比。 -* `radius`:仪表盘半径。 -* `min`:最小的数据值。映射到`startAngle`。 -* `max`:最大的数据值。映射到`endAngle`。 -* `startAngle`:仪表盘起始角度。和时钟一样,`12`点钟位置是`0`度,顺时针到`360`度。 -* `endAngle`:仪表盘结束角度。和时钟一样,`12`点钟位置是`0`度,顺时针到`360`度。 -* `splitNumber`:仪表盘刻度分割段数。 -* `roundCap`:是否启用圆弧效果。 -* `titleStyle`:仪表盘标题 [TitleStyle](#TitleStyle)。 -* `gaugeAxis`: 仪表盘坐标轴 [GaugeAxis](#GaugeAxis)。 -* `gaugePointer`:仪表盘指针 [GaugePointer](#GaugePointer)。 -* `itemStyle`:仪表盘指针样式 [ItemStyle](#ItemStyle)。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。仪表盘的数据一般只有一个,值通过`label`样式显示,`name`通过`titleStyle`样式显示。 - -## `Serie-Ring` - -环形图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Ring`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `center`:中心点坐标。当值为`0-1`的浮点数时表示百分比。 -* `radius`:仪表盘半径。 -* `startAngle`:仪表盘起始角度。和时钟一样,`12`点钟位置是`0`度,顺时针到`360`度。 -* `ringGap`:环形图的环间隙。 -* `roundCap`:是否启用圆弧效果。 -* `clockwise`:是否顺时针,默认为`true`。 -* `titleStyle`:环形图中心标题 [TitleStyle](#TitleStyle)。 -* `itemStyle`:环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。环形图的数据只有二维,`data[0]`表示当前值,`data[1]`表示最大值。 - -## `Serie-Liquid` - -水位图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Liquid`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `vesselIndex`:水位图所使用的`vessel`组件的`index`。 -* `min`:最小值。 -* `max`:最大值。 -* `waveLength`:水波长。 -* `waveHeight`:水波高。 -* `waveSpeed`:水波移动速度。正数时左移,负数时右移。 -* `waveOffset`:水波偏移。 -* `itemStyle`:环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。 -* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。水位图的数据一般只有一个,表示当前水位值,用`max`设置最大水位值。 - -## `Serie-Candlestick` - -K线图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Candlestick`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `xAxisIndex`:使用的坐标轴X轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。 -* `yAxisIndex`:使用的坐标轴Y轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。 -* `minShow`:系列显示数据的最小索引。 -* `maxShow`:系列显示数据的最大索引。 -* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。 -* `clip`:是否裁剪超出坐标系部分的图形。 -* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。 -* `ignoreValue`:忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。 -* `showAsPositiveNumber`:将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。 -* `large`:是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点:优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。 -* `largeThreshold`:开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 -* `itemStyle`:环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,K线图至少需要4个维度的数组`[open, close, lowest, highest]`。 - -## `Settings` - -全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。 - -* `reversePainter`:Painter是否逆序。逆序时index大的serie最先绘制。 -* `maxPainter`:默认最大Painter数据,当Serie数量大于maxPainter时会平均分配Painter。 -* `basePainterMaterial`:Base Pointer 材质球,设置后会影响Axis等。 -* `seriePainterMaterial`:Serie Pointer 材质球,设置后会影响所有Serie。 -* `topPainterMaterial`:Top Pointer 材质球,设置后会影响Tooltip等。 -* `lineSmoothStyle`:曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。 -* `lineSmoothness`:曲线平滑度。值越小曲线越平滑,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。 -* `lineSegmentDistance`: 线段的分割距离。普通折线图的线是由很多线段组成,段数由该数值决定。值越小段数越多,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。 -* `cicleSmoothness`:圆形(包括扇形、环形等)的平滑度。数越小圆越平滑,但顶点数也会随之增加。 - -## `SerieAnimation` - -* `enable`:是否开启动画系统。 -* ~~`threshold`:是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。~~ -* `fadeInDelay`:设定的渐入动画延时,单位毫秒。如果要设置单个数据项的延时,可以用代码定制:`customFadeInDelay`。 -* `fadeInDuration`:设定的渐入动画时长,单位毫秒。如果要设置单个数据项的渐入时长,可以用代码定制:`customFadeInDuration`。 -* `fadeOutDelay`:设定的渐出动画延时,单位毫秒。如果要设置单个数据项的延时,可以用代码定制:`customFadeOutDelay`。 -* `fadeOutDuration`:设定的渐出动画时长,单位毫秒。如果要设置单个数据项的渐出时长,可以用代码定制:`customFadeOutDuration`。 -* `dataChangeEnable`:是否开启数据变更动画。 -* `dataChangeDuration`:数据变更动画时长,单位毫秒。 - -## `AreaStyle` - -* `show`:是否显示区域填充。 -* `origin`:区域填充的起始位置 `AreaOrigin`。有以下三种填充方式: - * `Auto`:填充坐标轴轴线到数据间的区域。 - * `Start`:填充坐标轴底部到数据间的区域。 - * `End`:填充坐标轴顶部到数据间的区域。 -* `color`:区域填充的颜色,默认取 `serie` 对应的颜色。如果 `toColor` 不是默认值,则表示渐变色的起点颜色。 -* `toColor`:区域填充的渐变色的终点颜色。 -* `highlightColor`:高亮时区域填充的颜色,默认取 `serie` 对应的颜色。如果 `highlightToColor` 不是默认值,则表示渐变色的起点颜色。 -* `highlightToColor`:高亮时区域填充的渐变色的终点颜色。 -* `opacity`:图形透明度。支持从 `0` 到 `1` 的数字,为 `0` 时不绘制该图形。 -* `tooltipHighlight`:鼠标悬浮时是否高亮之前的区域。 - -## `AxisLabel` - -* `show`:是否显示刻度标签。 -* `interval`:坐标轴刻度标签的显示间隔,在类目轴中有效。`0`表示显示所有标签,`1`表示隔一个隔显示一个标签,以此类推。 -* `inside`:刻度标签是否朝内,默认朝外。 -* `margin`:刻度标签与轴线之间的距离。 -* `formatter`:图例内容字符串模版格式器。支持用 `\n` 换行。模板变量为图例名称 `{value}`,数值格式化通过`numericFormatter`。 -* `numericFormatter`:标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式:`A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。 -* `showAsPositiveNumber`:将负数数值显示为正数。一般和`Serie`的`showAsPositiveNumber`配合使用。 -* `onZero`:刻度标签显示在`0`刻度上。 -* `width`:刻度标签的宽。当为0时系统自动设置。 -* `height`:刻度标签的高。当为0时系统自动设置。 -* `textLimit`:文本自适应 [TextLimit](#TextLimit)。只在类目轴中有效。 -* `textStyle`:文本样式 [TextStyle](#TextStyle)。 - -## `AxisLine` - -* `show`:是否显示坐标轴轴线。 -* `onZero`: `X` 轴或者 `Y` 轴的轴线是否在另一个轴的 `0` 刻度上,只有在另一个轴为数值轴且包含 `0` 刻度时有效。 -* `width`:坐标轴线线宽。 -* `symbol`:是否显示箭头。 -* `symbolWidth`:箭头宽。 -* `symbolHeight`:箭头高。 -* `symbolOffset`:箭头偏移。 -* `symbolDent`:箭头的凹陷程度。 - -## `AxisName` - -* `show`:是否显示坐标名称。 -* `name`:坐标轴名称。 -* `location`:坐标轴名称的位置。支持以下类型: - * `Start`:坐标轴起始处。 - * `Middle`:坐标轴中间。 - * `End`:坐标轴末端。 -* `textStyle`:显示内容文本样式 [TextStyle](#TextStyle)。 - -## `AxisSplitLine` - -* `show`:是否显示坐标分割线。 -* `interval`:分割线的显示间隔。`0` 表示显示所有分割线,`1` 表示隔一个隔显示一个分割线,以此类推。 -* `lineStyle`:线条样式 [LineStyle](#LineStyle)。 - -## `AxisSplitArea` - -* `show`:是否显示坐标分割区域。 -* `color`:分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。 - -## `AxisTick` - -* `show`:是否显示坐标轴刻度。 -* `alignWithLabel`:类目轴中在 `boundaryGap` 为 `true` 的时候有效,可以保证刻度线和标签对齐。 -* `inside`:坐标轴刻度是否朝内,默认朝外。 -* `length`:坐标轴刻度的长度。 -* `width`:坐标轴刻度的宽度。默认为0时宽度和坐标轴一致。 -* `showStartTick`:是否显示第一个刻度。 -* `showEndTick`:是否显示最后一个刻度。 - -## `Emphasis` - -* `show`:是否启用高亮样式。 -* `label`:图形文本标签样式 [SerieLabel](#SerieLabel)。 -* `itemStyle`:图形样式 [ItemStyle](#ItemStyle)。 - -## `ItemStyle` - -* `show`:是否启用。 -* `color`:颜色。对于K线图,对应阳线的颜色。 -* `color0`:颜色。对于K线图,对应阴线的颜色。 -* `toColor`:渐变颜色1。 -* `toColor2`:渐变颜色2。只在折线图中有效。 -* `backgroundColor`:背景颜色。 -* `backgroundWidth`:背景的宽。 -* `centerColor`:中心区域的颜色。如环形图的中心区域。 -* `centerGap`:中心区域的间隙。如环形图的中心区域于最内环的间隙。 -* `borderType`:边框的类型。 -* `borderColor`:边框的颜色。对于K线图,对应阳线的边框颜色。 -* `borderColor0`:边框的颜色。对于K线图,对应阴线的边框颜色。 -* `borderWidth`:边框宽。 -* `opacity`:透明度。 -* `tooltipFormatter`:提示框单项的字符串模版格式器。具体配置参考`Tooltip`的`formatter`。 -* `numericFormatter`:标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式:`A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。此字段优先于`SerieLabel`和`Tooltip`的`numericFormatter`。 -* `cornerRadius`:圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。支持用0-1的浮点数设置百分比。 - -## `LineArrow` - -* `show`:是否显示箭头。 -* `position`:箭头显示位置。支持以下两种位置: - * `End`:末端显示。最后一个数据上显示箭头。 - * `Start`:起始端显示。第一个数据上显示箭头。 -* `width`:箭头宽。 -* `height`:箭头长。 -* `offset`:箭头偏移。默认箭头的中心点和数据坐标点一致,可通过 `offset` 调整偏移。 -* `dent`:箭头的凹度。 - -## `LineStyle` - -* `show`:是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。 -* `type`:线条类型。支持以下五种类型: - * `None`:不显示分割线。 - * `Solid`:实线。 - * `Dashed`:虚线。 - * `Dotted`:点线。 - * `DashDot`:点划线。 - * `DashDotDot`:双点划线。 -* `color`:线条颜色。默认和 `serie` 一致。 -* `toColor`:线的渐变颜色(需要水平方向渐变时)。 -* `toColor2`:线的渐变颜色2(需要水平方向三个渐变色的渐变时)。 -* `width`:线条宽。 -* `opacity`:线条的透明度。支持从 `0` 到 `1` 的数字,为 `0` 时不绘制该图形。 - -## `Location` - -* `align`:对齐方式。有以下对齐方式。 - * `TopLeft`:左上角对齐。 - * `TopRight`:右上角对齐。 - * `TopCenter`:置顶居中对齐。 - * `BottomLeft`:左下对齐。 - * `BottomRight`:右下对齐。 - * `BottomCenter`:底部居中对齐。 - * `Center`:居中对齐。 - * `CenterLeft`:中部靠左对齐。 - * `CenterRight`:中部靠右对齐。 -* `left`:离容器左侧的距离。 -* `right`:离容器右侧的距离。 -* `top`:离容器上侧的距离。 -* `bottom`:离容器下侧的距离。 - -## `MarkLine` - -* `show`:是否显示标线。 -* `animation`:标线的动画样式。 -* `data`:标线的数据项[MarkLineData](#MarkLineData)列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。 - -## `MarkLineData` - -* `name`:标注名称,将会作为文字显示。label的formatter可通过{b}显示名称,通过{c}显示数值。 -* `type`:特殊的标注类型,用于标注最大值最小值等。。有以下标注类型: - * `None`:无类型。此时通过 - * `Min`:最小值。`dimension`维度上数据的最小值。 - * `Max`:最大值。`dimension`维度上数据的最大值。 - * `Average`:平均值。`dimension`维度上数据的平均值。 - * `Median`:中位数。`dimension`维度上数据的中位数。 -* `dimension`:当type为特殊类型时,指示从哪个维度的数据上计算特殊值。 -* `xPosition`:相对原点的 x 坐标,单位像素。当type为None时有效。 -* `yPosition`:相对原点的 y 坐标,单位像素。当type为None时有效。 -* `xValue`:X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 -* `yValue`:Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 - -## `SerieData` - -* `name`:数据项名称。 -* `selected`:该数据项是否被选中。 -* `radius`:自定义半径。可用在饼图中自定义某个数据项的半径。 -* `enableIconStyle`: 是否启用单个数据项的图标设置。 -* `iconStyle`:数据项图标样式。 -* `enableLabel`:是否启用单个数据项的标签设置。 -* `label`:单个数据项的标签设置。 -* `enableItemStyle`:是否启用单个数据项的样式。 -* `itemStyle`:单个数据项的样式设置。 -* `enableEmphasis`:是否启用单个数据项的高亮样式。 -* `emphasis`:单个数据项的高亮样式设置。 -* `enableSymbol`:是否启用单个数据项的标记设置。 -* `symbol`:单个数据项的标记设置。 -* `data`:可指定任意维数的数值列表。对于折线图和柱状图,`data`其实是`size`为`2`的数组,`data[0]`是x的编号,`data[1]`是`y`的数值,默认显示`data[1]`。其他图表看需求而定是长度大于`2`的数组。可通过`Serie`的`showDataDimension`指定数据长度。 - -## `SerieLabel` - -* `show`:是否显示文本标签。 -* `position`:标签的位置。折线图时强制默认为 `Center`,支持以下 `5` 种位置: - * `Outside`:饼图扇区外侧,通过视觉引导线连到相应的扇区。只在饼图种可用。 - * `Inside`:饼图扇区内部。只在饼图可用。 - * `Center`:在中心位置(折线图,柱状图,饼图)。 - * `Top`:顶部(柱状图)。 - * `Bottom`:底部(柱状图)。 -* `formatter`:标签内容字符串模版格式器。支持用 `\n` 换行。模板变量有:`{a}`:系列名;`{b}`:数据名;`{c}`:数据值;`{d}`:百分比。示例:`{b}:{c}`。 -* `numericFormatter`:标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式:`A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。 -* `offset`:距离图形元素的偏移。 -* `autoOffset`:是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 -* `backgroundWidth`:标签的背景宽度。一般不用指定,不指定时则自动是文字的宽度。 -* `backgroundHeight`:标签的背景高度。一般不用指定,不指定时则自动是文字的高度。 -* `paddingLeftRight`:标签文字和边框的左右边距。 -* `paddingTopBottom`:标签文字和边框的上下边距。 -* `line`:是否显示视觉引导线。在 `label` 位置 设置为 `'Outside'` 的时候会显示视觉引导线。 -* `lineType`:视觉引导线类型。支持以下几种类型: - * `BrokenLine`:折线。 - * `Curves`:曲线。 - * `HorizontalLine`:水平线。 -* `lineColor`:视觉引导线自定义颜色。 -* `lineWidth`:视觉引导线的宽度。 -* `lineLength1`:视觉引导线第一段的长度。 -* `lineLength2`:视觉引导线第二段的长度。 -* `border`:是否显示边框。 -* `borderWidth`:边框宽度。 -* `borderColor`:边框颜色。 -* `textStyle`:显示内容文本样式 [TextStyle](#TextStyle)。 - -## `SerieSymbol` - -* `show`:是否显示标记。 -* `type`:标记类型。支持以下六种类型: - * `EmptyCircle`:空心圆。 - * `Circle`:实心圆。 - * `Rect`:正方形。可通过设置`itemStyle`的`cornerRadius`变成圆角矩形。 - * `Triangle`:三角形。 - * `Diamond`:菱形。 - * `None`:不显示标记。 -* `gap`:图形标记的外留白距离。 -* `sizeType`:标记图形的大小获取方式。支持以下三种类型: - * `Custom`:自定义大小。 - * `FromData`:通过 `dataIndex` 从数据中获取,再乘以一个比例系数 `dataScale` 。 - * `Callback`:通过回调函数 `sizeCallback` 获取。 -* `size`:标记的大小。 -* `selectedSize`:被选中的标记的大小。 -* `dataIndex`:当 `sizeType` 指定为 `FromData` 时,指定的数据源索引。 -* `dataScale`:当 `sizeType` 指定为 `FromData` 时,指定的倍数系数。 -* `selectedDataScale`:当 `sizeType` 指定为 `FromData` 时,指定的高亮倍数系数。 -* `sizeCallback`:当 `sizeType` 指定为 `Callback` 时,指定的回调函数。 -* `selectedSizeCallback`:当 `sizeType` 指定为 `Callback` 时,指定的高亮回调函数。 -* `color`:标记图形的颜色,默认和系列一致。 -* `opacity`:图形标记的透明度。 -* `startIndex`:开始显示图形标记的索引。 -* `interval`:显示图形标记的间隔。`0`表示显示所有标签,`1`表示隔一个隔显示一个标签,以此类推。 -* `forceShowLast`:是否强制显示最后一个图形标记。默认为 `false`。 - -## `IconStyle` - -* `show`:是否显示图标。 -* `layer`:显示在上层还是在下层。 -* `sprite`:图标。 -* `color`:颜色。 -* `width`:图标的宽。 -* `height`:图标的高。 -* `offset`:位置偏移。 - -[返回首页](https://github.com/XCharts-Team/XCharts) -[XChartsAPI接口](XChartsAPI.md) -[XCharts问答](XCharts问答.md) diff --git a/Documentation/config-EN.md.meta b/Documentation/config-EN.md.meta new file mode 100644 index 00000000..18713f6f --- /dev/null +++ b/Documentation/config-EN.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 255571a0ecc5848af97ee18c2c9fb4d1 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Documentation/config-ZH.md.meta b/Documentation/config-ZH.md.meta new file mode 100644 index 00000000..9821b902 --- /dev/null +++ b/Documentation/config-ZH.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bc767d3c7d87449c2b739135d75f896b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Documentation/xcharts-configuration-EN.md b/Documentation/xcharts-configuration-EN.md deleted file mode 100644 index 423ff095..00000000 --- a/Documentation/xcharts-configuration-EN.md +++ /dev/null @@ -1,959 +0,0 @@ -# XCharts Configuration - -[XCharts Homepage](https://github.com/XCharts-Team/XCharts) -[XCharts API](xcharts-api-EN.md) -[XCharts Q&A](xcharts-questions-and-answers-EN.md) - -The translation work is still in progress. - -__Main component:__ - -* [Axis](#XAxis) -* [Background](#Background) -* [DataZoom](#DataZoom) -* [Grid](#Grid) -* [Legend](#Legend) -* [Polar](#Polar) -* [Radar](#Radar) -* [Series](#Series) -* [Serie-Line](#Serie-Line) -* [Serie-Bar](#Serie-Bar) -* [Serie-Pie](#Serie-Pie) -* [Serie-Radar](#Serie-Radar) -* [Serie-Scatter](#Serie-Scatter) -* [Serie-Heatmap](#Serie-Heatmap) -* [Serie-Gauge](#Serie-Gauge) -* [Serie-Ring](#Serie-Ring) -* [Serie-Liquid](#Serie-Liquid) -* [Serie-Candlestick](#Serie-Candlestick) -* [Serie-Gantt](#Serie-Gantt) -* [Settings](#Settings) -* [Theme](#Theme) -* [Title](#Title) -* [Tooltip](#Tooltip) -* [Vessel](#Vessel) -* [VisualMap](#VisualMap) - -__Sub component:__ - -* [AreaStyle](#AreaStyle) -* [AxisLabel](#AxisLabel) -* [AxisLine](#AxisLine) -* [AxisName](#AxisName) -* [AxisSplitLine](#AxisSplitLine) -* [AxisSplitArea](#AxisSplitArea) -* [AxisTick](#AxisTick) -* [Emphasis](#Emphasis) -* [ItemStyle](#ItemStyle) -* [LineArrow](#LineArrow) -* [LineStyle](#LineStyle) -* [Location](#Location) -* [MarkLine](#MarkLine) -* [SerieAnimation](#SerieAnimation) -* [SerieData](#SerieData) -* [SerieLabel](#SerieLabel) -* [SerieSymbol](#SerieSymbol) -* [TextLimit](#TextLimit) -* [TextStyle](#TextStyle) -* [IconStyle](#IconStyle) - -## `Theme` - -Theme components. Topics are used to configure other parameters such as the global color scheme for the chart. - -Parameters: - -* `theme`: Built-in theme types. There are `Default`, `Light`, `Dark` three optional built-in theme. -* `font`: A common font for all text. -* `backgroundColor`: Chart background color. -* `titleTextColor`: The text color of the main title. -* `titleSubTextColor`: The text color of the sub title. -* `legendTextColor`: Legend text color when actived. -* `legendUnableColor`: Legend text color when unactived. -* `axisTextColor`: The text color of axis label. -* `axisLineColor`: The color of axis line. -* `axisSplitLineColor`: The color of the dividing line of the coordinate axis is the same as the default color of the axis. -* `tooltipBackgroundColor`: The background color of the tooltip. -* `tooltipFlagAreaColor`: The color of the shadow indicator for the tooltip. -* `tooltipTextColor`: The text color of Tooltip. -* `tooltipLabelColor`: The cross indicator in the tooltip coordinates the background color of the label. -* `tooltipLineColor`: The color of the indicator line in the tooltip. -* `dataZoomTextColor`: The text color of dataZoom. -* `dataZoomLineColor`: The line color of dataZoom. -* `dataZoomSelectedColor`: The selected area color of dataZoom. -* `colorPalette`: Palette color list. 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. - -API: - -* `GetColor(int index)`: Gets the color of the specified index from the palette. -* `GetColorStr(int index)`: Gets the hexadecimal color string of the specified index from the palette. -* `GetColor(string hexColorStr)`: Convert the html string to color. - -## `Title` - -Title component, including main title and subtitle. - -Parameters: - -* `show`: Whether to show title component.Set this to false to prevent the title component from showing. -* `text`: The content of main title, supporting `\n` for newlines. -* `textStyle`: The text style of main title [TextStyle](#TextStyle). -* `subText`: The content of sub title, supporting `\n` for newlines. -* `subTextStyle`: The text style of sub title [TextStyle](#TextStyle). -* `itemGap`: The gap between the main title and sub title. -* `location`: The location of title component [Location](#Location). - -## `TitleStyle` - -Sub component for serie title. - -* `show`: Whether to show serie title. -* `textStyle`: The text style of title [TextStyle](#TextStyle). - -## `Legend` - -Legend component.The legend component shows different sets of symbol, colors, and names. You can control which series are not displayed by clicking on the legend. - -Parameters: - -* `show`: Whether show legend component. -* `iconType`: the legend icon symbol type: - * `Auto` : Auto match. - * `Custom` : Custom icon. - * `EmptyCircle` : hollow circle. - * `Circle` : solid Circle. - * `Rect` : square. - * `Triangle` : - * `Diamond` : -* `selectedMode`: Selected mode of legend, which controls whether series can be toggled displaying by clicking legends: - * `Multiple`: multi-select. - * `Single`: single select. - * `None`: can’t select. -* `orient`: horizontal or vertical layout: - * `Horizonal`: horizontal layout. - * `Vertical`: vertical layout. -* `location`: the localtion of legend in chart [Location](#Location). -* `itemWidth`: the width of legend icon. -* `itemHeight`: the height of legend icon. -* `itemGap`: The distance between each legend, horizontal distance in horizontal layout, and vertical distance in vertical layout. -* `itemAutoColor`: Whether the legend symbol matches the color automatically. -* `formatter`: Legend content string template formatter. Support for wrapping lines with `\n`. Template:`{name}`. -* `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. If data is not specified, it will be auto collected from series. -* `icons`: The list of cunstomize icons. -* `textStyle`: The style of text [TextStyle](#TextStyle). - -API: - -* `ClearData()`: Clear legend data. -* `ContainsData(string name)`: Whether include in legend data by the specified name. -* `RemoveData(string name)`: Remove legend from data. -* `AddData(string name)`: Add legend. -* `GetData(int index)`: Get legend. -* `GetIndex(string legendName)`: Get the index of legend. - -## `Polar` - -Polar coordinate can be used in scatter and line chart. Every polar coordinate has an angleAxis and a radiusAxis. - -Parameters: - -* `show`: Whether to show the polor component. -* `center`: The center of ploar. 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. -* `radius`: the radius of polar. -* `backgroundColor`: Background color of polar, which is transparent by default. - -## `Radar` - -Radar coordinate conponnet for radar charts. - -* `shape`: Radar render type, in which `Polygon` and `Circle` are supported. - * `Polygon`: Polygon. - * `Circle`: Circle. -* `positionType`: The position type of radar indicator label display. - * `Vertice`: Display at the vertex. - * `Between`: Display at the middle of line. -* `radius`: The radius of radar.[default:0.3f]. -* `center`: the center of radar chart. 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.4f]]. -* `ceilRate`: The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated.[default:0]. -* `splitNumber`: Segments of indicator axis.[default:5]. -* `splitNumber`: Tooltip displays all the data on the axis.[default:false]. -* `splitLine`: The split line style of radar [AxisSplitLine](#AxisSplitLine). -* `splitArea`: The split area style of radar [AxisSplitArea](#AxisSplitArea). -* `indicator`: Whether to show indicator. -* `indicatorGap`: The gap of indicator and radar. -* `indicatorList`: The indicator list [Radar.Indicator](#Radar.Indicator). - -## `Radar.Indicator` - -Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart. - -* `name`: The name of indicator. -* `max`: The maximum value of indicator, with default value of 0, but we recommend to set it manually. -* `min`: The minimum value of indicator, with default value of 0. -* `textStyle`: The text style of indicator [TextStyle](#TextStyle). - -## `TextLimit` - -Text character limitation and adaptation component. When the length of the text exceeds the set length, it is cropped and suffixes are appended to the end. Only valid in the category axis. - -* `enable`: Whether to enable text limit. [default: `true`]. -* `maxWidth`: Set the maximum width. A default of 0 indicates automatic fetch; otherwise, custom. Clipping occurs when the width of the text is greater than this value. [default: `0f`]. -* `gap`: White pixel distance at both ends. [default: `10f`]. -* `suffix`: Suffixes when the length exceeds. [default: `"..."`]. - -## `TextStyle` - -The component of settings related to text. - -* `rotate`: rotate of text. [default: `0f`]. -* `offset`: offset of text position. [default: `Vector2.zero`]. -* `color`: color of text. [default: `Color.clear`]. -* `backgroundColor`: color of text background. [default: `Color.clear`]. -* `font`: the font of text. When `null`, the theme's font is used by default. [default: `null`]. -* `fontSize`: the size of text. [default: `18`]. -* `fontStyle`: the font style of text. [default: `FontStyle.Normal`]. -* `lineSpacing`: the gap of text line. [default: `1f`]. -* `autoWrap`: Whether to wrap lines. -* `autoAlign`: Whether to let the system automatically set alignment. If true, the system automatically selects alignment, and if false, use alignment. - -## `Tooltip` - -Tooltip component. - -* `show`: Whether to show the tooltip component. -* `type`: Indicator type. Indicator types are: - * `Line`: line indicator. - * `Shadow`: shadow crosshair indicator. - * `None`: no indicator displayed. - * `Corss`: crosshair indicator, which is actually the shortcut of enable two axisPointers of two orthometric axes. -* `formatter`: A string template formatter for the total content of the prompt box. Support for wrapping lines with `\n`. When formatter is not null, use formatter first, otherwise use itemFormatter. - * Template variables are `{.}`, `{a}`, `{b}`, `{c}`, `{d}`. - * `{.}` is the dot of the corresponding color of `serie` that is currently indicated or whose `index` is `0`.` - * `{a}` is the `name` of the `serie` that is currently indicated or whose `index` is `0`. - * `{b}` is the `name` of the `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 the `serie` that is currently indicated or whose `index` is `0`. - * `{d}` is the percentage value of Y-dimensions (`dimesion` is 1) from the `serie` that is currently indicated or whose `index` is `0`, with no `%` sign. - * `{b}` is the `name` of the `serieData` that is currently indicated or whose `index` is `0`. - * `{.1}` represents a dot from serie corresponding color that specifies `index` as `1`. - * `1` in `{a1}`, `{b1}`, `{c1}` represents a `serie` that specifies an `index` of `1`. - * `{c1:2}` represents the third data from `serie`'s current indication data item indexed to `1` (a data item has multiple data, `index` 2 represents the third data). - * `{c1:2-2}` represents the third data item from `serie`'s third data item indexed to `1` (i.e., which data item must be specified to specify). - * `{d1:2: F2}` indicates that a formatted string with a value specified separately is `F2` (`numericFormatter` is used when not specified). - * Example: `"{a}, {c}"`, `"{a1}, {c1: f1}"`, `"{a1}, {c1:0: f1}"`, `"{a1} : {c1:1-1: f1}"` -* `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`. -* `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`: Fixed width. Higher priority than `minWidth`. -* `fixedHeight`: Fixed height. Higher priority than `minHeight`. -* `minWidth`: Minimum width. If `fixedWidth` has a value, get `fixedWidth` first. -* `minHeight`: Minimum height. If `fixedHeight` has a value, get `fixedHeight` first. -* `paddingLeftRight`: the text padding of left and right. [defaut: `5f`]. -* `paddingTopBottom`: the text padding of top and bottom. [defaut: `5f`]. -* `backgroundImage`: The image of icon. -* `ignoreDataShow`: Whether to show ignored data on tooltip. [defaut: `false`]. -* `ignoreDataDefaultContent`: The default display character information for ignored data. -* `alwayShow`: Whether to trigger after always display. -* `offset`: `(since v1.5.3)`The position offset of tooltip relative to the mouse position. -* `lineStyle`: the line style of indicator line [LineStyle](#LineStyle). -* `textStyle`: the text style of content [TextStyle](#TextStyle). - -## `Vessel` - -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`] -* `shapeWidth`: Thickness of vessel. [defaut: `5f`] -* `gap`: The gap between the vessel and the liquid. [defaut: `10f`] -* `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]`] -* `radius`: The radius of vessel. When value between 0 and 1 represents a percentage relative to the chart. [default: `0.35f`] -* `smoothness`: The smoothness of wave. [default: `1f`] -* `backgroundColor`: Background color of polar, which is transparent by default. [default: `Color.clear`] -* `color`: Vessel color. The default is consistent with Serie. [default: `Color32(70, 70, 240, 255)`] -* `autoColor`: Whether automatic color. If true, the color matches serie. [default: `true`] -* `width`:The width of vessel. This value is valid when `shape` is `Rect`. -* `height`:The height of vessel. This value is valid when `shape` is `Rect`. -* `cornerRadius`: The radius of rounded corner. This value is valid when `shape` is `Rect`. - -## `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. -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). -* `supportSlider`: Whether a slider is supported. There are separate sliders on which the user zooms or roams. -* ~~`filterMode`: The mode of data filter, not support yet.~~ - * ~~`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.~~ - * ~~`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.~~ - * ~~`Empty`: data that outside the window will be set to NaN, which will not lead to changes of windows of other axes.~~ - * ~~`None`: Do not filter data.~~ -* ~~`xAxisIndex`: Specify which xAxis is controlled by the dataZoom.~~ -* ~~`yAxisIndex`: Specify which yAxis is controlled by the dataZoom.~~ -* `showDataShadow`: Whether to show data shadow, to indicate the data tendency in brief. [default: `true`] -* `showDetail`: Whether to show detail, that is, show the detailed data information when dragging. [default: `false`] -* `zoomLock`: Specify whether to lock the size of window (selected area). [default: `false`] -* ~~`realtime`: Whether to show data shadow in dataZoom-silder component, to indicate the data tendency in brief. [default: `true`]~~ -* `backgroundColor`: The background color of the component. -* `selectedAreaColor`: The color of the selected area. -* `bottom`: Distance between dataZoom component and the bottom side of the container. [default: `10f`] -* `top`: Distance between dataZoom component and the top side of the container. [default: `0`] -* `left`: Distance between dataZoom component and the left side of the container. [default: `0`] -* `right`: Distance between dataZoom component and the right side of the container. [default: `0`] -* `height`: The height of dataZoom component. height value is a instant pixel value like 10. [default: `50f`] -* `rangeMode`: Use absolute value or percent value in `DataZoom.start` and `DataZoom.end`. [default: `RangeMode.Percent`]. - * `Percent`: percent. -* `start`: The start percentage of the window out of the data extent, in the range of `0 ~ 100`. [default: `30f`] -* `end`: The end percentage of the window out of the data extent, in the range of 0 ~ 100. [default: `70f`] -* `scrollSensitivity`: The sensitivity of dataZoom scroll. The larger the number, the more sensitive it is. [default: `10f`] -* `textStyle`: style of datazoom label. -* `minShowNum`: Minimum number of display data. Minimum number of data displayed when DataZoom is enlarged to maximum. [default: `1`] - -## `VisualMap` - -VisualMap component. mapping data to visual elements such as colors. - -* `enable`: Whether enable visualMap component. [default: 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`: the type of visualmap component. - * `Continuous`: Continuous. - * ~~`Piecewise`: Piecewise.~~ -* ~~`selectedMode`: the selected mode for Piecewise visualMap.~~ - * ~~`Multiple`: Multiple.~~ - * ~~`Single`: Single.~~ - -* `autoMinMax`: Automatically set min, Max value. -* `min`: The minimum allowed. `min` must be user specified. `[min, max]` forms the domain of the visualMap. -* `max`: The maximum allowed. `max` must be user specified. `[min, max]` forms the domain of the visualMap. -* `range`: Specifies the position of the numeric value corresponding to the handle. Range should be within the range of [min,max]. -* ~~`text`: Text on both ends. such as [`High`, `Low`].~~ -* ~~`textGap`: The distance between the two text bodies.~~ -* `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`: Whether the handle used for dragging is displayed (the handle can be dragged to adjust the selected range). -* ~~`realtime`: Whether to update in real time while dragging.~~ -* `itemWidth`: The width of the figure, that is, the width of the color bar. -* `itemHeight`: The height of the figure, that is, the height of the color bar. -* `borderWidth`: 边框线宽,单位px。 -* `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`: 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`: Is the layout horizontal or vertical. -* `location`: The location of component. -* `inRange`: Defines the visual color in the selected range. -* ~~`outOfRange`: Defines a visual color outside of the selected range.~~ - -## `Grid` - -Grid component. Drawing grid in rectangular coordinate. In a single grid, at most two X and Y axes each is allowed. Line chart, bar chart, and scatter chart can be drawn in grid. There is only one single grid component at most in a single echarts instance. - -* `show`: Whether to show the grid in rectangular coordinate. -* `left`: Distance between grid component and the left side of the container. -* `right`: Distance between grid component and the right side of the container. -* `top`: Distance between grid component and the top side of the container. -* `bottom`: Distance between grid component and the bottom side of the container. -* `backgroundColor`: Background color of grid, which is transparent by default. - -## `GaugeAxis` - -GaugeAxis sub component. Settings related to gauge axis line. - -* `axisLine`: axis line style. -* `splitLine`: slit line style. -* `axisTick`: axis tick style. -* `axisLabel`: axis label style. -* `axisLabelText`: Coordinate axis scale label custom content. When the content is empty, `axisLabel` automatically displays the content according to the scale; otherwise, the content is taken from the list definition. - -## `GaugePointer` - -GaugePointer sub component. Settings related to gauge pointer. - -* `show`: Whether to display a pointer. -* `width`: Pointer width. -* `length`: Pointer length. It can be an absolute value, or it can be a percentage relative to the radius (0-1). - -## `XAxis` - -The x axis in cartesian(rectangular) coordinate. a grid component can place at most 2 x axis, one on the bottom and another on the top. - -* `show`: Whether to show axis. By default `xAxes[0]` is `true` and `xAxes[1]` is `false`. -* `gridIndex`: The index of the grid on which the axis are located, by default, is in the first grid. -* `type`: the type of axis. The default is `Category`. - * `Value`: Numerical axis for continuous data. - * `Category`: Category axis, applicable to discrete category data, category data must be set through `data` for this type. - * `Log`: Log axis, it applies to logarithmic data. -* `position`: the position of axis in grid. - * `Left`: left of grid. - * `Right`: right of grid. - * `Bottom`: bottom of grid. - * `Top`: top of grid. -* `offset`: the offset of axis from the default position. Useful when the same position has multiple axes. -* `logBaseE`: On the log axis, if base e is the natural number, and is true, logBase fails. -* `logBase`: Base of logarithm, which is valid only for numeric axes with type: `Log`. -* `minMaxType`: the type of axis minmax.The default is `Default`. - * `Default`: 0 - max. - * `MinMax`: min - max. - * `Custom`: Custom min - max. -* `min`: The minimun value of axis. Valid when `minMaxType` is `Custom`. -* `max`: The maximum value of axis. Valid when `minMaxType` is `Custom`. -* `ceilRate`: The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated. -* `splitNumber`: Number of segments that the axis is split into. The default is `5`, When `splitNumber` is set to `0`, it draws all the category data. -* `interval`: Compulsively set segmentation interval for axis.This is unavailable for category axis. The `splitNumber` is invalid when set. -* `boundaryGap`: The boundary gap on both sides of a coordinate axis. -* `maxCache`: The max number of axis data cache. The first data will be remove when the size of axis data is larger then `maxCache`. -* `inverse`: Whether the axis are reversed or not. Invalid in `Category` axis. -* `insertDataToHead`: Whether to add new data at the head or at the end of the list. -* `data`: Category data, valid in the `Category` axis. -* `icons`: icon list. -* `axisLine`: the style of axis line [AxisLine](#AxisLine). -* `axisName`: the style of axis name [AxisName](#AxisName). -* `axisTick`: the style of axis tick [AxisTick](#AxisTick). -* `axisLabel`: the style of axis label [AxisLabel](#AxisLabel). -* `splitLine`: the style of axis split line [AxisSplitLine](#SplitLine). -* `splitArea`: the style of axis split area [AxisSplitArea](#AxisSplitArea). -* `iconStyle`: the style of the axis scale icon [IconStyle](#IconStyle). - -## `Background` - -Background component.Due to the limitations of the framework, there are two limitations to the use of background component: -1: The parent node of chart cannot have a layout control class component. -2: The parent node of Chart can only have one child node of the current chart. - -* `show`: Whether to enable the background component. However, the ability to activate the background component is subject to other conditions. -* `image`: the image of background. -* `imageType`: the fill type of background image. -* `imageColor`: the color of background image, The default is `white`. -* `hideThemeBackgroundColor`: Whether to hide the background color set in the `theme` when the background component is on. - -## `YAxis` - -The y axis in cartesian(rectangular) coordinate. a grid component can place at most 2 y axis, one on the left and another on the right. - -The parameters are the same as XAxis. - -## `Series` - -Serie list. Each serie determines its own chart type by `type`. - -Check each serie for parameters. - -## `Serie-Line` - -Line chart serie. - -* `show`: Whether to show serie in chart. -* `type`: `Line`. -* `name`: Series name used for displaying in tooltip and filtering with legend. -* `stack`: If stack the value. On the same category axis, the series with the same stack name would be put on top of each other. -* `xAxisIndex`: Index of x axis to combine with, which is useful for multiple axes in one chart. -* `yAxisIndex`: Index of y axis to combine with, which is useful for multiple axes in one chart. -* `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. The first data will be remove when the size of serie data is larger then maxCache. -* `sampleDist`: The minimum horizontal pixel distance of sampling, which defaults to `0` without sampling. When the horizontal pixel distance between two data points is less than this value, start sampling to ensure that the horizontal pixel distance between two points is not less than this value. -* `sampleType`: Sample type. This is valid when `sampleDist` is greater than `0`. The following five sampling types are supported: - * `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`: Set the sampling average. When `sampleType` is `Peak`, is the maximum or minimum value used to compare the average value of the filtered data. The default of `0` is to calculate the average of all data in real time. -* `clip`: 是否裁剪超出坐标系部分的图形。 -* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。 -* `ignoreValue`: 忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。 -* `showAsPositiveNumber`: 将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。 -* `large`: 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点: 优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。 -* `largeThreshold`: 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 -* `areaStyle`: 区域填充样式 [AreaStyle](#AreaStyle)。 -* `symbol`: 标记的图形 [SerieSymbol](#SerieSymbol)。 -* `lineType`: 折线图样式类型。支持以下十种类型: - * `Normal`: 普通折线图。 - * `Smooth`: 平滑曲线。 - * `SmoothDash`: 平滑虚线。 - * `StepStart`: 阶梯线图: 当前点。 - * `StepMiddle`: 阶梯线图: 当前点和下一个点的中间。 - * `StepEnd`: 阶梯线图: 下一个拐点。 - * `Dash`: 虚线。 - * `Dot`: 点线。 - * `DashDot`: 点划线。 - * `DashDotDot`: 双点划线。 -* `lineStyle`: 线条样式 [LineStyle](#LineStyle)。 -* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。 -* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。 -* `lineArrow`: 折线图的箭头 [LineArrow](#LineArrow)。 -* `insertDataToHead`: Whether to add new data at the head or at the end of the list. -* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Bar` - -折线图系列。 - -* `show`: 系列是否显示在图表上。 -* `type`: `Bar`。 -* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `stack`: 数据堆叠。同个类目轴上系列配置相同的 `stack` 值后,后一个系列的值会在前一个系列的值上相加。 -* `xAxisIndex`: Index of x axis to combine with, which is useful for multiple axes in one chart. -* `yAxisIndex`: Index of y axis to combine with, which is useful for multiple axes in one chart. -* `minShow`: 系列显示数据的最小索引。 -* `maxShow`: 系列显示数据的最大索引。 -* `maxCache`: 系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。 -* `barType`: 柱状图类型。以下几种类型: - * `Normal`: 普通柱状图。 - * `Zebra`: 斑马柱状图。 - * `Capsule`: 胶囊柱状图。 -* `barPercentStack`: 是否百分比堆叠柱状图,相同 `stack` 的 `serie` 只要有一个 `barPercentStack` 为 `true`,则就显示成百分比堆叠柱状图。 -* `barWidth`: 柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 -* `barGap`: 不同系列的柱间距离。为百分比(如 `'0.3f'`,表示柱子宽度的 `30%`)。如果想要两个系列的柱子重叠,可以设置 `barGap` 为 `'-1f'`。这在用柱子做背景的时候有用。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。 -* `barCategoryGap`: 同一系列的柱间距离,默认为类目间距的20%,可设固定值。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。 -* `barZebraWidth`: 斑马线的粗细。`barType` 为 `Zebra` 时有效。 -* `barZebraGap`: 斑马线的间距。`barType` 为 `Zebra` 时有效。 -* `clip`: 是否裁剪超出坐标系部分的图形。 -* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。 -* `ignoreValue`: 忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。 -* `showAsPositiveNumber`: 将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。 -* `large`: 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点: 优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。 -* `largeThreshold`: 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 -* `symbol`: 标记的图形 [SerieSymbol](#SerieSymbol)。 -* `itemStyle`: 柱条样式 [ItemStyle](#ItemStyle)。 -* `areaStyle`: 区域填充样式 [AreaStyle](#AreaStyle)。 -* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。 -* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Pie` - -饼图系列。 - -* `show`: 系列是否显示在图表上。 -* `type`: `Pie`。 -* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `pieRoseType`: 南丁格尔玫瑰图类型,支持以下类型: - * `None`: 不展示成南丁格尔玫瑰图。 - * `Radius`: 扇区圆心角展现数据的百分比,半径展现数据的大小。 - * `Area`: 所有扇区圆心角相同,仅通过半径展现数据大小。 -* `gap`: 扇区间隙。 -* `center`: 中心点坐标。当值为`0-1`的浮点数时表示百分比。 -* `radius`: 半径。`radius[0]`为内径,`radius[1]`为外径。当内径大于0时即为圆环图。 -* `minAngle`: The minimum angle of sector(0-360). It prevents some sector from being too small when value is small. -* `roundCap`: 是否启用圆弧效果。 -* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制,对应的`Label`和`Legend`也不会显示。 -* `ignoreValue`: 忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。 -* `avoidLabelOverlap`: 在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。 -* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。 -* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Radar` - -雷达图系列。 - -* `show`: 系列是否显示在图表上。 -* `type`: `Radar`。 -* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `radarType`: 雷达图类型`RadarType`,支持以下类型: - * `Multiple`: 多圈雷达图。此时可一个雷达里绘制多个圈,一个`serieData`就可组成一个圈(多维数据)。 - * `Single`: 单圈雷达图。此时一个雷达只能绘制一个圈,多个`serieData`组成一个圈,数据取自`data[1]`。 -* `radarIndex`: 雷达图所使用的 `radar` 组件的 `index`。 -* `symbol`: 标记的图形 [SerieSymbol](#SerieSymbol)。 -* `lineStyle`: 线条样式 [LineStyle](#LineStyle)。 -* `itemStyle`: 标记样式 [ItemStyle](#ItemStyle)。 -* `areaStyle`: 区域填充样式 [AreaStyle](#AreaStyle)。 -* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Scatter` - -散点图系列。 - -* `show`: 系列是否显示在图表上。 -* `type`: `Scatter`。 -* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `clip`: 是否裁剪超出坐标系部分的图形。 -* `symbol`: 标记的图形 [SerieSymbol](#SerieSymbol)。 -* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。 -* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Heatmap` - -热力图系列。 - -* `show`: 系列是否显示在图表上。 -* `type`: `Scatter`。 -* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。 -* `ignoreValue`: 忽略数据的默认值。默认值默认为`0`,当 `ignore` 为 `true` 才有效。 -* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。 -* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。 - -## `Serie-Gauge` - -仪表盘系列。 - -* `show`: 系列是否显示在图表上。 -* `type`: `Gauge`。 -* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `gaugeType`: 仪表盘类型,支持以下类型: - * `Pointer`: 指针类型。 - * `ProgressBar`: 进度条类型。 -* `center`: 中心点坐标。当值为0-1的浮点数时表示百分比。 -* `radius`: 仪表盘半径。 -* `min`: 最小的数据值。映射到`startAngle`。 -* `max`: 最大的数据值。映射到`endAngle`。 -* `startAngle`: 仪表盘起始角度。和时钟一样,`12`点钟位置是`0`度,顺时针到`360`度。 -* `endAngle`: 仪表盘结束角度。和时钟一样,`12`点钟位置是`0`度,顺时针到`360`度。 -* `splitNumber`: 仪表盘刻度分割段数。 -* `roundCap`: 是否启用圆弧效果。 -* `titleStyle`: 仪表盘标题 [TitleStyle](#TitleStyle)。 -* `gaugeAxis`: 仪表盘坐标轴 [GaugeAxis](#GaugeAxis)。 -* `gaugePointer`: 仪表盘指针 [GaugePointer](#GaugePointer)。 -* `itemStyle`: 仪表盘指针样式 [ItemStyle](#ItemStyle)。 -* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。 -* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。仪表盘的数据一般只有一个,值通过`label`样式显示,`name`通过`titleStyle`样式显示。 - -## `Serie-Ring` - -环形图系列。 - -* `show`: 系列是否显示在图表上。 -* `type`: `Ring`。 -* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `center`: 中心点坐标。当值为`0-1`的浮点数时表示百分比。 -* `radius`: 仪表盘半径。 -* `startAngle`: 仪表盘起始角度。和时钟一样,`12`点钟位置是`0`度,顺时针到`360`度。 -* `ringGap`: 环形图的环间隙。 -* `roundCap`: 是否启用圆弧效果。 -* `clockwise`: 是否顺时针,默认为`true`。 -* `titleStyle`: 环形图中心标题 [TitleStyle](#TitleStyle)。 -* `itemStyle`: 环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。 -* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。 -* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。环形图的数据只有二维,`data[0]`表示当前值,`data[1]`表示最大值。 - -## `Serie-Liquid` - -水位图系列。 - -* `show`: 系列是否显示在图表上。 -* `type`: `Liquid`。 -* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `vesselIndex`: 水位图所使用的`vessel`组件的`index`。 -* `min`: 最小值。 -* `max`: 最大值。 -* `waveLength`: 水波长。 -* `waveHeight`: 水波高。 -* `waveSpeed`: 水波移动速度。正数时左移,负数时右移。 -* `waveOffset`: 水波偏移。 -* `itemStyle`: 环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。 -* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。 -* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。水位图的数据一般只有一个,表示当前水位值,用`max`设置最大水位值。 - -## `Serie-Candlestick` - -K线图系列。 - -* `show`:系列是否显示在图表上。 -* `type`:`Candlestick`。 -* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。 -* `xAxisIndex`:使用的坐标轴X轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。 -* `yAxisIndex`:使用的坐标轴Y轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。 -* `minShow`:系列显示数据的最小索引。 -* `maxShow`:系列显示数据的最大索引。 -* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。 -* `clip`:是否裁剪超出坐标系部分的图形。 -* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。 -* `ignoreValue`:忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。 -* `showAsPositiveNumber`:将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。 -* `large`:是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点:优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。 -* `largeThreshold`:开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 -* `itemStyle`:环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。 -* `emphasis`:高亮样式 [Emphasis](#Emphasis)。 -* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。 -* `data`:系列中的数据项 [SerieData](#SerieData) 数组,K线图至少需要4个维度的数组`[open, close, lowest, highest]`。 - -## `Settings` - -全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。 - -* `reversePainter`:Painter是否逆序。逆序时index大的serie最先绘制。 -* `maxPainter`:默认最大Painter数据,当Serie数量大于maxPainter时会平均分配Painter。 -* `basePainterMaterial`:Base Pointer 材质球,设置后会影响Axis等。 -* `seriePainterMaterial`:Serie Pointer 材质球,设置后会影响所有Serie。 -* `topPainterMaterial`:Top Pointer 材质球,设置后会影响Tooltip等。 -* `lineSmoothStyle`: 曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。 -* `lineSmoothness`: 曲线平滑度。值越小曲线越平滑,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。 -* `lineSegmentDistance`: 线段的分割距离。普通折线图的线是由很多线段组成,段数由该数值决定。值越小段数越多,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。 -* `cicleSmoothness`: 圆形(包括扇形、环形等)的平滑度。数越小圆越平滑,但顶点数也会随之增加。 - -## `SerieAnimation` - -* `enable`: 是否开启动画系统。 -* ~~`threshold`: 是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。~~ -* `fadeInDelay`: 设定的渐入动画延时,单位毫秒。如果要设置单个数据项的延时,可以用代码定制: `customFadeInDelay`。 -* `fadeInDuration`: 设定的渐入动画时长,单位毫秒。如果要设置单个数据项的渐入时长,可以用代码定制: `customFadeInDuration`。 -* `fadeOutDelay`: 设定的渐出动画延时,单位毫秒。如果要设置单个数据项的延时,可以用代码定制: `customFadeOutDelay`。 -* `fadeOutDuration`: 设定的渐出动画时长,单位毫秒。如果要设置单个数据项的渐出时长,可以用代码定制: `customFadeOutDuration`。 -* `dataChangeEnable`: 是否开启数据变更动画。 -* `dataChangeDuration`: 数据变更动画时长,单位毫秒。 - -## `AreaStyle` - -* `show`: 是否显示区域填充。 -* `origin`: 区域填充的起始位置 `AreaOrigin`。有以下三种填充方式: - * `Auto`: 填充坐标轴轴线到数据间的区域。 - * `Start`: 填充坐标轴底部到数据间的区域。 - * `End`: 填充坐标轴顶部到数据间的区域。 -* `color`: 区域填充的颜色,默认取 `serie` 对应的颜色。如果 `toColor` 不是默认值,则表示渐变色的起点颜色。 -* `toColor`: 区域填充的渐变色的终点颜色。 -* `highlightColor`: 高亮时区域填充的颜色,默认取 `serie` 对应的颜色。如果 `highlightToColor` 不是默认值,则表示渐变色的起点颜色。 -* `highlightToColor`: 高亮时区域填充的渐变色的终点颜色。 -* `opacity`: 图形透明度。支持从 `0` 到 `1` 的数字,为 `0` 时不绘制该图形。 -* `tooltipHighlight`: 鼠标悬浮时是否高亮之前的区域。 - -## `AxisLabel` - -* `show`: 是否显示刻度标签。 -* `interval`: 坐标轴刻度标签的显示间隔,在类目轴中有效。`0`表示显示所有标签,`1`表示隔一个隔显示一个标签,以此类推。 -* `inside`: 刻度标签是否朝内,默认朝外。 -* `margin`: 刻度标签与轴线之间的距离。 -* `formatter`: 图例内容字符串模版格式器。支持用 `\n` 换行。模板变量为图例名称 `{value}`,数值格式化通过`numericFormatter`。 -* `numericFormatter`: 标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式: `A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。 -* `showAsPositiveNumber`: 将负数数值显示为正数。一般和`Serie`的`showAsPositiveNumber`配合使用。 -* `onZero`: 刻度标签显示在`0`刻度上。 -* `width`:刻度标签的宽。当为0时系统自动设置。 -* `height`:刻度标签的高。当为0时系统自动设置。 - -* `textLimit`: 文本自适应 [TextLimit](#TextLimit)。只在类目轴中有效。 -* `textStyle`: The style of text [TextStyle](#TextStyle). - -## `AxisLine` - -* `show`: 是否显示坐标轴轴线。 -* `onZero`: `X` 轴或者 `Y` 轴的轴线是否在另一个轴的 `0` 刻度上,只有在另一个轴为数值轴且包含 `0` 刻度时有效。 -* `width`: 坐标轴线线宽。 -* `symbol`: 是否显示箭头。 -* `symbolWidth`: 箭头宽。 -* `symbolHeight`: 箭头高。 -* `symbolOffset`: 箭头偏移。 -* `symbolDent`: 箭头的凹陷程度。 - -## `AxisName` - -* `show`: 是否显示坐标名称。 -* `name`: 坐标轴名称。 -* `location`: 坐标轴名称的位置。支持以下类型: - * `Start`: 坐标轴起始处。 - * `Middle`: 坐标轴中间。 - * `End`: 坐标轴末端。 -* `textStyle`: The style of text [TextStyle](#TextStyle). - -## `AxisSplitLine` - -* `show`: 是否显示坐标分割线。 -* `interval`: 分割线的显示间隔。`0` 表示显示所有分割线,`1` 表示隔一个隔显示一个分割线,以此类推。 -* `lineStyle`: 线条样式 [LineStyle](#LineStyle)。 - -## `AxisSplitArea` - -* `show`: 是否显示坐标分割区域。 -* `color`: 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。 - -## `AxisTick` - -* `show`: 是否显示坐标轴刻度。 -* `alignWithLabel`: 类目轴中在 `boundaryGap` 为 `true` 的时候有效,可以保证刻度线和标签对齐。 -* `inside`: 坐标轴刻度是否朝内,默认朝外。 -* `length`: 坐标轴刻度的长度。 -* `width`: 坐标轴刻度的宽度。默认为0时宽度和坐标轴一致。 -* `showStartTick`:是否显示第一个刻度。 -* `showEndTick`:是否显示最后一个刻度。 - -## `Emphasis` - -* `show`: 是否启用高亮样式。 -* `label`: 图形文本标签样式 [SerieLabel](#SerieLabel)。 -* `itemStyle`: 图形样式 [ItemStyle](#ItemStyle)。 - -## `ItemStyle` - -* `show`: 是否启用。 -* `color`: 颜色。对于K线图,对应阳线的颜色。 -* `color0`: 颜色。对于K线图,对应阴线的颜色。 -* `toColor`: 渐变颜色1。 -* `toColor2`: 渐变颜色2。只在折线图中有效。 -* `backgroundColor`: 背景颜色。 -* `backgroundWidth`: 背景的宽。 -* `centerColor`: 中心区域的颜色。如环形图的中心区域。 -* `centerGap`: 中心区域的间隙。如环形图的中心区域于最内环的间隙。 -* `borderType`: 边框的类型。 -* `borderColor`: 边框的颜色。对于K线图,对应阳线的边框颜色。 -* `borderColor0`: 边框的颜色。对于K线图,对应阴线的边框颜色。 -* `borderWidth`: 边框宽。 -* `opacity`: 透明度。 -* `tooltipFormatter`: 提示框单项的字符串模版格式器。具体配置参考`Tooltip`的`formatter`。 -* `numericFormatter`: 标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式: `A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。此字段优先于`SerieLabel`和`Tooltip`的`numericFormatter`。 -* `cornerRadius`: 圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。支持用0-1的浮点数设置百分比。 - -## `LineArrow` - -* `show`: 是否显示箭头。 -* `position`: 箭头显示位置。支持以下两种位置: - * `End`: 末端显示。最后一个数据上显示箭头。 - * `Start`: 起始端显示。第一个数据上显示箭头。 -* `width`: 箭头宽。 -* `height`: 箭头长。 -* `offset`: 箭头偏移。默认箭头的中心点和数据坐标点一致,可通过 `offset` 调整偏移。 -* `dent`: 箭头的凹度。 - -## `LineStyle` - -* `show`: 是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。 -* `type`: 线条类型。支持以下五种类型: - * `None`: 不显示分割线。 - * `Solid`: 实线。 - * `Dashed`: 虚线。 - * `Dotted`: 点线。 - * `DashDot`: 点划线。 - * `DashDotDot`: 双点划线。 -* `color`: 线条颜色。默认和 `serie` 一致。 -* `toColor`: 线的渐变颜色(需要水平方向渐变时)。 -* `toColor2`: 线的渐变颜色2(需要水平方向三个渐变色的渐变时)。 -* `width`: 线条宽。 -* `opacity`: 线条的透明度。支持从 `0` 到 `1` 的数字,为 `0` 时不绘制该图形。 - -## `Location` - -* `align`: 对齐方式。有以下对齐方式。 - * `TopLeft`: 左上角对齐。 - * `TopRight`: 右上角对齐。 - * `TopCenter`: 置顶居中对齐。 - * `BottomLeft`: 左下对齐。 - * `BottomRight`: 右下对齐。 - * `BottomCenter`: 底部居中对齐。 - * `Center`: 居中对齐。 - * `CenterLeft`: 中部靠左对齐。 - * `CenterRight`: 中部靠右对齐。 -* `left`: 离容器左侧的距离。 -* `right`: 离容器右侧的距离。 -* `top`: 离容器上侧的距离。 -* `bottom`: 离容器下侧的距离。 - -## `MarkLine` - -* `show`:是否显示标线。 -* `animation`:标线的动画样式。 -* `data`:标线的数据项[MarkLineData](#MarkLineData)列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。 - -## `MarkLineData` - -* `name`:标注名称,将会作为文字显示。label的formatter可通过{b}显示名称,通过{c}显示数值。 -* `type`:特殊的标注类型,用于标注最大值最小值等。。有以下标注类型: - * `None`:无类型。此时通过 - * `Min`:最小值。`dimension`维度上数据的最小值。 - * `Max`:最大值。`dimension`维度上数据的最大值。 - * `Average`:平均值。`dimension`维度上数据的平均值。 - * `Median`:中位数。`dimension`维度上数据的中位数。 -* `dimension`:当type为特殊类型时,指示从哪个维度的数据上计算特殊值。 -* `xPosition`:相对原点的 x 坐标,单位像素。当type为None时有效。 -* `yPosition`:相对原点的 y 坐标,单位像素。当type为None时有效。 -* `xValue`:X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 -* `yValue`:Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 - -## `SerieData` - -* `name`: 数据项名称。 -* `selected`: 该数据项是否被选中。 -* `radius`: 自定义半径。可用在饼图中自定义某个数据项的半径。 -* `enableIconStyle`: 是否启用单个数据项的图标设置。 -* `iconStyle`: 数据项图标样式。 -* `enableLabel`: 是否启用单个数据项的标签设置。 -* `label`: 单个数据项的标签设置。 -* `enableItemStyle`: 是否启用单个数据项的样式。 -* `itemStyle`: 单个数据项的样式设置。 -* `enableEmphasis`: 是否启用单个数据项的高亮样式。 -* `emphasis`: 单个数据项的高亮样式设置。 -* `enableSymbol`: 是否启用单个数据项的标记设置。 -* `symbol`: 单个数据项的标记设置。 -* `data`: 可指定任意维数的数值列表。对于折线图和柱状图,`data`其实是`size`为`2`的数组,`data[0]`是x的编号,`data[1]`是`y`的数值,默认显示`data[1]`。其他图表看需求而定是长度大于`2`的数组。可通过`Serie`的`showDataDimension`指定数据长度。 - -## `SerieLabel` - -* `show`: 是否显示文本标签。 -* `position`: 标签的位置。折线图时强制默认为 `Center`,支持以下 `5` 种位置: - * `Outside`: 饼图扇区外侧,通过视觉引导线连到相应的扇区。只在饼图种可用。 - * `Inside`: 饼图扇区内部。只在饼图可用。 - * `Center`: 在中心位置(折线图,柱状图,饼图)。 - * `Top`: 顶部(柱状图)。 - * `Bottom`: 底部(柱状图)。 -* `formatter`: 标签内容字符串模版格式器。支持用 `\n` 换行。模板变量有: `{a}`: 系列名;`{b}`: 数据名;`{c}`: 数据值;`{d}`: 百分比。示例: `{b}:{c}`。 -* `numericFormatter`: 标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式: `A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。 -* `offset`: 距离图形元素的偏移。 -* `autoOffset`: 是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 -* `backgroundWidth`: 标签的背景宽度。一般不用指定,不指定时则自动是文字的宽度。 -* `backgroundHeight`: 标签的背景高度。一般不用指定,不指定时则自动是文字的高度。 -* `paddingLeftRight`: 标签文字和边框的左右边距。 -* `paddingTopBottom`: 标签文字和边框的上下边距。 -* `line`: 是否显示视觉引导线。在 `label` 位置 设置为 `'Outside'` 的时候会显示视觉引导线。 -* `lineType`: 视觉引导线类型。支持以下几种类型: - * `BrokenLine`: 折线。 - * `Curves`: 曲线。 - * `HorizontalLine`: 水平线。 -* `lineColor`: 视觉引导线自定义颜色。 -* `lineWidth`: 视觉引导线的宽度。 -* `lineLength1`: 视觉引导线第一段的长度。 -* `lineLength2`: 视觉引导线第二段的长度。 -* `border`: 是否显示边框。 -* `borderWidth`: 边框宽度。 -* `borderColor`: 边框颜色。 -* `textStyle`: The style of text [TextStyle](#TextStyle). - -## `SerieSymbol` - -* `show`: 是否显示标记。 -* `type`: 标记类型。支持以下六种类型: - * `EmptyCircle`: 空心圆。 - * `Circle`: 实心圆。 - * `Rect`: 正方形。可通过设置`itemStyle`的`cornerRadius`变成圆角矩形。 - * `Triangle`: 三角形。 - * `Diamond`: 菱形。 - * `None`: 不显示标记。 -* `gap`: 图形标记的外留白距离。 -* `sizeType`: 标记图形的大小获取方式。支持以下三种类型: - * `Custom`: 自定义大小。 - * `FromData`: 通过 `dataIndex` 从数据中获取,再乘以一个比例系数 `dataScale` 。 - * `Callback`: 通过回调函数 `sizeCallback` 获取。 -* `size`: 标记的大小。 -* `selectedSize`: 被选中的标记的大小。 -* `dataIndex`: 当 `sizeType` 指定为 `FromData` 时,指定的数据源索引。 -* `dataScale`: 当 `sizeType` 指定为 `FromData` 时,指定的倍数系数。 -* `selectedDataScale`: 当 `sizeType` 指定为 `FromData` 时,指定的高亮倍数系数。 -* `sizeCallback`: 当 `sizeType` 指定为 `Callback` 时,指定的回调函数。 -* `selectedSizeCallback`: 当 `sizeType` 指定为 `Callback` 时,指定的高亮回调函数。 -* `color`: 标记图形的颜色,默认和系列一致。 -* `opacity`: 图形标记的透明度。 -* `startIndex`: 开始显示图形标记的索引。 -* `interval`: 显示图形标记的间隔。`0`表示显示所有标签,`1`表示隔一个隔显示一个标签,以此类推。 -* `forceShowLast`: 是否强制显示最后一个图形标记。默认为 `false`。 - -## `IconStyle` - -* `show` : whether to show the icon. -* `Layer` : Shows on top or bottom. -* `Sprite` : Icon. -* `color` : color. -* `width` : The width of the icon. -* `height` : the height of the icon. -* `Offset` : Offset. - -[返回首页](https://github.com/XCharts-Team/XCharts) -[XChartsAPI接口](XChartsAPI.md) -[XCharts问答](XCharts问答.md) diff --git a/README.md b/README.md index ef40ea1e..bdca98c8 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,12 @@ 一款基于`UGUI`的功能强大、易用、参数可配置的数据可视化图表插件。支持折线图、柱状图、饼图、雷达图、散点图、热力图、环形图、K线图、极坐标、平行坐标等十种常见免费内置图表,以及3D柱图、漏斗图、金字塔、仪表盘、水位图、象形柱图、甘特图、矩形树图等多种付费扩展图表。 +[XCharts教程](Documentation/XChartsTutorial01-ZH.md) +[XChartsAPI](Documentation/XChartsAPI-ZH.md) +[XCharts问答](Documentation/XChartsFQA-ZH.md) +[XCharts配置项手册](Documentation/XChartsConfiguration-ZH.md) +[XCharts更新日志](CHANGELOG.md) + ## 特性 * 参数可视化配置,效果实时预览,纯代码绘制,无需额外资源。 @@ -94,7 +100,7 @@ ## 使用 -[XCharts教程:5分钟上手教程](Documentation/XCharts教程:5分钟上手教程.md) +[XCharts教程:5分钟上手教程](Documentation/XChartsTutorial01-ZH.md) ## 日志 diff --git a/Runtime/Component/Axis/Axis.cs b/Runtime/Component/Axis/Axis.cs index 12f26fc4..aa1fef18 100644 --- a/Runtime/Component/Axis/Axis.cs +++ b/Runtime/Component/Axis/Axis.cs @@ -20,22 +20,22 @@ namespace XCharts.Runtime { /// <summary> /// Numerical axis, suitable for continuous data. - /// |数值轴。适用于连续数据。 + /// ||数值轴。适用于连续数据。 /// </summary> Value, /// <summary> /// Category axis, suitable for discrete category data. Data should only be set via data for this type. - /// |类目轴。适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。 + /// ||类目轴。适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。 /// </summary> Category, /// <summary> /// Log axis, suitable for log data. - /// 对数轴。适用于对数数据。 + /// |对数轴。适用于对数数据。 /// </summary> Log, /// <summary> /// Time axis, suitable for continuous time series data. - /// 时间轴。适用于连续的时序数据。 + /// |时间轴。适用于连续的时序数据。 /// </summary> Time } @@ -48,17 +48,17 @@ namespace XCharts.Runtime { /// <summary> /// 0 - maximum. - /// 0-最大值。 + /// |0-最大值。 /// </summary> Default, /// <summary> /// minimum - maximum. - /// 最小值-最大值。 + /// |最小值-最大值。 /// </summary> MinMax, /// <summary> /// Customize the minimum and maximum. - /// 自定义最小值最大值。 + /// |自定义最小值最大值。 /// </summary> Custom } diff --git a/Runtime/Component/Child/AreaStyle.cs b/Runtime/Component/Child/AreaStyle.cs index 16830e6c..e08eb5c7 100644 --- a/Runtime/Component/Child/AreaStyle.cs +++ b/Runtime/Component/Child/AreaStyle.cs @@ -19,17 +19,17 @@ namespace XCharts.Runtime { /// <summary> /// to fill between axis line to data. - /// 填充坐标轴轴线到数据间的区域。 + /// |填充坐标轴轴线到数据间的区域。 /// </summary> Auto, /// <summary> /// to fill between min axis value (when not inverse) to data. - /// 填充坐标轴底部到数据间的区域。 + /// |填充坐标轴底部到数据间的区域。 /// </summary> Start, /// <summary> /// to fill between max axis value (when not inverse) to data. - /// 填充坐标轴顶部到数据间的区域。 + /// |填充坐标轴顶部到数据间的区域。 /// </summary> End } diff --git a/Runtime/Component/Child/LabelStyle.cs b/Runtime/Component/Child/LabelStyle.cs index 191a09b9..4482ded1 100644 --- a/Runtime/Component/Child/LabelStyle.cs +++ b/Runtime/Component/Child/LabelStyle.cs @@ -19,52 +19,52 @@ namespace XCharts.Runtime { /// <summary> /// Outside of sectors of pie chart, which relates to corresponding sector through visual guide line. - /// 饼图扇区外侧,通过视觉引导线连到相应的扇区。 + /// |饼图扇区外侧,通过视觉引导线连到相应的扇区。 /// </summary> Outside, /// <summary> /// Inside the sectors of pie chart. - /// 饼图扇区内部。 + /// |饼图扇区内部。 /// </summary> Inside, /// <summary> /// In the center of pie chart. - /// 在饼图中心位置。 + /// |在饼图中心位置。 /// </summary> Center, /// <summary> /// top of symbol. - /// 图形标志的顶部。 + /// |图形标志的顶部。 /// </summary> Top, /// <summary> /// the bottom of symbol. - /// 图形标志的底部。 + /// |图形标志的底部。 /// </summary> Bottom, /// <summary> /// the left of symbol. - /// 图形标志的左边。 + /// |图形标志的左边。 /// </summary> Left, /// <summary> /// the right of symbol. - /// 图形标志的右边。 + /// |图形标志的右边。 /// </summary> Right, /// <summary> /// the start of line. - /// 线的起始点。 + /// |线的起始点。 /// </summary> Start, /// <summary> /// the middle of line. - /// 线的中点。 + /// |线的中点。 /// </summary> Middle, /// <summary> /// the end of line. - /// 线的结束点。 + /// |线的结束点。 /// </summary> End } diff --git a/Runtime/Component/DataZoom/DataZoom.cs b/Runtime/Component/DataZoom/DataZoom.cs index caf87977..495ac6ed 100644 --- a/Runtime/Component/DataZoom/DataZoom.cs +++ b/Runtime/Component/DataZoom/DataZoom.cs @@ -18,35 +18,31 @@ namespace XCharts.Runtime /// <summary> /// Generally dataZoom component zoom or roam coordinate system through data filtering /// and set the windows of axes internally. - /// |Its behaviours vary according to filtering mode settings. - /// | - /// dataZoom 的运行原理是通过 数据过滤 来达到 数据窗口缩放 的效果。数据过滤模式的设置不同,效果也不同。 + /// Its behaviours vary according to filtering mode settings. + /// |dataZoom 的运行原理是通过 数据过滤 来达到 数据窗口缩放 的效果。数据过滤模式的设置不同,效果也不同。 /// </summary> public enum FilterMode { /// <summary> /// 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. - /// - /// 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。 + /// |当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。 /// </summary> Filter, /// <summary> /// 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. - /// - /// 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。 + /// |当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。 /// </summary> WeakFilter, /// <summary> /// data that outside the window will be set to NaN, which will not lead to changes of windows of other axes. - /// - /// 当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。 + /// |当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。 /// </summary> Empty, /// <summary> /// Do not filter data. - /// 不过滤数据,只改变数轴范围。 + /// |不过滤数据,只改变数轴范围。 /// </summary> None } @@ -57,7 +53,8 @@ namespace XCharts.Runtime { //Value, /// <summary> - /// percent value. 百分比 + /// percent value. + /// |百分比。 /// </summary> Percent } @@ -137,8 +134,7 @@ namespace XCharts.Runtime /// 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> public bool supportInside { @@ -180,8 +176,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show data shadow, to indicate the data tendency in brief. - /// |default:true - /// 是否显示数据阴影。数据阴影可以简单地反应数据走势。 + /// |是否显示数据阴影。数据阴影可以简单地反应数据走势。 /// </summary> public bool showDataShadow { @@ -191,7 +186,6 @@ namespace XCharts.Runtime /// <summary> /// Whether to show detail, that is, show the detailed data information when dragging. /// |是否显示detail,即拖拽时候显示详细数值信息。 - /// [default: false] /// </summary> public bool showDetail { @@ -200,8 +194,7 @@ namespace XCharts.Runtime } /// <summary> /// Specify whether to lock the size of window (selected area). - /// |default:false - /// 是否锁定选择区域(或叫做数据窗口)的大小。 + /// |是否锁定选择区域(或叫做数据窗口)的大小。 /// 如果设置为 true 则锁定选择区域的大小,也就是说,只能平移,不能缩放。 /// </summary> public bool zoomLock @@ -211,8 +204,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show data shadow in dataZoom-silder component, to indicate the data tendency in brief. - /// |default:true - /// 拖动时,是否实时更新系列的视图。如果设置为 false,则只在拖拽结束的时候更新。默认为true,暂不支持修改。 + /// |拖动时,是否实时更新系列的视图。如果设置为 false,则只在拖拽结束的时候更新。默认为true,暂不支持修改。 /// </summary> public bool realtime { get { return true; } } /// <summary> @@ -253,9 +245,8 @@ namespace XCharts.Runtime } /// <summary> /// Distance between dataZoom component and the bottom side of the container. - /// |bottom value is a instant pixel value like 10 or float value [0-1]. - /// |default:10 - /// 组件离容器下侧的距离。 + /// bottom value is a instant pixel value like 10 or float value [0-1]. + /// |组件离容器下侧的距离。 /// </summary> public float bottom { @@ -264,9 +255,8 @@ namespace XCharts.Runtime } /// <summary> /// Distance between dataZoom component and the top side of the container. - /// |top value is a instant pixel value like 10 or float value [0-1]. - /// |default:10 - /// 组件离容器上侧的距离。 + /// top value is a instant pixel value like 10 or float value [0-1]. + /// |组件离容器上侧的距离。 /// </summary> public float top { @@ -275,9 +265,8 @@ namespace XCharts.Runtime } /// <summary> /// Distance between dataZoom component and the left side of the container. - /// |left value is a instant pixel value like 10 or float value [0-1]. - /// |default:10 - /// 组件离容器左侧的距离。 + /// left value is a instant pixel value like 10 or float value [0-1]. + /// |组件离容器左侧的距离。 /// </summary> public float left { @@ -286,9 +275,8 @@ namespace XCharts.Runtime } /// <summary> /// Distance between dataZoom component and the right side of the container. - /// |right value is a instant pixel value like 10 or float value [0-1]. - /// |default:10 - /// 组件离容器右侧的距离。 + /// right value is a instant pixel value like 10 or float value [0-1]. + /// |组件离容器右侧的距离。 /// </summary> public float right { @@ -297,7 +285,6 @@ namespace XCharts.Runtime } /// <summary> /// Use absolute value or percent value in DataZoom.start and DataZoom.end. - /// |default:RangeMode.Percent. /// |取绝对值还是百分比。 /// </summary> public RangeMode rangeMode @@ -307,7 +294,6 @@ namespace XCharts.Runtime } /// <summary> /// The start percentage of the window out of the data extent, in the range of 0 ~ 100. - /// |[default:30]. /// |数据窗口范围的起始百分比。范围是:0 ~ 100。 /// </summary> public float start @@ -317,7 +303,6 @@ namespace XCharts.Runtime } /// <summary> /// The end percentage of the window out of the data extent, in the range of 0 ~ 100. - /// |default:70 /// 数据窗口范围的结束百分比。范围是:0 ~ 100。 /// </summary> public float end @@ -336,22 +321,19 @@ namespace XCharts.Runtime } /// <summary> /// The sensitivity of dataZoom scroll. - /// |The larger the number, the more sensitive it is. - /// |default:10 - /// 缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。 + /// The larger the number, the more sensitive it is. + /// |缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。 /// </summary> public float scrollSensitivity { get { return m_ScrollSensitivity; } set { if (PropertyUtil.SetStruct(ref m_ScrollSensitivity, value)) SetVerticesDirty(); } } - /// <summary> /// 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. /// |布局方式是横还是竖。不仅是布局方式,对于直角坐标系而言,也决定了,缺省情况控制横向数轴还是纵向数轴。 /// </summary> - /// <value></value> public Orient orient { get { return m_Orient; } diff --git a/Runtime/Component/Radar/RadarCoord.cs b/Runtime/Component/Radar/RadarCoord.cs index b717c0db..4ee2786e 100644 --- a/Runtime/Component/Radar/RadarCoord.cs +++ b/Runtime/Component/Radar/RadarCoord.cs @@ -31,12 +31,12 @@ namespace XCharts.Runtime { /// <summary> /// Display at the vertex. - /// 显示在顶点处。 + /// |显示在顶点处。 /// </summary> Vertice, /// <summary> /// Display at the middle of line. - /// 显示在两者之间。 + /// |显示在两者之间。 /// </summary> Between, } @@ -54,27 +54,27 @@ namespace XCharts.Runtime /// <summary> /// The name of indicator. - /// 指示器名称。 + /// |指示器名称。 /// </summary> public string name { get { return FormatterHelper.TrimAndReplaceLine(m_Name); } set { m_Name = value; } } /// <summary> /// The maximum value of indicator, with default value of 0, but we recommend to set it manually. - /// 指示器的最大值,默认为 0 无限制。 + /// |指示器的最大值,默认为 0 无限制。 /// </summary> public double max { get { return m_Max; } set { m_Max = value; } } /// <summary> /// The minimum value of indicator, with default value of 0. - /// 指示器的最小值,默认为 0 无限制。 + /// |指示器的最小值,默认为 0 无限制。 /// </summary> public double min { get { return m_Min; } set { m_Min = value; } } /// <summary> /// the text conponent of indicator. - /// 指示器的文本组件。 + /// |指示器的文本组件。 /// </summary> public Text text { get; set; } /// <summary> /// Normal range. When the value is outside this range, the display color is automatically changed. - /// 正常值范围。当数值不在这个范围时,会自动变更显示颜色。 + /// |正常值范围。当数值不在这个范围时,会自动变更显示颜色。 /// </summary> public double[] range { diff --git a/Runtime/Component/Tooltip/Tooltip.cs b/Runtime/Component/Tooltip/Tooltip.cs index ce49f819..35e2d16a 100644 --- a/Runtime/Component/Tooltip/Tooltip.cs +++ b/Runtime/Component/Tooltip/Tooltip.cs @@ -23,22 +23,22 @@ namespace XCharts.Runtime { /// <summary> /// line indicator. - /// 直线指示器 + /// |直线指示器 /// </summary> Line, /// <summary> /// shadow crosshair indicator. - /// 阴影指示器 + /// |阴影指示器 /// </summary> Shadow, /// <summary> /// no indicator displayed. - /// 无指示器 + /// |无指示器 /// </summary> None, /// <summary> /// crosshair indicator, which is actually the shortcut of enable two axisPointers of two orthometric axes. - /// 十字准星指示器。坐标轴显示Label和交叉线。 + /// |十字准星指示器。坐标轴显示Label和交叉线。 /// </summary> Corss } @@ -47,17 +47,17 @@ namespace XCharts.Runtime { /// <summary> /// Triggered by data item, which is mainly used for charts that don't have a category axis like scatter charts or pie charts. - /// 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。 + /// |数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。 /// </summary> Item, /// <summary> /// Triggered by axes, which is mainly used for charts that have category axes, like bar charts or line charts. - /// 坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。 + /// |坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。 /// </summary> Axis, /// <summary> /// Trigger nothing. - /// 什么都不触发。 + /// |什么都不触发。 /// </summary> None } @@ -132,41 +132,41 @@ namespace XCharts.Runtime } /// <summary> /// 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. - /// |{.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}" - /// 提示框标题内容的字符串模版格式器。支持用 \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。 - /// {.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%"的情况 )。 + /// The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. + /// Template variables are {.}, {a}, {b}, {c}, {d}.</br> + /// {.} is the dot of the corresponding color of a Serie that is currently indicated or whose index is 0.</br> + /// {a} is the series name of the serie that is currently indicated or whose index is 0.</br> + /// {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).</br> + /// {c} is the value of a Y-dimension (dimesion is 1) from a Serie that is currently indicated or whose index is 0.</br> + /// {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.</br> + /// {e} is the name of the data item serieData that is currently indicated or whose index is 0.</br> + /// {.1} represents a dot from serie corresponding color that specifies index as 1.</br> + /// 1 in {a1}, {b1}, {c1} represents a serie that specifies an index of 1.</br> + /// {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).</br> + /// {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).</br> + /// {d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified).</br> + /// {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 ).</br> + /// Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}"</br> + /// |提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。</br> + /// 模板变量有{.}、{a}、{b}、{c}、{d}、{e}。</br> + /// {.}为当前所指示或index为0的serie的对应颜色的圆点。</br> + /// {a}为当前所指示或index为0的serie的系列名name。</br> + /// {b}为当前所指示或index为0的serie的数据项serieData的name,或者类目值(如折线图的X轴)。</br> + /// {c}为当前所指示或index为0的serie的y维(dimesion为1)的数值。</br> + /// {d}为当前所指示或index为0的serie的y维(dimesion为1)百分比值,注意不带%号。</br> + /// {e}为当前所指示或index为0的serie的数据项serieData的name。</br> + /// {.1}表示指定index为1的serie对应颜色的圆点。</br> + /// {a1}、{b1}、{c1}中的1表示指定index为1的serie。</br> + /// {c1:2}表示索引为1的serie的当前指示数据项的第3个数据(一个数据项有多个数据,index为2表示第3个数据)。</br> + /// {c1:2-2}表示索引为1的serie的第3个数据项的第3个数据(也就是要指定第几个数据项时必须要指定第几个数据)。</br> + /// {d1:2:f2}表示单独指定了数值的格式化字符串为f2(不指定时用numericFormatter)。</br> + /// {d:0.##} 表示单独指定了数值的格式化字符串为 0.## (用于百分比,保留2位有效数同时又能避免使用 f2 而出现的类似于"100.00%"的情况 )。</br> /// 示例:"{a}:{c}"、"{a1}:{c1:f1}"、"{a1}:{c1:0:f1}"、"{a1}:{c1:1-1:f1}" /// </summary> public string titleFormatter { get { return m_TitleFormatter; } set { m_TitleFormatter = value; } } /// <summary> /// 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. + /// When formatter is not null, use formatter first, otherwise use itemFormatter. /// |提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。当formatter不为空时,优先使用formatter,否则使用itemFormatter。 /// </summary> public string itemFormatter { get { return m_ItemFormatter; } set { m_ItemFormatter = value; } } @@ -197,7 +197,7 @@ namespace XCharts.Runtime public float minHeight { get { return m_MinHeight; } set { m_MinHeight = value; } } /// <summary> /// 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, + /// 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'. /// |标准数字格式字符串。用于将数值格式化显示为字符串。 @@ -247,7 +247,7 @@ namespace XCharts.Runtime public bool alwayShowContent { get { return m_AlwayShowContent; } set { m_AlwayShowContent = value; } } /// <summary> /// Whether to show the tooltip floating layer, whose default value is true. - /// |It should be configurated to be false, if you only need tooltip to trigger the event or show the axisPointer without content. + /// It should be configurated to be false, if you only need tooltip to trigger the event or show the axisPointer without content. /// |是否显示提示框浮层,默认显示。只需tooltip触发事件或显示axisPointer而不需要显示内容时可配置该项为false。 /// </summary> public bool showContent { get { return m_ShowContent; } set { m_ShowContent = value; } }