From 8a788679613f9217874ed6c25ccb961e133a37aa Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 5 May 2022 13:23:33 +0800 Subject: [PATCH] [doc] update doc --- CHANGELOG.md | 9 ++++ Documentation/XChartsAPI-EN.md | 26 +++++++++- Documentation/XChartsAPI-ZH.md | 28 +++++++++-- Documentation/XChartsConfiguration-EN.md | 60 ++++++++++++++++++------ Documentation/XChartsConfiguration-ZH.md | 60 ++++++++++++++++++------ 5 files changed, 150 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d2ea9f..297bb352 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,15 @@ ## master +* (2022.05.05) 优化`ItemStyle`设置`color`时的一致性 +* (2022.05.05) 增加`Line`对`Dash`,`Dot`等的支持 (#197) +* (2022.05.04) 增加`Legend`的委托回调 +* (2022.05.04) 优化`Symbol`和`Label` +* (2022.05.01) 增加`Bar`对`clip`的支持 (#196) +* (2022.05.01) 修复`RingChart`的`Label`不刷新的问题 (#195) +* (2022.04.29) 增加`Tooltip`支持自定义背景图 +* (2022.04.27) 修复`ItemStyle`代码修改`color`不刷新的问题 + ## v3.0.0-preivew8 * (2022.04.26) 发布`v3.0.0-preivew8`版本 diff --git a/Documentation/XChartsAPI-EN.md b/Documentation/XChartsAPI-EN.md index 21a962b7..b168396f 100644 --- a/Documentation/XChartsAPI-EN.md +++ b/Documentation/XChartsAPI-EN.md @@ -46,6 +46,7 @@ - [MainComponentHandler](#MainComponentHandler) - [MainComponentHandler](#MainComponentHandler) - [MathUtil](#MathUtil) +- [ObjectPool where T](#ObjectPool where T) - [Painter](#Painter) - [ParallelChart](#ParallelChart) - [ParallelCoordContext](#ParallelCoordContext) @@ -123,7 +124,7 @@ Inherits or Implemented: [MainComponentHandler](#MainComponentHandler) | `GetAxisPositionValue()` |public static double GetAxisPositionValue(float xy, float axisLength, double axisRange, float axisStart, float axisOffset)
| | `GetAxisPositionValue()` |public static double GetAxisPositionValue(GridCoord grid, Axis axis, Vector3 pos)
| | `GetAxisValueDistance()` |public static float GetAxisValueDistance(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上相对起点的距离 | -| `GetAxisValueLength()` |public static float GetAxisValueLength(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上对于的长度 | +| `GetAxisValueLength()` |public static float GetAxisValueLength(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上对应的长度 | | `GetAxisValuePosition()` |public static float GetAxisValuePosition(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上的坐标位置 | | `GetDataWidth()` |public static float GetDataWidth(Axis axis, float coordinateWidth, int dataCount, DataZoom dataZoom)
获得一个类目数据在坐标系中代表的宽度 | | `GetEachWidth()` |public static float GetEachWidth(Axis axis, float coordinateWidth, DataZoom dataZoom = null)
| @@ -180,6 +181,8 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver | `GetDataZoomOfSerie()` |public void GetDataZoomOfSerie(Serie serie, out DataZoom xDataZoom, out DataZoom yDataZoom)
| | `GetGrid()` |public GridCoord GetGrid(Vector2 local)
| | `GetGridOfDataZoom()` |public GridCoord GetGridOfDataZoom(DataZoom dataZoom)
| +| `GetItemColor()` |public Color32 GetItemColor(Serie serie, bool highlight = false)
| +| `GetItemColor()` |public Color32 GetItemColor(Serie serie, SerieData serieData, bool highlight = false)
| | `GetLegendRealShowNameColor()` |public Color32 GetLegendRealShowNameColor(string name)
| | `GetLegendRealShowNameIndex()` |public int GetLegendRealShowNameIndex(string name)
| | `GetPainter()` |public Painter GetPainter(int index)
| @@ -223,6 +226,8 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver | `OnScroll()` |public override void OnScroll(PointerEventData eventData)
| | `RefreshBasePainter()` |public void RefreshBasePainter()
| | `RefreshChart()` |public void RefreshChart()
Redraw chart in next frame. | +| `RefreshChart()` |public void RefreshChart(int serieIndex)
Redraw chart serie in next frame. | +| `RefreshChart()` |public void RefreshChart(Serie serie)
Redraw chart serie in next frame. | | `RefreshDataZoom()` |public void RefreshDataZoom()
在下一帧刷新DataZoom | | `RefreshPainter()` |public void RefreshPainter(int index)
| | `RefreshPainter()` |public void RefreshPainter(Serie serie)
| @@ -371,9 +376,11 @@ Inherits or Implemented: [Image](#Image) |public method|description| |--|--| +| `GetHeight()` |public float GetHeight()
| | `GetPosition()` |public Vector3 GetPosition()
| | `GetTextHeight()` |public float GetTextHeight()
| | `GetTextWidth()` |public float GetTextWidth()
| +| `GetWidth()` |public float GetWidth()
| | `SetActive()` |public void SetActive(bool flag)
| | `SetIcon()` |public void SetIcon(Image image)
| | `SetIconActive()` |public void SetIconActive(bool flag)
| @@ -594,6 +601,18 @@ Inherits or Implemented: [MainComponentHandler](#MainComponentHandler) | `Clamp01()` |public static double Clamp01(double value)
| | `Lerp()` |public static double Lerp(double a, double b, double t)
| +## `ObjectPool where T` + +Inherits or Implemented: [new()](#new()) + +|public method|description| +|--|--| +| `ClearAll()` |public void ClearAll()
| +| `Get()` |public T Get()
| +| `new()` |public class ObjectPool where T : new()
| +| `ObjectPool()` |public ObjectPool(UnityAction actionOnGet, UnityAction actionOnRelease, bool newIfEmpty = true)
| +| `Release()` |public void Release(T element)
| + ## `Painter` Inherits or Implemented: [MaskableGraphic](#MaskableGraphic) @@ -726,6 +745,7 @@ Inherits or Implemented: [SerieHandler where T](#SerieHandler where T),[Serie](# |public method|description| |--|--| +| `GetSerieDataLabelOffset()` |public virtual Vector3 GetSerieDataLabelOffset(SerieData serieData, LabelStyle label)
| | `GetSerieDataLabelPosition()` |public virtual Vector3 GetSerieDataLabelPosition(SerieData serieData, LabelStyle label)
| | `GetSerieDataTitlePosition()` |public virtual Vector3 GetSerieDataTitlePosition(SerieData serieData, TitleStyle titleStyle)
| | `InitComponent()` |public override void InitComponent()
| @@ -776,7 +796,7 @@ Inherits or Implemented: [Attribute](#Attribute) | `GetSerieEmphasisLabel()` |public static LabelStyle GetSerieEmphasisLabel(Serie serie, SerieData serieData)
| | `GetSerieLabel()` |public static LabelStyle GetSerieLabel(Serie serie, SerieData serieData, bool highlight = false)
| | `GetSerieLabelLine()` |public static LabelLine GetSerieLabelLine(Serie serie, SerieData serieData, bool highlight = false)
| -| `GetSerieSymbol()` |public static SymbolStyle GetSerieSymbol(Serie serie, SerieData serieData)
| +| `GetSerieSymbol()` |public static SerieSymbol GetSerieSymbol(Serie serie, SerieData serieData)
| | `GetSymbolBorder()` |public static float GetSymbolBorder(Serie serie, SerieData serieData, ThemeStyle theme, bool highlight)
| | `GetSymbolBorder()` |public static float GetSymbolBorder(Serie serie, SerieData serieData, ThemeStyle theme, bool highlight, float defaultWidth)
| | `GetSymbolBorderColor()` |public static Color32 GetSymbolBorderColor(Serie serie, SerieData serieData, ThemeStyle theme, bool highlight)
| @@ -930,6 +950,8 @@ Inherits or Implemented: [MaskableGraphic](#MaskableGraphic) | `GetVertialDire()` |public static Vector3 GetVertialDire(Vector3 dire)
| | `IsClearColor()` |public static bool IsClearColor(Color color)
| | `IsClearColor()` |public static bool IsClearColor(Color32 color)
| +| `IsPointInPolygon()` |public static bool IsPointInPolygon(Vector3 p, List polyons)
| +| `IsPointInPolygon()` |public static bool IsPointInPolygon(Vector3 p, List polyons)
| | `IsPointInTriangle()` |public static bool IsPointInTriangle(Vector3 p1, Vector3 p2, Vector3 p3, Vector3 check)
| | `IsValueEqualsColor()` |public static bool IsValueEqualsColor(Color color1, Color color2)
| | `IsValueEqualsColor()` |public static bool IsValueEqualsColor(Color32 color1, Color32 color2)
| diff --git a/Documentation/XChartsAPI-ZH.md b/Documentation/XChartsAPI-ZH.md index 97878008..1fe9bc1a 100644 --- a/Documentation/XChartsAPI-ZH.md +++ b/Documentation/XChartsAPI-ZH.md @@ -46,6 +46,7 @@ - [MainComponentHandler](#MainComponentHandler) - [MainComponentHandler](#MainComponentHandler) - [MathUtil](#MathUtil) +- [ObjectPool where T](#ObjectPool where T) - [Painter](#Painter) - [ParallelChart](#ParallelChart) - [ParallelCoordContext](#ParallelCoordContext) @@ -123,7 +124,7 @@ Inherits or Implemented: [MainComponentHandler](#MainComponentHandler) | `GetAxisPositionValue()` |public static double GetAxisPositionValue(float xy, float axisLength, double axisRange, float axisStart, float axisOffset)
| | `GetAxisPositionValue()` |public static double GetAxisPositionValue(GridCoord grid, Axis axis, Vector3 pos)
| | `GetAxisValueDistance()` |public static float GetAxisValueDistance(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上相对起点的距离 | -| `GetAxisValueLength()` |public static float GetAxisValueLength(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上对于的长度 | +| `GetAxisValueLength()` |public static float GetAxisValueLength(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上对应的长度 | | `GetAxisValuePosition()` |public static float GetAxisValuePosition(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上的坐标位置 | | `GetDataWidth()` |public static float GetDataWidth(Axis axis, float coordinateWidth, int dataCount, DataZoom dataZoom)
获得一个类目数据在坐标系中代表的宽度 | | `GetEachWidth()` |public static float GetEachWidth(Axis axis, float coordinateWidth, DataZoom dataZoom = null)
| @@ -180,6 +181,8 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver | `GetDataZoomOfSerie()` |public void GetDataZoomOfSerie(Serie serie, out DataZoom xDataZoom, out DataZoom yDataZoom)
| | `GetGrid()` |public GridCoord GetGrid(Vector2 local)
| | `GetGridOfDataZoom()` |public GridCoord GetGridOfDataZoom(DataZoom dataZoom)
| +| `GetItemColor()` |public Color32 GetItemColor(Serie serie, bool highlight = false)
| +| `GetItemColor()` |public Color32 GetItemColor(Serie serie, SerieData serieData, bool highlight = false)
| | `GetLegendRealShowNameColor()` |public Color32 GetLegendRealShowNameColor(string name)
| | `GetLegendRealShowNameIndex()` |public int GetLegendRealShowNameIndex(string name)
| | `GetPainter()` |public Painter GetPainter(int index)
| @@ -222,7 +225,9 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver | `OnPointerUp()` |public override void OnPointerUp(PointerEventData eventData)
| | `OnScroll()` |public override void OnScroll(PointerEventData eventData)
| | `RefreshBasePainter()` |public void RefreshBasePainter()
| -| `RefreshChart()` |public void RefreshChart()
在下一帧刷新图表。 | +| `RefreshChart()` |public void RefreshChart()
在下一帧刷新整个图表。 | +| `RefreshChart()` |public void RefreshChart(int serieIndex)
在下一帧刷新图表的指定serie。 | +| `RefreshChart()` |public void RefreshChart(Serie serie)
在下一帧刷新图表的指定serie。 | | `RefreshDataZoom()` |public void RefreshDataZoom()
在下一帧刷新DataZoom | | `RefreshPainter()` |public void RefreshPainter(int index)
| | `RefreshPainter()` |public void RefreshPainter(Serie serie)
| @@ -371,9 +376,11 @@ Inherits or Implemented: [Image](#Image) |public method|description| |--|--| +| `GetHeight()` |public float GetHeight()
| | `GetPosition()` |public Vector3 GetPosition()
| | `GetTextHeight()` |public float GetTextHeight()
| | `GetTextWidth()` |public float GetTextWidth()
| +| `GetWidth()` |public float GetWidth()
| | `SetActive()` |public void SetActive(bool flag)
| | `SetIcon()` |public void SetIcon(Image image)
| | `SetIconActive()` |public void SetIconActive(bool flag)
| @@ -594,6 +601,18 @@ Inherits or Implemented: [MainComponentHandler](#MainComponentHandler) | `Clamp01()` |public static double Clamp01(double value)
| | `Lerp()` |public static double Lerp(double a, double b, double t)
| +## `ObjectPool where T` + +Inherits or Implemented: [new()](#new()) + +|public method|description| +|--|--| +| `ClearAll()` |public void ClearAll()
| +| `Get()` |public T Get()
| +| `new()` |public class ObjectPool where T : new()
| +| `ObjectPool()` |public ObjectPool(UnityAction actionOnGet, UnityAction actionOnRelease, bool newIfEmpty = true)
| +| `Release()` |public void Release(T element)
| + ## `Painter` Inherits or Implemented: [MaskableGraphic](#MaskableGraphic) @@ -726,6 +745,7 @@ Inherits or Implemented: [SerieHandler where T](#SerieHandler where T),[Serie](# |public method|description| |--|--| +| `GetSerieDataLabelOffset()` |public virtual Vector3 GetSerieDataLabelOffset(SerieData serieData, LabelStyle label)
| | `GetSerieDataLabelPosition()` |public virtual Vector3 GetSerieDataLabelPosition(SerieData serieData, LabelStyle label)
| | `GetSerieDataTitlePosition()` |public virtual Vector3 GetSerieDataTitlePosition(SerieData serieData, TitleStyle titleStyle)
| | `InitComponent()` |public override void InitComponent()
| @@ -776,7 +796,7 @@ Inherits or Implemented: [Attribute](#Attribute) | `GetSerieEmphasisLabel()` |public static LabelStyle GetSerieEmphasisLabel(Serie serie, SerieData serieData)
| | `GetSerieLabel()` |public static LabelStyle GetSerieLabel(Serie serie, SerieData serieData, bool highlight = false)
| | `GetSerieLabelLine()` |public static LabelLine GetSerieLabelLine(Serie serie, SerieData serieData, bool highlight = false)
| -| `GetSerieSymbol()` |public static SymbolStyle GetSerieSymbol(Serie serie, SerieData serieData)
| +| `GetSerieSymbol()` |public static SerieSymbol GetSerieSymbol(Serie serie, SerieData serieData)
| | `GetSymbolBorder()` |public static float GetSymbolBorder(Serie serie, SerieData serieData, ThemeStyle theme, bool highlight)
| | `GetSymbolBorder()` |public static float GetSymbolBorder(Serie serie, SerieData serieData, ThemeStyle theme, bool highlight, float defaultWidth)
| | `GetSymbolBorderColor()` |public static Color32 GetSymbolBorderColor(Serie serie, SerieData serieData, ThemeStyle theme, bool highlight)
| @@ -930,6 +950,8 @@ Inherits or Implemented: [MaskableGraphic](#MaskableGraphic) | `GetVertialDire()` |public static Vector3 GetVertialDire(Vector3 dire)
| | `IsClearColor()` |public static bool IsClearColor(Color color)
| | `IsClearColor()` |public static bool IsClearColor(Color32 color)
| +| `IsPointInPolygon()` |public static bool IsPointInPolygon(Vector3 p, List polyons)
| +| `IsPointInPolygon()` |public static bool IsPointInPolygon(Vector3 p, List polyons)
| | `IsPointInTriangle()` |public static bool IsPointInTriangle(Vector3 p1, Vector3 p2, Vector3 p3, Vector3 check)
| | `IsValueEqualsColor()` |public static bool IsValueEqualsColor(Color color1, Color color2)
| | `IsValueEqualsColor()` |public static bool IsValueEqualsColor(Color32 color1, Color32 color2)
| diff --git a/Documentation/XChartsConfiguration-EN.md b/Documentation/XChartsConfiguration-EN.md index cede153a..1701d78e 100644 --- a/Documentation/XChartsConfiguration-EN.md +++ b/Documentation/XChartsConfiguration-EN.md @@ -103,6 +103,8 @@ - [RadarAxisTheme](#RadarAxisTheme) - [RadiusAxisTheme](#RadiusAxisTheme) - [SerieData](#SerieData) +- [SerieDataBaseInfo](#SerieDataBaseInfo) +- [SerieSymbol](#SerieSymbol) - [SerieTheme](#SerieTheme) - [StageColor](#StageColor) - [SubTitleTheme](#SubTitleTheme) @@ -136,7 +138,8 @@ - [LabelLine](#LabelLine) - [LabelStyle](#LabelStyle) - [LineStyle](#LineStyle) -- [SymbolStyle](#SymbolStyle) +- [SerieDataBaseInfo](#SerieDataBaseInfo) +- [SerieSymbol](#SerieSymbol) - [TitleStyle](#TitleStyle) ## Other @@ -633,15 +636,20 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent] 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. | +| `lineAngle` |0 | the angle 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. | +| `startSymbol` | | The symbol of the start point of labelline. [SymbolStyle](SymbolStyle)| +| `endSymbol` | | The symbol of the end point of labelline. [SymbolStyle](SymbolStyle)| ## `LabelStyle` @@ -1010,7 +1018,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) | `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)| +| `symbol` | | the symbol of serie data item. [SerieSymbol](SerieSymbol)| | `animation` | | The start animation. [AnimationStyle](AnimationStyle)| | `itemStyle` | | The style of data item. [ItemStyle](ItemStyle)| | `data` | | 系列中的数据内容数组。SerieData可以设置1到n维数据。 | @@ -1027,6 +1035,7 @@ A data item of serie. | `name` | | the name of data item. | | `id` | | 数据项的唯一id。唯一id不是必须设置的。 | | `parentId` | | | +| `baseInfos` | | | | `itemStyles` | | | | `labels` | | | | `labelLines` | | | @@ -1037,6 +1046,38 @@ A data item of serie. | `titleStyles` | | | | `data` | | An arbitrary dimension data list of data item. | +## `SerieDataBaseInfo` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) + +数据项的其他基础数据。 + +|field|default|comment| +|--|--|--| +| `ignore` |false | 是否忽略数据。当为 true 时,数据不进行绘制。 | +| `selected` | | Whether the data item is selected. | +| `radius` | | 自定义半径。可用在饼图中自定义某个数据项的半径。 | + +## `SerieSymbol` + +Inherits or Implemented: [SymbolStyle](#SymbolStyle),[ISerieDataComponent](#ISerieDataComponent) + +系列数据项的标记的图形 + +|field|default|comment| +|--|--|--| +| `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.
| +| `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. | +| `repeat` |false | 图形是否重复。 | + ## `SerieTheme` Inherits or Implemented: [ChildComponent](#ChildComponent) @@ -1128,7 +1169,7 @@ Inherits or Implemented: [ComponentTheme](#ComponentTheme) ## `SymbolStyle` -Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) +Inherits or Implemented: [ChildComponent](#ChildComponent) 系列数据项的标记的图形 @@ -1136,24 +1177,14 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent] |--|--|--| | `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` | | | +| `color` | | 图形的颜色。 | ## `TextLimit` @@ -1301,6 +1332,7 @@ Tooltip component. | `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. | +| `backgroundType` | | The background type of tooltip. | | `backgroundColor` | | The background color of tooltip. | | `borderWidth` |2f | the width of tooltip border. | | `fixedXEnable` |false | | diff --git a/Documentation/XChartsConfiguration-ZH.md b/Documentation/XChartsConfiguration-ZH.md index bb62d8f7..791a485b 100644 --- a/Documentation/XChartsConfiguration-ZH.md +++ b/Documentation/XChartsConfiguration-ZH.md @@ -103,6 +103,8 @@ - [RadarAxisTheme](#RadarAxisTheme) - [RadiusAxisTheme](#RadiusAxisTheme) - [SerieData](#SerieData) +- [SerieDataBaseInfo](#SerieDataBaseInfo) +- [SerieSymbol](#SerieSymbol) - [SerieTheme](#SerieTheme) - [StageColor](#StageColor) - [SubTitleTheme](#SubTitleTheme) @@ -136,7 +138,8 @@ - [LabelLine](#LabelLine) - [LabelStyle](#LabelStyle) - [LineStyle](#LineStyle) -- [SymbolStyle](#SymbolStyle) +- [SerieDataBaseInfo](#SerieDataBaseInfo) +- [SerieSymbol](#SerieSymbol) - [TitleStyle](#TitleStyle) ## Other 其他 @@ -633,15 +636,20 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent] 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一致取自调色板。 | +| `lineAngle` |0 | 视觉引导线的固定角度。对折线和曲线有效。 | | `lineWidth` |1.0f | 视觉引导线的宽度。 | | `lineGap` |1.0f | 视觉引导线和容器的间距。 | | `lineLength1` |25f | 视觉引导线第一段的长度。 | | `lineLength2` |15f | 视觉引导线第二段的长度。 | +| `startSymbol` | | 起始点的图形标记。 [SymbolStyle](SymbolStyle)| +| `endSymbol` | | 结束点的图形标记。 [SymbolStyle](SymbolStyle)| ## `LabelStyle` @@ -1010,7 +1018,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) | `bottom` | | 组件离容器下侧的距离。 | | `insertDataToHead` | | 添加新数据时是在列表的头部还是尾部加入。 | | `lineStyle` | | 线条样式。 [LineStyle](LineStyle)| -| `symbol` | | 标记的图形。 [SymbolStyle](SymbolStyle)| +| `symbol` | | 标记的图形。 [SerieSymbol](SerieSymbol)| | `animation` | | 起始动画。 [AnimationStyle](AnimationStyle)| | `itemStyle` | | 图形样式。 [ItemStyle](ItemStyle)| | `data` | | 系列中的数据内容数组。SerieData可以设置1到n维数据。 | @@ -1027,6 +1035,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `name` | | 数据项名称。 | | `id` | | 数据项的唯一id。唯一id不是必须设置的。 | | `parentId` | | | +| `baseInfos` | | | | `itemStyles` | | | | `labels` | | | | `labelLines` | | | @@ -1037,6 +1046,38 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `titleStyles` | | | | `data` | | 可指定任意维数的数值列表。 | +## `SerieDataBaseInfo` + +Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) + +数据项的其他基础数据。 + +|field|default|comment| +|--|--|--| +| `ignore` |false | 是否忽略数据。当为 true 时,数据不进行绘制。 | +| `selected` | | 该数据项是否被选中。 | +| `radius` | | 自定义半径。可用在饼图中自定义某个数据项的半径。 | + +## `SerieSymbol` + +Inherits or Implemented: [SymbolStyle](#SymbolStyle),[ISerieDataComponent](#ISerieDataComponent) + +系列数据项的标记的图形 + +|field|default|comment| +|--|--|--| +| `sizeType` | | 标记图形的大小获取方式。
`SymbolSizeType`:
- `Custom`: 自定义大小。
- `FromData`: 通过 dataIndex 从数据中获取,再乘以一个比例系数 dataScale 。
- `Function`: 通过委托函数获取。
| +| `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 | 是否强制显示最后一个图形标记。 | +| `repeat` |false | 图形是否重复。 | + ## `SerieTheme` Inherits or Implemented: [ChildComponent](#ChildComponent) @@ -1128,7 +1169,7 @@ Inherits or Implemented: [ComponentTheme](#ComponentTheme) ## `SymbolStyle` -Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent) +Inherits or Implemented: [ChildComponent](#ChildComponent) 系列数据项的标记的图形 @@ -1136,24 +1177,14 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent] |--|--|--| | `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` | | | +| `color` | | 图形的颜色。 | ## `TextLimit` @@ -1301,6 +1332,7 @@ Inherits or Implemented: [MainComponent](#MainComponent) | `alwayShowContent` |false | 是否触发后一直显示提示框浮层。 | | `offset` |Vector2(18f, -25f) | 提示框相对于鼠标位置的偏移。 | | `backgroundImage` | | 提示框的背景图片。 | +| `backgroundType` | | 提示框的背景图片显示类型。 | | `backgroundColor` | | 提示框的背景颜色。 | | `borderWidth` |2f | 边框线宽。 | | `fixedXEnable` |false | |