diff --git a/Documentation/XChartsAPI-EN.md b/Documentation/XChartsAPI-EN.md index 3db0e1bb..5b9c870b 100644 --- a/Documentation/XChartsAPI-EN.md +++ b/Documentation/XChartsAPI-EN.md @@ -355,7 +355,7 @@ Inherits or Implemented: [BaseChart](#BaseChart) | `GetPointList()` |public static void GetPointList(ref List posList, Vector3 sp, Vector3 ep, float k = 30f)
| | `GetPos()` |public static Vector3 GetPos(Vector3 center, float radius, float angle, bool isDegree = false)
| | `GetPosition()` |public static Vector3 GetPosition(Vector3 center, float angle, float radius)
| -| `GetSelectColor()` |public static Color32 GetSelectColor(Color32 color, float rate = 0.7f)
| +| `GetSelectColor()` |public static Color32 GetSelectColor(Color32 color, float rate = 0.8f)
| | `GetVertialDire()` |public static Vector3 GetVertialDire(Vector3 dire)
| | `HideAllObject()` |public static void HideAllObject(GameObject obj, string match = null)
| | `HideAllObject()` |public static void HideAllObject(Transform parent, string match = null)
| @@ -852,12 +852,11 @@ Inherits or Implemented: [Attribute](#Attribute) | `GetSerieLabel()` |public static LabelStyle GetSerieLabel(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
| | `GetSerieLabelLine()` |public static LabelLine GetSerieLabelLine(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
| | `GetSerieState()` |public static SerieState GetSerieState(Serie serie)
| -| `GetSerieState()` |public static SerieState GetSerieState(Serie serie, SerieData serieData)
| -| `GetSerieSymbol()` |public static SerieSymbol GetSerieSymbol(Serie serie, SerieData serieData)
| +| `GetSerieState()` |public static SerieState GetSerieState(Serie serie, SerieData serieData, bool defaultSerieState = false)
| +| `GetSerieState()` |public static SerieState GetSerieState(SerieData serieData)
| +| `GetSerieSymbol()` |public static SerieSymbol GetSerieSymbol(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
| | `GetStateStyle()` |public static StateStyle GetStateStyle(Serie serie, SerieData serieData, SerieState state)
| -| `GetSymbolBorder()` |public static float GetSymbolBorder(Serie serie, SerieData serieData, ThemeStyle theme, SerieState state = SerieState.Auto)
| -| `GetSymbolBorderColor()` |public static Color32 GetSymbolBorderColor(Serie serie, SerieData serieData, ThemeStyle theme, SerieState state = SerieState.Auto)
| -| `GetSymbolCornerRadius()` |public static float[] GetSymbolCornerRadius(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
| +| `GetSysmbolSize()` |public static float GetSysmbolSize(Serie serie, SerieData serieData, ThemeStyle theme, float defaultSize, SerieState state = SerieState.Auto)
| | `GetTitleStyle()` |public static TitleStyle GetTitleStyle(Serie serie, SerieData serieData)
| | `IsAllZeroValue()` |public static bool IsAllZeroValue(Serie serie, int dimension = 1)
Whether the data for the specified dimension of serie are all 0. | | `IsDownPoint()` |public static bool IsDownPoint(Serie serie, int index)
| @@ -986,6 +985,7 @@ Inherits or Implemented: [MaskableGraphic](#MaskableGraphic) | `DrawLine()` |public static void DrawLine(VertexHelper vh, List points, float width, Color32 color, bool smooth, bool closepath = false)
| | `DrawLine()` |public static void DrawLine(VertexHelper vh, Vector3 startPoint, Vector3 endPoint, float width, Color32 color)
Draw a line. 画直线 | | `DrawLine()` |public static void DrawLine(VertexHelper vh, Vector3 startPoint, Vector3 endPoint, float width, Color32 color, Color32 toColor)
Draw a line. 画直线 | +| `DrawPolygon()` |public static void DrawPolygon(VertexHelper vh, List points, Color32 color)
填充任意多边形(目前只支持凸多边形) | | `DrawRectangle()` |public static void DrawRectangle(VertexHelper vh, Rect rect, Color32 color)
| | `DrawRectangle()` |public static void DrawRectangle(VertexHelper vh, Rect rect, Color32 color, Color32 toColor)
| | `DrawRectangle()` |public static void DrawRectangle(VertexHelper vh, Rect rect, float border, Color32 color)
| diff --git a/Documentation/XChartsAPI-ZH.md b/Documentation/XChartsAPI-ZH.md index abf352a5..60546735 100644 --- a/Documentation/XChartsAPI-ZH.md +++ b/Documentation/XChartsAPI-ZH.md @@ -355,7 +355,7 @@ Inherits or Implemented: [BaseChart](#BaseChart) | `GetPointList()` |public static void GetPointList(ref List posList, Vector3 sp, Vector3 ep, float k = 30f)
| | `GetPos()` |public static Vector3 GetPos(Vector3 center, float radius, float angle, bool isDegree = false)
| | `GetPosition()` |public static Vector3 GetPosition(Vector3 center, float angle, float radius)
| -| `GetSelectColor()` |public static Color32 GetSelectColor(Color32 color, float rate = 0.7f)
| +| `GetSelectColor()` |public static Color32 GetSelectColor(Color32 color, float rate = 0.8f)
| | `GetVertialDire()` |public static Vector3 GetVertialDire(Vector3 dire)
| | `HideAllObject()` |public static void HideAllObject(GameObject obj, string match = null)
| | `HideAllObject()` |public static void HideAllObject(Transform parent, string match = null)
| @@ -852,12 +852,11 @@ Inherits or Implemented: [Attribute](#Attribute) | `GetSerieLabel()` |public static LabelStyle GetSerieLabel(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
| | `GetSerieLabelLine()` |public static LabelLine GetSerieLabelLine(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
| | `GetSerieState()` |public static SerieState GetSerieState(Serie serie)
| -| `GetSerieState()` |public static SerieState GetSerieState(Serie serie, SerieData serieData)
| -| `GetSerieSymbol()` |public static SerieSymbol GetSerieSymbol(Serie serie, SerieData serieData)
| +| `GetSerieState()` |public static SerieState GetSerieState(Serie serie, SerieData serieData, bool defaultSerieState = false)
| +| `GetSerieState()` |public static SerieState GetSerieState(SerieData serieData)
| +| `GetSerieSymbol()` |public static SerieSymbol GetSerieSymbol(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
| | `GetStateStyle()` |public static StateStyle GetStateStyle(Serie serie, SerieData serieData, SerieState state)
| -| `GetSymbolBorder()` |public static float GetSymbolBorder(Serie serie, SerieData serieData, ThemeStyle theme, SerieState state = SerieState.Auto)
| -| `GetSymbolBorderColor()` |public static Color32 GetSymbolBorderColor(Serie serie, SerieData serieData, ThemeStyle theme, SerieState state = SerieState.Auto)
| -| `GetSymbolCornerRadius()` |public static float[] GetSymbolCornerRadius(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
| +| `GetSysmbolSize()` |public static float GetSysmbolSize(Serie serie, SerieData serieData, ThemeStyle theme, float defaultSize, SerieState state = SerieState.Auto)
| | `GetTitleStyle()` |public static TitleStyle GetTitleStyle(Serie serie, SerieData serieData)
| | `IsAllZeroValue()` |public static bool IsAllZeroValue(Serie serie, int dimension = 1)
系列指定维数的数据是否全部为0。 | | `IsDownPoint()` |public static bool IsDownPoint(Serie serie, int index)
| @@ -986,6 +985,7 @@ Inherits or Implemented: [MaskableGraphic](#MaskableGraphic) | `DrawLine()` |public static void DrawLine(VertexHelper vh, List points, float width, Color32 color, bool smooth, bool closepath = false)
| | `DrawLine()` |public static void DrawLine(VertexHelper vh, Vector3 startPoint, Vector3 endPoint, float width, Color32 color)
Draw a line. 画直线 | | `DrawLine()` |public static void DrawLine(VertexHelper vh, Vector3 startPoint, Vector3 endPoint, float width, Color32 color, Color32 toColor)
Draw a line. 画直线 | +| `DrawPolygon()` |public static void DrawPolygon(VertexHelper vh, List points, Color32 color)
填充任意多边形(目前只支持凸多边形) | | `DrawRectangle()` |public static void DrawRectangle(VertexHelper vh, Rect rect, Color32 color)
| | `DrawRectangle()` |public static void DrawRectangle(VertexHelper vh, Rect rect, Color32 color, Color32 toColor)
| | `DrawRectangle()` |public static void DrawRectangle(VertexHelper vh, Rect rect, float border, Color32 color)
| diff --git a/Documentation/XChartsConfiguration-EN.md b/Documentation/XChartsConfiguration-EN.md index 4fabb276..35f7d9ee 100644 --- a/Documentation/XChartsConfiguration-EN.md +++ b/Documentation/XChartsConfiguration-EN.md @@ -596,7 +596,7 @@ Configurations of emphasis state. |field|default|since|comment| |--|--|--|--| -|`scale`|1.1f||Whether to scale to highlight the data in emphasis state. 高亮时的缩放倍数。 +|`scale`|1.1f||Whether to scale to highlight the data in emphasis state. |`focus`|||When the data is highlighted, whether to fade out of other data to focus the highlighted.
`EmphasisStyle.FocusType`:
- `None`: Do not fade out other data, it's by default.
- `Self`: Only focus (not fade out) the element of the currently highlighted data.
- `Series`: Focus on all elements of the series which the currently highlighted data belongs to.
| |`blurScope`|||The range of fade out when focus is enabled.
`EmphasisStyle.BlurScope`:
- `GridCoord`: coordinate system.
- `Series`: series.
- `Global`: global.
| @@ -1071,6 +1071,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) |`serieType`|||the type of serie. |`serieName`|||Series name used for displaying in tooltip and filtering with legend. |`state`||v3.2.0|The default state of a serie.
`SerieState`:
- `Normal`: Normal state.
- `Emphasis`: Emphasis state.
- `Blur`: Blur state.
- `Select`: Select state.
- `Auto`: Auto state.
| +|`colorBy`||v3.2.0|The policy to take color from theme.
`SerieColorBy`:
- `Default`: Select state.
- `Serie`: assigns the colors in the palette by serie, so that all data in the same series are in the same color;.
- `Data`: assigns colors in the palette according to data items, with each data item using a different color..
| |`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. @@ -1160,12 +1161,9 @@ Inherits or Implemented: [SymbolStyle](#SymbolStyle),[ISerieDataComponent](#ISer |field|default|since|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. @@ -1273,6 +1271,7 @@ the state style of serie. |`itemStyle`|||图形样式。 [ItemStyle](#ItemStyle)| |`lineStyle`|||折线样式。 [LineStyle](#LineStyle)| |`areaStyle`|||区域样式。 [AreaStyle](#AreaStyle)| +|`symbol`|||标记样式。 [SerieSymbol](#SerieSymbol)| ## `SubTitleTheme` diff --git a/Documentation/XChartsConfiguration-ZH.md b/Documentation/XChartsConfiguration-ZH.md index 54869840..a291fa8d 100644 --- a/Documentation/XChartsConfiguration-ZH.md +++ b/Documentation/XChartsConfiguration-ZH.md @@ -596,7 +596,7 @@ Inherits or Implemented: [StateStyle](#StateStyle),[ISerieExtraComponent](#ISeri |field|default|since|comment| |--|--|--|--| -|`scale`|1.1f||Whether to scale to highlight the data in emphasis state. 高亮时的缩放倍数。 +|`scale`|1.1f||高亮时的缩放倍数。 |`focus`|||在高亮图形时,是否淡出其它数据的图形已达到聚焦的效果。
`EmphasisStyle.FocusType`:
- `None`: 不淡出其它图形,默认使用该配置。
- `Self`: 只聚焦(不淡出)当前高亮的数据的图形。
- `Series`: 聚焦当前高亮的数据所在的系列的所有图形。
| |`blurScope`|||在开启focus的时候,可以通过blurScope配置淡出的范围。
`EmphasisStyle.BlurScope`:
- `GridCoord`: 淡出范围为坐标系,默认使用该配置。
- `Series`: 淡出范围为系列。
- `Global`: 淡出范围为全局。
| @@ -1071,6 +1071,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable) |`serieType`|||系列类型。 |`serieName`|||系列名称,用于 tooltip 的显示,legend 的图例筛选。 |`state`||v3.2.0|系列的默认状态。
`SerieState`:
- `Normal`: 正常状态。
- `Emphasis`: 高亮状态。
- `Blur`: 淡出状态。
- `Select`: 选中状态。
- `Auto`: 自动保持和父节点一致。一般用在SerieData。
| +|`colorBy`||v3.2.0|从主题中取色的策略。
`SerieColorBy`:
- `Default`: 默认策略。每种Serie都有自己的默认的取颜色策略。比如Line默认是Series策略,Pie默认是Data策略
- `Serie`: 按照系列分配调色盘中的颜色,同一系列中的所有数据都是用相同的颜色。
- `Data`: 按照数据项分配调色盘中的颜色,每个数据项都使用不同的颜色。
| |`stack`|||数据堆叠,同个类目轴上系列配置相同的stack值后,后一个系列的值会在前一个系列的值上相加。 |`xAxisIndex`|0||使用X轴的index。 |`yAxisIndex`|0||使用Y轴的index。 @@ -1160,12 +1161,9 @@ Inherits or Implemented: [SymbolStyle](#SymbolStyle),[ISerieDataComponent](#ISer |field|default|since|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||是否强制显示最后一个图形标记。 @@ -1273,6 +1271,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 |`itemStyle`|||图形样式。 [ItemStyle](#ItemStyle)| |`lineStyle`|||折线样式。 [LineStyle](#LineStyle)| |`areaStyle`|||区域样式。 [AreaStyle](#AreaStyle)| +|`symbol`|||标记样式。 [SerieSymbol](#SerieSymbol)| ## `SubTitleTheme` diff --git a/Runtime/Internal/XChartsMgr.cs b/Runtime/Internal/XChartsMgr.cs index 07b914c7..a9d29535 100644 --- a/Runtime/Internal/XChartsMgr.cs +++ b/Runtime/Internal/XChartsMgr.cs @@ -21,7 +21,7 @@ namespace XCharts.Runtime public static class XChartsMgr { public static readonly string version = "3.2.0"; - public static readonly int versionDate = 20220712; + public static readonly int versionDate = 20220815; public static string fullVersion { get { return version + "-" + versionDate; } } internal static List chartList = new List(); diff --git a/package.json b/package.json index bc877903..b484585f 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "com.monitor1394.xcharts", "displayName": "XCharts", "version": "3.2.0", - "date": "20220712", - "checkdate": "20220712", + "date": "20220815", + "checkdate": "20220815", "desc": "如果 XCharts 对您有帮助,希望您能在 Github 上点 Star 支持,非常感谢!", "unity": "2018.3", "description": "A charting and data visualization library for Unity.",