From 20825c148f162a4352722b3f877f93fa013dde00 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 7 Apr 2022 08:36:14 +0800 Subject: [PATCH] [doc] update api and configuration --- Documentation/XChartsAPI-EN.md | 5 ++++- Documentation/XChartsAPI-ZH.md | 5 ++++- Documentation/XChartsConfiguration-EN.md | 11 ++++++----- Documentation/XChartsConfiguration-ZH.md | 7 ++++--- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Documentation/XChartsAPI-EN.md b/Documentation/XChartsAPI-EN.md index 3b1e988e..e8b2ea9b 100644 --- a/Documentation/XChartsAPI-EN.md +++ b/Documentation/XChartsAPI-EN.md @@ -172,6 +172,7 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver | `CovertXYAxis` |public void CovertXYAxis(int index)
转换X轴和Y轴的配置 | | `GenerateDefaultSerieName` |public string GenerateDefaultSerieName()
| | `GetAllSerieDataCount` |public int GetAllSerieDataCount()
| +| `GetChartBackgroundColor` |public Color32 GetChartBackgroundColor()
| | `GetChartComponentNum` |public int GetChartComponentNum(Type type)
| | `GetData` |public double GetData(int serieIndex, int dataIndex, int dimension = 1)
| | `GetData` |public double GetData(string serieName, int dataIndex, int dimension = 1)
| @@ -797,7 +798,7 @@ Inherits or Implemented: [Attribute](#Attribute) | `AvoidLabelOverlap` |public static void AvoidLabelOverlap(Serie serie, ComponentTheme theme)
| | `CanShowLabel` |public static bool CanShowLabel(Serie serie, SerieData serieData, LabelStyle label, int dimesion)
| | `GetLabelColor` |public static Color GetLabelColor(Serie serie, ThemeStyle theme, int index)
| -| `GetRealLabelPosition` |public static Vector3 GetRealLabelPosition(SerieData serieData, LabelStyle label, LabelLine labelLine)
| +| `GetRealLabelPosition` |public static Vector3 GetRealLabelPosition(Serie serie, SerieData serieData, LabelStyle label, LabelLine labelLine)
| | `SetGaugeLabelText` |public static void SetGaugeLabelText(Serie serie)
| | `UpdatePieLabelPosition` |public static void UpdatePieLabelPosition(Serie serie, SerieData serieData)
| @@ -965,7 +966,9 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext) | `GetChart` |public static BaseChart GetChart(string chartName)
| | `GetCharts` |public static List GetCharts(string chartName)
| | `GetPackageFullPath` |public static string GetPackageFullPath()
| +| `GetRepeatChartNameInfo` |public static string GetRepeatChartNameInfo(BaseChart chart, string chartName)
| | `IsExistTMPAssembly` |public static bool IsExistTMPAssembly()
| +| `IsRepeatChartName` |public static bool IsRepeatChartName(BaseChart chart, string chartName = null)
| | `ModifyTMPRefence` |public static bool ModifyTMPRefence(bool removeTMP = false)
| | `RemoveAllChartObject` |public static void RemoveAllChartObject()
| | `RemoveChart` |public static void RemoveChart(string chartName)
| diff --git a/Documentation/XChartsAPI-ZH.md b/Documentation/XChartsAPI-ZH.md index e2fbc615..6474e237 100644 --- a/Documentation/XChartsAPI-ZH.md +++ b/Documentation/XChartsAPI-ZH.md @@ -172,6 +172,7 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver | `CovertXYAxis` |public void CovertXYAxis(int index)
转换X轴和Y轴的配置 | | `GenerateDefaultSerieName` |public string GenerateDefaultSerieName()
| | `GetAllSerieDataCount` |public int GetAllSerieDataCount()
| +| `GetChartBackgroundColor` |public Color32 GetChartBackgroundColor()
| | `GetChartComponentNum` |public int GetChartComponentNum(Type type)
| | `GetData` |public double GetData(int serieIndex, int dataIndex, int dimension = 1)
| | `GetData` |public double GetData(string serieName, int dataIndex, int dimension = 1)
| @@ -797,7 +798,7 @@ Inherits or Implemented: [Attribute](#Attribute) | `AvoidLabelOverlap` |public static void AvoidLabelOverlap(Serie serie, ComponentTheme theme)
| | `CanShowLabel` |public static bool CanShowLabel(Serie serie, SerieData serieData, LabelStyle label, int dimesion)
| | `GetLabelColor` |public static Color GetLabelColor(Serie serie, ThemeStyle theme, int index)
| -| `GetRealLabelPosition` |public static Vector3 GetRealLabelPosition(SerieData serieData, LabelStyle label, LabelLine labelLine)
| +| `GetRealLabelPosition` |public static Vector3 GetRealLabelPosition(Serie serie, SerieData serieData, LabelStyle label, LabelLine labelLine)
| | `SetGaugeLabelText` |public static void SetGaugeLabelText(Serie serie)
| | `UpdatePieLabelPosition` |public static void UpdatePieLabelPosition(Serie serie, SerieData serieData)
| @@ -965,7 +966,9 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext) | `GetChart` |public static BaseChart GetChart(string chartName)
| | `GetCharts` |public static List GetCharts(string chartName)
| | `GetPackageFullPath` |public static string GetPackageFullPath()
| +| `GetRepeatChartNameInfo` |public static string GetRepeatChartNameInfo(BaseChart chart, string chartName)
| | `IsExistTMPAssembly` |public static bool IsExistTMPAssembly()
| +| `IsRepeatChartName` |public static bool IsRepeatChartName(BaseChart chart, string chartName = null)
| | `ModifyTMPRefence` |public static bool ModifyTMPRefence(bool removeTMP = false)
| | `RemoveAllChartObject` |public static void RemoveAllChartObject()
| | `RemoveChart` |public static void RemoveChart(string chartName)
| diff --git a/Documentation/XChartsConfiguration-EN.md b/Documentation/XChartsConfiguration-EN.md index e5c24c5e..ab39d2c2 100644 --- a/Documentation/XChartsConfiguration-EN.md +++ b/Documentation/XChartsConfiguration-EN.md @@ -653,7 +653,6 @@ Text label of chart, to explain some data information about graphic item like va | `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` @@ -865,9 +864,9 @@ Polar coordinate can be used in scatter and line chart. Every polar coordinate h |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. | +| `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` |0.35f | the radius of polar. | +| `backgroundColor` | | Background color of polar, which is transparent by default. | ## `Radar` @@ -1160,6 +1159,7 @@ Settings related to text. | `rotate` |0 | Rotation of text. | | `extraWidth` |0 | Extra width of text preferred width. | | `offset` |Vector2.zero | the offset of position. | +| `autoColor` |false | 是否开启自动颜色。当开启时,会自动设置颜色。 | | `color` | | the color of text. | | `autoBackgroundColor` |false | | | `backgroundColor` | | the color of text. | @@ -1206,7 +1206,8 @@ Theme. |--|--|--| | `show` |true | | | `sharedTheme` | | [Theme](Theme)| -| `enableCustomTheme` | | | +| `transparentBackground` |false | Whether the background color is transparent. When true, the background color is not drawn. |是否透明背景颜色。当设置为true时,不绘制背景颜色。 | +| `enableCustomTheme` |false | Whether to customize theme colors. When set to true, you can use 'sync color to custom' to synchronize the theme color to the custom color. It can also be set manually. | | `customFont` | | | | `customBackgroundColor` | | the custom background color of chart. | | `customColorPalette` | | | diff --git a/Documentation/XChartsConfiguration-ZH.md b/Documentation/XChartsConfiguration-ZH.md index ac84d545..823d425b 100644 --- a/Documentation/XChartsConfiguration-ZH.md +++ b/Documentation/XChartsConfiguration-ZH.md @@ -653,7 +653,6 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent | `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` @@ -865,7 +864,7 @@ Inherits or Implemented: [CoordSystem](#CoordSystem),[ISerieContainer](#ISerieCo |field|default|comment| |--|--|--| | `show` |true | 是否显示极坐标。 | -| `center` | | When value between 0 and 1 represents a percentage relative to the chart. | +| `center` | | 极坐标的中心点。数组的第一项是横坐标,第二项是纵坐标。 当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。 | | `radius` |0.35f | 极坐标的半径。 | | `backgroundColor` | | 极坐标的背景色,默认透明。 | @@ -1160,6 +1159,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) | `rotate` |0 | 文本的旋转。 [default: `0f`] | | `extraWidth` |0 | 额外的宽度 | | `offset` |Vector2.zero | 坐标偏移。 [Default: `Vector2.zero`] | +| `autoColor` |false | 是否开启自动颜色。当开启时,会自动设置颜色。 | | `color` | | 文本的颜色。 [default: `Color.clear`] | | `autoBackgroundColor` |false | | | `backgroundColor` | | 文本的背景颜色。 [default: `Color.clear`] | @@ -1206,7 +1206,8 @@ Inherits or Implemented: [ChildComponent](#ChildComponent) |--|--|--| | `show` |true | | | `sharedTheme` | | [Theme](Theme)| -| `enableCustomTheme` | | | +| `transparentBackground` |false | Whether the background color is transparent. When true, the background color is not drawn. |是否透明背景颜色。当设置为true时,不绘制背景颜色。 | +| `enableCustomTheme` |false | 是否自定义主题颜色。当设置为true时,可以用‘sync color to custom’同步主题的颜色到自定义颜色。也可以手动设置。 | | `customFont` | | | | `customBackgroundColor` | | 自定义的背景颜色。 | | `customColorPalette` | | |