Compare commits

...

19 Commits

Author SHA1 Message Date
monitor1394
8fbda1fa73 v3.0.1 2022-06-16 08:18:07 +08:00
monitor1394
431cf7de74 v3.0.1 2022-06-16 08:14:02 +08:00
monitor1394
87049b5170 [doc] update comment and doc 2022-06-15 07:36:05 +08:00
monitor1394
c24d89c8ab [optimaze][label] icon and emphasis label 2022-06-14 07:28:24 +08:00
monitor1394
e8c46b676f [optimaze][background] rename hideThemeBackgroundColor to autoColor 2022-06-14 07:01:46 +08:00
monitor1394
0880b2f3f9 [optimize][legend]support textstyle autoColor 2022-06-10 21:00:58 +08:00
monitor1394
1d1ad6fa57 [bug] fix axis label active 2022-06-08 08:32:29 +08:00
monitor1394
6e87f82131 3.0 2022-06-01 07:59:00 +08:00
monitor1394
9549159a58 3.0 2022-05-31 08:33:54 +08:00
monitor1394
e370bedc09 3.0 2022-05-31 08:17:54 +08:00
monitor1394
5740882d1c 3.0 2022-05-29 17:25:45 +08:00
monitor1394
63166e5cd1 3.0 2022-05-26 21:33:05 +08:00
monitor1394
6ba6a7929d 3.0 2022-05-24 13:43:15 +08:00
monitor1394
e0a596d02a 3.0 2022-05-24 13:39:19 +08:00
monitor1394
9b7ebea827 3.0 2022-05-24 13:36:23 +08:00
monitor1394
0ad4a47c36 3.0 2022-05-23 08:23:58 +08:00
monitor1394
1ac59dff86 3.0 2022-05-22 22:27:20 +08:00
monitor1394
bafe032bb9 3.0 2022-05-22 22:17:38 +08:00
monitor1394
003f4da9de [bug] fix create chart error 2022-05-06 13:07:50 +08:00
397 changed files with 4515 additions and 3116 deletions

2
.github/FUNDING.yml vendored
View File

@@ -10,4 +10,4 @@ liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['https://www.paypal.com/paypalme/monitor1394','https://github.com/XCharts-Team/XCharts/blob/master/Documentation/res/alipay.png']
custom: ['https://www.paypal.me/monitor1394','https://github.com/XCharts-Team/XCharts/blob/master/Documentation/res/alipay.png','https://github.com/XCharts-Team/XCharts/blob/master/Documentation/res/wechat.png']

View File

@@ -2,6 +2,8 @@
# 更新日志
[master](#master)
[v3.0.1](#v3.0.1)
[v3.0.0](#v3.0.0)
[v3.0.0-preivew9](#v3.0.0-preivew9)
[v3.0.0-preivew8](#v3.0.0-preivew8)
[v3.0.0-preivew7](#v3.0.0-preivew7)
@@ -52,6 +54,38 @@
## master
## v3.0.1
* (2022.06.16) 发布`v3.0.1`版本
* (2022.06.16) 修复`Inspector`上部分`foldout`箭头点击无法展开的问题
* (2022.06.15) 优化`Doc`自动生成,完善代码注释和配置项手册文档
* (2022.06.14) 优化`SerieLabelStyle`,支持动态调整`Icon`
* (2022.06.13) 优化`Background`背景设置
* (2022.06.10) 增加`Legend``AxisLabel`支持`autoColor`
* (2022.06.08) 修复`Axis``AxisLabel`在设置不显示时还显示首尾两个`label`的问题
## v3.0.0
* 更健壮的底层框架。
* 更强大的性能。
* 更小的序列化文件。
* 更好的交互体验。
* 更多的组件支持。
* 更强大的文本自述能力。
* 更合理的组件调整。
* 更灵活的组件插拔。
* 更高效的二次开发。
* 更丰富的Demo示例。
* 增加`Time`时间轴。
* 增加`SingleAxis`单轴。
* 增加`Comment`文本组件。
* 增加`Widgets`小组件。
* 增加多种坐标系:`Grid``Polar``Radar``SingleAxis`
* 增加多种动画方式。
* 增加多种图表交互。
* 增加国际化支持。
* 增加多种扩展图表。
## v3.0.0-preivew9
* (2022.05.06) 发布`v3.0.0-preivew9`版本

View File

@@ -2,6 +2,8 @@
# 更新日志
[master](#master)
[v3.0.1](#v3.0.1)
[v3.0.0](#v3.0.0)
[v2.3.0](#v2.3.0)
[v2.2.3](#v2.2.3)
[v2.2.2](#v2.2.2)
@@ -37,22 +39,36 @@
[v0.5.0](#v0.5.0)
[v0.1.0](#v0.1.0)
## master
## v3.0.1
* (2022.04.23) Remove `Serie` `IconStyle` component
* (2022.04.23) Enhance `LabelStyle`, all components `TextStyle` will be upgraded to `LabelStyle`
* (2022.04.19) Added `Label` `rotate` to support setting rotation
* (2022.04.17) Fixed animation invalidation of `Bar` when the value is negative
* (2022.04.17) Added `BorderGap` support for `ItemStyle` to set border spacing
* (2022.04.16) Optimize the `Border` and `Capsule` histogram of `Bar`
* (2021.08.15) Fixed the problem of displaying exceptions after adding data again when `DataZoom` is enable (#163)
* (2021.08.15) Improved `Axis`'s `AxisLabel` text rotate setting to avoid inconsistency offset in `DataZoom` (#163)
* (2021.08.14) Added `Legend`'s `textAutoColor` to set the text color match with `Serie` color (#163)
* (2021.08.12) Optimize `BarChart` setting `Corner` when the positive and negative columns are fillet symmetric
* (2021.08.03) Fixed y axis not displaying when all data is 0
* (2021.07.29) Fixed ignored data will also participate in calculations when `ignore` is enabled (#161)
* (2021.07.29) Improved `BarChart`'s `Zebra` gradient support
* (2021.07.26) Fixed issue where `XCharts` path could not be found when `TextMeshPro Enable` (#160)
* (2022.06.16) Release `v3.0.1` version
* (2022.06.16) Fixed an issue where the `foldout` arrow on `Inspector` could not be expanded
* (2022.06.15) Optimized `Doc` auto-generation, improved code comments and configuration item manual documentation
* (2022.06.14) Optimized `SerieLabelStyle` to support dynamic adjustment of `Icon`
* (2022.06.13) Optimized `Background` setting
* (2022.06.10) Added `Legend` AxisLabel support for `autoColor`
* (2022.06.08) Fixed issue where `Axis` `AxisLabel` still shows the first and last two labels when not displayed
## v3.0.0
* More robust underlying framework.
* More powerful performance.
* Smaller serialized files.
* Better interactive experience.
* More component support.
* More powerful ability to self-report text.
* More reasonable component adjustments.
* More flexible component insertion and removal.
* More efficient secondary development.
* Richer Demo examples.
* Added `Time` axis.
* Added `SingleAxis`.
* Added multiple coordinate systems: `Grid`, `Polar`, `Radar`, `SingleAxis`.
* Added multiple animation methods.
* Added multiple chart interactions.
* Added internationalization support.
* Added `Widgets`.
* Added multiple extension charts.
## v2.3.0

View File

@@ -0,0 +1,141 @@
<p align="center">
<a href="">
<img src="" alt="" width="" height="">
</a>
</p>
<h2 align="center">XCharts</h3>
<p align="center">
A powerful, easy-to-use, configurable charting and data visualization library for Unity.
<br>
Unity数据可视化图表插件。
<br>
<a href="https://github.com/XCharts-Team/XCharts">中文</a>
</p>
<p align="center">
<a href="https://github.com/XCharts-Team/XCharts/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/XCharts-Team/XCharts">
</a>
<a href="https://github.com/XCharts-Team/XCharts/releases">
<img src="https://img.shields.io/github/v/release/XCharts-Team/XCharts?include_prereleases">
</a>
<a href="">
<img src="https://img.shields.io/github/repo-size/monitor1394/unity-ugui-xcharts">
</a>
<a href="">
<img src="https://img.shields.io/github/languages/code-size/monitor1394/unity-ugui-xcharts">
</a>
<a href="">
<img src="https://img.shields.io/badge/Unity-5.6+-green">
</a>
<a href="">
<img src="https://img.shields.io/badge/TextMeshPro-YES-green">
</a>
</p>
<p align="center">
<a href="">
<img src="https://img.shields.io/github/stars/XCharts-Team/XCharts?style=social">
</a>
<a href="">
<img src="https://img.shields.io/github/forks/XCharts-Team/XCharts?style=social">
</a>
<a href="">
<img src="https://img.shields.io/github/issues-closed/XCharts-Team/XCharts?color=green&label=%20%20%20%20issues&logoColor=green&style=social">
</a>
</p>
A powerful, easy-to-use, configurable charting and data visualization library for Unity. Supporting line, bar, pie, radar, scatter, heatmap, ring, candlestick, polar, liquid and other common chart. Also support 3d pie, 3d bar, 3d pyramid, funnel, gauge, liquid, pictorialbar, gantt, treemap and ther extended chart.
[XCharts3.0 Tutorial](XChartsTutorial01-EN.md)
[XCharts3.0 API](XChartsAPI-EN.md)
[XCharts3.0 FAQ](XChartsFAQ-EN.md)
[XCharts3.0 Configurate](XChartsConfiguration-EN.md)
[XCharts3.0 Changelog](../CHANGELOG.md)
[XCharts3.0 Support](SUPPORT.md)
## Features
* Rich built-in examples and templates, parameter visualization configuration, effect real-time preview, pure code drawing.
* Support line, bar, pie, radar, scatter, heatmaps, gauge, ring, polar, liquid and other common chart.
* Support line graph, curve graph, area graph, step graph and other LineChart.
* Support parallel bar, stack bar, stack percentage bar, zebra bar and other BarChart.
* Support ring, rose and other PieChart.
* Support line-bar chart, scatter-line chart and other combination chart.
* Support solid line, curve, ladder line, dotted line, dash line, dot line, double dot line and other lines.
* Support custom theme, built-in theme switching.
* Support custom chart content drawing, drawing points, line, curve, triangle, quadrilateral, circle, ring, sector, border, arrow and other drawing API.
* Support interactive operations such as data filtering, view zooming and detail display on PC and mobile terminals.
* Support 10,000-level big data rendering.
* Support TextMeshPro.
## XCharts3.0 new feature
* Added `Time` axis.
* Added `SingleAxis`.
* Added multiple coordinate systems: `Grid`, `Polar`, `Radar`, `SingleAxis`.
* Added multiple animation methods.
* Added multiple chart interactions.
* Added internationalization support.
* Added `Widgets`.
* Added multiple extension charts.
## XCharts3.0 improvements over XCharts2.0
* More robust underlying framework.
* More powerful performance.
* Smaller serialized files.
* Better interactive experience.
* More component support.
* More powerful ability to self-report text.
* More reasonable component adjustments.
* More flexible component insertion and removal.
* More efficient secondary development.
* Richer Demo examples.
## XCharts3.0 and 2.0 data comparison
| Case | XCharts2.0 | XCharts3.0 | Note |
| -- | -- | -- | -- |
| Fps of 2000 data line chart | ` 20 ` | ` 83 ` | Performance improvements `3` times |
| Vertices of 2000 data line chart | ` 36.5 k ` | ` 6.7 k ` | Vertices reduce `4` times |
| Prefab size of 2000 data line chart | ` 11.1 MB ` | ` 802 KB ` | Serialized file size to reduce `10` times |
| Max data of a single line chart | ` 4.1 k ` | ` 19 k ` | Single Serie data capacity improvement `4` times |
| Num of chart support | ` 11 ` | ` 23 ` | More than `1` times as many chart are supported |
## Screenshots
![buildinchart](https://github.com/XCharts-Team/XCharts-Demo/blob/master/buildinchart.png)
![extendchart](https://github.com/XCharts-Team/XCharts-Demo/blob/master/extendchart.png)
For more examples, see [XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo), You can also go to [Online Demo](https://xcharts-team.github.io/demo/) to see the running effect of `WebGL`.
## Use
1. Import `XCharts` unitypackage or source code into the project.
2. Right-click `Hierarchy` view and choose `XCharts->LineChart` to create a default LineChart.
3. You can adjust the parameters of each component in `Inspector` and see the real-time effects in `Game` view.
See more tutorial: [XCharts tutorial: 5 minutes overhand tutorial](XChartsTutorial01-EN.md)
## FAQ
1. Is `XCharts` free to use?
A: `XCharts` uses the `MIT` licence and is free to use. You can also subscribe to `VIP` to enjoy more value-added services.
2. Does `XCharts` support code to dynamically add and modify data? Does it support getting data from `Excel` or a database?
A: Support code to dynamically add and modify data, but data needs to be parsed or retrieved by itself, and then added to `XCharts` by calling the public interface of `XCharts`.
3. Does this plugin work on other platforms (e.g. Winform or WPF) besides Unity?
A: It is currently only supported on Unity. Theoretically any version of Unity that supports `UGUI` can run `XCharts`.
## Changelog
[Changelog](CHANGELOG.md)
## Licenses
[MIT License](LICENSE.md)
## Other
email: `monitor1394@gmail.com`

View File

@@ -1,22 +1,35 @@
## 技术支持
# 订阅服务
如需技术支持可订阅VIP服务。扫后面的支付宝二维码后可加VIP群`867291970`,验证信息请输入支付宝账号。企业VIP可加官方群私聊群主了解详情
如需技术支持,可订阅`个人VIP`服务。扫后面的二维码后可加VIP群`867291970`,验证信息请输入付费的账号。 企业商务合作可联系QQ3525422251XCharts技术支持
## 订阅服务
## 订阅VIP服务
| |免费用户|付费咨询|个人`1``VIP`|个人`2``VIP` | 个人长期`VIP` |
订阅服务分个人订阅和企业订阅:
- 个人订阅个人VIP属于个人不可转让`XCharts`团队只服务于订阅当事人。
- 企业订阅企业VIP属于企业席位内可安排固定职员职员离职可重新安排`XCharts`团队通过专属企业群为企业服务。
订阅服务的优势?
- 提高工作效率,节省时间成本。一方面,`XCharts`功能强大,相关配置项非常多,`VIP`服务可快速帮您定位,节省去查找和核对的时间;另一方面,`VIP`的即时回答服务可快速为您答疑解惑,避免中断开发流程。总之,订阅`VIP`可让您能快速上手,快速处理问题,至少能提高`10`倍以上的工作效率。
- 更多技术交流,更多经验交流。`XCharts`团队成员从业多年,有丰富的技术和工作经验。`VIP`服务不仅可以交流`XCharts`相关的内容,也可以咨询其他方面的技术。`VIP`群也有更多的交流。
- 扩展图表的需要订阅`VIP`服务后才能购买扩展图表超过1年后的更新支持也需要持续订阅`VIP`服务。
- `VIP`用户可加入`XCharts``GitHub`组织,参与`XCharts`社区构建,访问专有仓库。
| |免费用户|付费咨询|个人`VIP` | 个人`SVIP` | 企业`VIP` |
| ----- |--|--|--|--|--|
| 订阅费用 | -- | `98`¥ | `298`¥ | `498`¥ | `888`¥ |
| 席位时长 | -- | `1`个席位<br>`7`天,`7`小时* | `1`个席位<br>`1`年 | `1`个席位<br>`2`年 | `1`个席位<br>`长期` |
| <b>`服务方式:`</b>|
| 订阅费用 | -- | `98`¥ | `298`¥ | 首年`1298`¥</br>后续`298¥`* | `联系我们` |
| 订阅时长 | -- | `7`天* | `1`年 | `1`年* | `1`
| 订阅席位 | -- | `1`个席位 | `1`个席位 |`1`个席位|`5`个以上席位|
| __`服务方式:`__|
| 官方QQ群交流 | √ | √ | √ | √ | √ |
| 即时一对一交流 | | √ | √ | √ | √ |
| 专属VIP群交流 | | | √ | √ | √ |
| <b>`服务内容:`</b>|
| 可商用 | √ | √ | √ | √ | √ |
| 可二次开发 | √ | √ | √ | √ | √ |
| 专属VIP群交流 | | | √ | √ | √(专属企业群) |
| __`服务内容:`__|
| 可商用 | √ | √ | √ | √ | √ |
| 可二次开发 | √ | √ | √ | √ | √ |
| 有问必答 | | √ | √ | √ | √ |
| 即时回 | | √ | √ | √ | √ |
| 即时回 | | √ | √ | √ | √ |
| 新手指导 | | √ | √ | √ | √ |
| 开发指导 | | √ | √ | √ | √ |
| 优化指导 | | √ | √ | √ | √ |
@@ -25,16 +38,39 @@
| 需求优先考虑 | | | √ | √ | √ |
| 可另付费定制 | | | √ | √ | √ |
| 可另付费加急 | | | √ | √ | √ |
| 付费图表优惠 | | | 95折 | 95折 | 85折 |
| VIP专有功能教程和文档 | | | √待开放 | √待开放 | √待开放 |
| 扩展图表购买 | | | 按需购买 | 全部免费 | 按需购买 |
| 扩展图表源码 | | | 永久持有 | 永久持有 | 永久持有 |
| 扩展图表更新 | | | 1年持续更新</br>1年后需订阅 | 1年持续更新</br>1年后需订阅 | 1年持续更新</br>1年后需订阅 |
## 购买扩展图表
扩展图表为另付费购买图表,只对订阅了`VIP`服务的用户开放购买。对于`SVIP`的订阅用户,所有扩展图表仓库可免费使用,不用再单独购买。
对所有已购买的扩展图表,源码可永久持有,并获得持续一年的更新支持,超过一年后想要更新支持需要继续订阅`VIP`服务,如不继续订阅`VIP`服务,会从`GitHub``Team`中移除,不再能访问扩展图表的源码仓库。
|编号|扩展图表|价格|备注|
|--|--|--|--|
| 101 | PictorialBarChart | 98¥ | 象形柱图 |
| 102 | FunnelChart | 98¥ | 漏斗图 |
| 103 | PyramidChart | 98¥ | 3D金字塔 |
| 104 | TreemapChart | 98¥ | 树形矩图 |
| 201 | Bar3DChart | 198¥ | 3D柱图 |
| 202 | Pie3DChart | 198¥ | 3D饼图 |
| 203 | GanttChart | 198¥ | 甘特图 |
| 204 | GaugeChart | 198¥ | 仪表盘 |
| 205 | LiquidChart | 198¥ | 水位图 |
## 备注说明
1. __`付费定制`__ 是指用户可根据自己的需求定制不同的图表或新功能,只有`VIP`用户才享有`付费定制`权利。
2. __`付费加急`__ 是指用户可对自己非常紧急的需求进行付费,将开发优先级提到最高,并可要求在`Deadline`内交付,只有`VIP`用户才享有`付费加急`权利。
3. __`付费咨询`__ 付费咨询有效期`7`天,且总咨询时长不超过`7`个小时。
4. __`扩展图表`__ 购买后代码可永久持有和商用更新支持1年。超过1年后还需要更新支持的话需要订阅`VIP`服务。
## 捐助支持
如果这个项目对您有帮助,请右上方点 `Star` 予以支持!也欢迎任金额的助,非常感谢
如果这个项目对您有帮助,请右上方点 `Star` 予以支持!也欢迎任金额的助,非常您的支持
![alipay-qrcode](res/alipay.png)
![alipay-qrcode](res/alipay.png)
![wechat-qrcode](res/wechat.png)

View File

@@ -33,6 +33,7 @@
- [FormatterHelper](#FormatterHelper)
- [GridCoordContext](#GridCoordContext)
- [HeatmapChart](#HeatmapChart)
- [IgnoreDoc](#IgnoreDoc)
- [InteractData](#InteractData)
- [LayerHelper](#LayerHelper)
- [LegendContext](#LegendContext)
@@ -65,6 +66,8 @@
- [SerieContext](#SerieContext)
- [SerieConvertAttribute](#SerieConvertAttribute)
- [SerieDataContext](#SerieDataContext)
- [SerieDataExtraComponentAttribute](#SerieDataExtraComponentAttribute)
- [SerieDataExtraFieldAttribute](#SerieDataExtraFieldAttribute)
- [SerieExtraComponentAttribute](#SerieExtraComponentAttribute)
- [SerieHandler](#SerieHandler)
- [SerieHandler<T>](#SerieHandler<T>)
@@ -144,10 +147,12 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver
|public method|description|
|--|--|
| `AddChartComponent()` |public MainComponent AddChartComponent(Type type)</br> |
| `AddData()` |public SerieData AddData(int serieIndex, DateTime time, double yValue, string dataName = null, string dataId = null)</br>Add a (time,y) data to serie. |
| `AddData()` |public SerieData AddData(int serieIndex, double data, string dataName = null, string dataId = null)</br>Add a data to serie. |
| `AddData()` |public SerieData AddData(int serieIndex, double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)</br> |
| `AddData()` |public SerieData AddData(int serieIndex, double xValue, double yValue, string dataName = null, string dataId = null)</br>Add a (x,y) data to serie. |
| `AddData()` |public SerieData AddData(int serieIndex, List<double> multidimensionalData, string dataName = null, string dataId = null)</br>Add an arbitray dimension data to serie,such as (x,y,z,...). |
| `AddData()` |public SerieData AddData(string serieName, DateTime time, double yValue, string dataName = null, string dataId = null)</br>Add a (time,y) data to serie. |
| `AddData()` |public SerieData AddData(string serieName, double data, string dataName = null, string dataId = null)</br>Add a data to serie. |
| `AddData()` |public SerieData AddData(string serieName, double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)</br> |
| `AddData()` |public SerieData AddData(string serieName, double xValue, double yValue, string dataName = null, string dataId = null)</br>Add a (x,y) data to serie. |
@@ -338,7 +343,7 @@ Inherits or Implemented: [BaseChart](#BaseChart)
| `GetMaxDivisibleValue()` |public static double GetMaxDivisibleValue(double max, int ceilRate)</br> |
| `GetMaxLogValue()` |public static double GetMaxLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)</br> |
| `GetMinDivisibleValue()` |public static double GetMinDivisibleValue(double min, int ceilRate)</br> |
| `GetMinLogValue()` |public static float GetMinLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)</br> |
| `GetMinLogValue()` |public static double GetMinLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)</br> |
| `GetPointList()` |public static void GetPointList(ref List<Vector3> posList, Vector3 sp, Vector3 ep, float k = 30f)</br> |
| `GetPos()` |public static Vector3 GetPos(Vector3 center, float radius, float angle, bool isDegree = false)</br> |
| `GetPosition()` |public static Vector3 GetPosition(Vector3 center, float angle, float radius)</br> |
@@ -483,6 +488,7 @@ Inherits or Implemented: [Attribute](#Attribute)
|public method|description|
|--|--|
| `NeedFormat()` |public static bool NeedFormat(string content)</br> |
| `ReplaceAxisLabelContent()` |public static void ReplaceAxisLabelContent(ref string content, string numericFormatter, double value)</br> |
| `ReplaceAxisLabelContent()` |public static void ReplaceAxisLabelContent(ref string content, string value)</br> |
| `TrimAndReplaceLine()` |public static string TrimAndReplaceLine(string content)</br> |
@@ -496,6 +502,14 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
Inherits or Implemented: [BaseChart](#BaseChart)
## `IgnoreDoc`
Inherits or Implemented: [Attribute](#Attribute)
|public method|description|
|--|--|
| `IgnoreDoc()` |public IgnoreDoc()</br> |
## `InteractData`
|public method|description|
@@ -529,7 +543,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
|--|--|
| `CheckDataHighlighted()` |public static bool CheckDataHighlighted(Serie serie, string legendName, bool heighlight)</br> |
| `CheckDataShow()` |public static bool CheckDataShow(Serie serie, string legendName, bool show)</br> |
| `GetContentColor()` |public static Color GetContentColor(int legendIndex, Legend legend, ThemeStyle theme, bool active)</br> |
| `GetContentColor()` |public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)</br> |
| `GetIconColor()` |public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)</br> |
| `ResetItemPosition()` |public static void ResetItemPosition(Legend legend, Vector3 chartPos, float chartWidth, float chartHeight)</br> |
@@ -691,7 +705,6 @@ Inherits or Implemented: [BaseChart](#BaseChart)
|public method|description|
|--|--|
| `CopyFolder()` |public static bool CopyFolder(string sourPath, string destPath)</br> |
| `GetAllAssemblyTypes()` |public static IEnumerable<Type> GetAllAssemblyTypes()</br> |
| `GetAllTypesDerivedFrom()` |public static IEnumerable<Type> GetAllTypesDerivedFrom(Type type)</br> |
| `GetAllTypesDerivedFrom<T>()` |public static IEnumerable<Type> GetAllTypesDerivedFrom<T>()</br> |
@@ -721,6 +734,38 @@ Inherits or Implemented: [Attribute](#Attribute)
|--|--|
| `Reset()` |public void Reset()</br> |
## `SerieDataExtraComponentAttribute`
Inherits or Implemented: [Attribute](#Attribute)
|public method|description|
|--|--|
| `Contains()` |public bool Contains(Type type)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute()</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7)</br> |
## `SerieDataExtraFieldAttribute`
Inherits or Implemented: [Attribute](#Attribute)
|public method|description|
|--|--|
| `Contains()` |public bool Contains(string field)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute()</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6, string field7)</br> |
## `SerieExtraComponentAttribute`
Inherits or Implemented: [Attribute](#Attribute)
@@ -745,6 +790,7 @@ Inherits or Implemented: [SerieHandler where T](#SerieHandler where T),[Serie](#
|public method|description|
|--|--|
| `GetSerieDataAutoColor()` |public virtual Color GetSerieDataAutoColor(SerieData serieData)</br> |
| `GetSerieDataLabelOffset()` |public virtual Vector3 GetSerieDataLabelOffset(SerieData serieData, LabelStyle label)</br> |
| `GetSerieDataLabelPosition()` |public virtual Vector3 GetSerieDataLabelPosition(SerieData serieData, LabelStyle label)</br> |
| `GetSerieDataTitlePosition()` |public virtual Vector3 GetSerieDataTitlePosition(SerieData serieData, TitleStyle titleStyle)</br> |
@@ -777,13 +823,13 @@ Inherits or Implemented: [Attribute](#Attribute)
| `GetAreaStyle()` |public static AreaStyle GetAreaStyle(Serie serie, SerieData serieData)</br> |
| `GetAreaToColor()` |public static Color32 GetAreaToColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)</br> |
| `GetAverageData()` |public static double GetAverageData(Serie serie, int dimension = 1, DataZoom dataZoom = null)</br> |
| `GetItemColor()` |public static Color32 GetItemColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)</br> |
| `GetItemColor()` |public static Color32 GetItemColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight, bool opacity = true)</br> |
| `GetItemColor0()` |public static Color32 GetItemColor0(Serie serie, SerieData serieData, ThemeStyle theme, bool highlight, Color32 defaultColor)</br> |
| `GetItemFormatter()` |public static string GetItemFormatter(Serie serie, SerieData serieData, string defaultFormatter = null)</br> |
| `GetItemMarker()` |public static string GetItemMarker(Serie serie, SerieData serieData, string defaultMarker = null)</br> |
| `GetItemStyle()` |public static ItemStyle GetItemStyle(Serie serie, SerieData serieData, bool highlight = false)</br> |
| `GetItemStyleEmphasis()` |public static ItemStyle GetItemStyleEmphasis(Serie serie, SerieData serieData)</br> |
| `GetItemToColor()` |public static Color32 GetItemToColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)</br> |
| `GetItemToColor()` |public static Color32 GetItemToColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight, bool opacity = true)</br> |
| `GetLineColor()` |public static Color32 GetLineColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)</br> |
| `GetLineStyle()` |public static LineStyle GetLineStyle(Serie serie, SerieData serieData)</br> |
| `GetMaxData()` |public static double GetMaxData(Serie serie, int dimension = 1, DataZoom dataZoom = null)</br> |

View File

@@ -33,6 +33,7 @@
- [FormatterHelper](#FormatterHelper)
- [GridCoordContext](#GridCoordContext)
- [HeatmapChart](#HeatmapChart)
- [IgnoreDoc](#IgnoreDoc)
- [InteractData](#InteractData)
- [LayerHelper](#LayerHelper)
- [LegendContext](#LegendContext)
@@ -65,6 +66,8 @@
- [SerieContext](#SerieContext)
- [SerieConvertAttribute](#SerieConvertAttribute)
- [SerieDataContext](#SerieDataContext)
- [SerieDataExtraComponentAttribute](#SerieDataExtraComponentAttribute)
- [SerieDataExtraFieldAttribute](#SerieDataExtraFieldAttribute)
- [SerieExtraComponentAttribute](#SerieExtraComponentAttribute)
- [SerieHandler](#SerieHandler)
- [SerieHandler<T>](#SerieHandler<T>)
@@ -144,10 +147,12 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver
|public method|description|
|--|--|
| `AddChartComponent()` |public MainComponent AddChartComponent(Type type)</br> |
| `AddData()` |public SerieData AddData(int serieIndex, DateTime time, double yValue, string dataName = null, string dataId = null)</br>添加time,y数据到指定的系列中。 |
| `AddData()` |public SerieData AddData(int serieIndex, double data, string dataName = null, string dataId = null)</br>添加一个数据到指定的系列中。 |
| `AddData()` |public SerieData AddData(int serieIndex, double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)</br> |
| `AddData()` |public SerieData AddData(int serieIndex, double xValue, double yValue, string dataName = null, string dataId = null)</br>添加x,y数据到指定系列中。 |
| `AddData()` |public SerieData AddData(int serieIndex, List<double> multidimensionalData, string dataName = null, string dataId = null)</br>添加多维数据x,y,z...)到指定的系列中。 |
| `AddData()` |public SerieData AddData(string serieName, DateTime time, double yValue, string dataName = null, string dataId = null)</br>添加time,y数据到指定的系列中。 |
| `AddData()` |public SerieData AddData(string serieName, double data, string dataName = null, string dataId = null)</br>If serieName doesn't exist in legend,will be add to legend. |
| `AddData()` |public SerieData AddData(string serieName, double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)</br> |
| `AddData()` |public SerieData AddData(string serieName, double xValue, double yValue, string dataName = null, string dataId = null)</br>添加x,y数据到指定系列中。 |
@@ -338,7 +343,7 @@ Inherits or Implemented: [BaseChart](#BaseChart)
| `GetMaxDivisibleValue()` |public static double GetMaxDivisibleValue(double max, int ceilRate)</br> |
| `GetMaxLogValue()` |public static double GetMaxLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)</br> |
| `GetMinDivisibleValue()` |public static double GetMinDivisibleValue(double min, int ceilRate)</br> |
| `GetMinLogValue()` |public static float GetMinLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)</br> |
| `GetMinLogValue()` |public static double GetMinLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)</br> |
| `GetPointList()` |public static void GetPointList(ref List<Vector3> posList, Vector3 sp, Vector3 ep, float k = 30f)</br> |
| `GetPos()` |public static Vector3 GetPos(Vector3 center, float radius, float angle, bool isDegree = false)</br> |
| `GetPosition()` |public static Vector3 GetPosition(Vector3 center, float angle, float radius)</br> |
@@ -483,6 +488,7 @@ Inherits or Implemented: [Attribute](#Attribute)
|public method|description|
|--|--|
| `NeedFormat()` |public static bool NeedFormat(string content)</br> |
| `ReplaceAxisLabelContent()` |public static void ReplaceAxisLabelContent(ref string content, string numericFormatter, double value)</br> |
| `ReplaceAxisLabelContent()` |public static void ReplaceAxisLabelContent(ref string content, string value)</br> |
| `TrimAndReplaceLine()` |public static string TrimAndReplaceLine(string content)</br> |
@@ -496,6 +502,14 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
Inherits or Implemented: [BaseChart](#BaseChart)
## `IgnoreDoc`
Inherits or Implemented: [Attribute](#Attribute)
|public method|description|
|--|--|
| `IgnoreDoc()` |public IgnoreDoc()</br> |
## `InteractData`
|public method|description|
@@ -529,7 +543,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
|--|--|
| `CheckDataHighlighted()` |public static bool CheckDataHighlighted(Serie serie, string legendName, bool heighlight)</br> |
| `CheckDataShow()` |public static bool CheckDataShow(Serie serie, string legendName, bool show)</br> |
| `GetContentColor()` |public static Color GetContentColor(int legendIndex, Legend legend, ThemeStyle theme, bool active)</br> |
| `GetContentColor()` |public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)</br> |
| `GetIconColor()` |public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)</br> |
| `ResetItemPosition()` |public static void ResetItemPosition(Legend legend, Vector3 chartPos, float chartWidth, float chartHeight)</br> |
@@ -691,7 +705,6 @@ Inherits or Implemented: [BaseChart](#BaseChart)
|public method|description|
|--|--|
| `CopyFolder()` |public static bool CopyFolder(string sourPath, string destPath)</br> |
| `GetAllAssemblyTypes()` |public static IEnumerable<Type> GetAllAssemblyTypes()</br> |
| `GetAllTypesDerivedFrom()` |public static IEnumerable<Type> GetAllTypesDerivedFrom(Type type)</br> |
| `GetAllTypesDerivedFrom<T>()` |public static IEnumerable<Type> GetAllTypesDerivedFrom<T>()</br> |
@@ -721,6 +734,38 @@ Inherits or Implemented: [Attribute](#Attribute)
|--|--|
| `Reset()` |public void Reset()</br> |
## `SerieDataExtraComponentAttribute`
Inherits or Implemented: [Attribute](#Attribute)
|public method|description|
|--|--|
| `Contains()` |public bool Contains(Type type)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute()</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6)</br> |
| `SerieDataExtraComponentAttribute()` |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7)</br> |
## `SerieDataExtraFieldAttribute`
Inherits or Implemented: [Attribute](#Attribute)
|public method|description|
|--|--|
| `Contains()` |public bool Contains(string field)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute()</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6)</br> |
| `SerieDataExtraFieldAttribute()` |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6, string field7)</br> |
## `SerieExtraComponentAttribute`
Inherits or Implemented: [Attribute](#Attribute)
@@ -745,6 +790,7 @@ Inherits or Implemented: [SerieHandler where T](#SerieHandler where T),[Serie](#
|public method|description|
|--|--|
| `GetSerieDataAutoColor()` |public virtual Color GetSerieDataAutoColor(SerieData serieData)</br> |
| `GetSerieDataLabelOffset()` |public virtual Vector3 GetSerieDataLabelOffset(SerieData serieData, LabelStyle label)</br> |
| `GetSerieDataLabelPosition()` |public virtual Vector3 GetSerieDataLabelPosition(SerieData serieData, LabelStyle label)</br> |
| `GetSerieDataTitlePosition()` |public virtual Vector3 GetSerieDataTitlePosition(SerieData serieData, TitleStyle titleStyle)</br> |
@@ -777,13 +823,13 @@ Inherits or Implemented: [Attribute](#Attribute)
| `GetAreaStyle()` |public static AreaStyle GetAreaStyle(Serie serie, SerieData serieData)</br> |
| `GetAreaToColor()` |public static Color32 GetAreaToColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)</br> |
| `GetAverageData()` |public static double GetAverageData(Serie serie, int dimension = 1, DataZoom dataZoom = null)</br> |
| `GetItemColor()` |public static Color32 GetItemColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)</br> |
| `GetItemColor()` |public static Color32 GetItemColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight, bool opacity = true)</br> |
| `GetItemColor0()` |public static Color32 GetItemColor0(Serie serie, SerieData serieData, ThemeStyle theme, bool highlight, Color32 defaultColor)</br> |
| `GetItemFormatter()` |public static string GetItemFormatter(Serie serie, SerieData serieData, string defaultFormatter = null)</br> |
| `GetItemMarker()` |public static string GetItemMarker(Serie serie, SerieData serieData, string defaultMarker = null)</br> |
| `GetItemStyle()` |public static ItemStyle GetItemStyle(Serie serie, SerieData serieData, bool highlight = false)</br> |
| `GetItemStyleEmphasis()` |public static ItemStyle GetItemStyleEmphasis(Serie serie, SerieData serieData)</br> |
| `GetItemToColor()` |public static Color32 GetItemToColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)</br> |
| `GetItemToColor()` |public static Color32 GetItemToColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight, bool opacity = true)</br> |
| `GetLineColor()` |public static Color32 GetLineColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, bool highlight)</br> |
| `GetLineStyle()` |public static LineStyle GetLineStyle(Serie serie, SerieData serieData)</br> |
| `GetMaxData()` |public static double GetMaxData(Serie serie, int dimension = 1, DataZoom dataZoom = null)</br> |

View File

@@ -47,6 +47,7 @@
- [Axis](#Axis)
- [Background](#Background)
- [CalendarCoord](#CalendarCoord)
- [Comment](#Comment)
- [CoordSystem](#CoordSystem)
- [DataZoom](#DataZoom)
- [GridCoord](#GridCoord)
@@ -82,9 +83,14 @@
- [AxisTick](#AxisTick)
- [BaseAxisTheme](#BaseAxisTheme)
- [BaseLine](#BaseLine)
- [CommentItem](#CommentItem)
- [CommentMarkStyle](#CommentMarkStyle)
- [ComponentTheme](#ComponentTheme)
- [DataZoomTheme](#DataZoomTheme)
- [Emphasis](#Emphasis)
- [EmphasisItemStyle](#EmphasisItemStyle)
- [EmphasisLabelLine](#EmphasisLabelLine)
- [EmphasisLabelStyle](#EmphasisLabelStyle)
- [EndLabelStyle](#EndLabelStyle)
- [IconStyle](#IconStyle)
- [ImageStyle](#ImageStyle)
@@ -103,7 +109,6 @@
- [RadarAxisTheme](#RadarAxisTheme)
- [RadiusAxisTheme](#RadiusAxisTheme)
- [SerieData](#SerieData)
- [SerieDataBaseInfo](#SerieDataBaseInfo)
- [SerieSymbol](#SerieSymbol)
- [SerieTheme](#SerieTheme)
- [StageColor](#StageColor)
@@ -116,13 +121,16 @@
- [TitleStyle](#TitleStyle)
- [TitleTheme](#TitleTheme)
- [TooltipTheme](#TooltipTheme)
- [VisualMapPieces](#VisualMapPieces)
- [VisualMapRange](#VisualMapRange)
- [VisualMapTheme](#VisualMapTheme)
## ISerieExtraComponent
- [AreaStyle](#AreaStyle)
- [Emphasis](#Emphasis)
- [EmphasisItemStyle](#EmphasisItemStyle)
- [EmphasisLabelLine](#EmphasisLabelLine)
- [EmphasisLabelStyle](#EmphasisLabelStyle)
- [ImageStyle](#ImageStyle)
- [LabelLine](#LabelLine)
- [LabelStyle](#LabelStyle)
@@ -133,12 +141,14 @@
- [AreaStyle](#AreaStyle)
- [Emphasis](#Emphasis)
- [EmphasisItemStyle](#EmphasisItemStyle)
- [EmphasisLabelLine](#EmphasisLabelLine)
- [EmphasisLabelStyle](#EmphasisLabelStyle)
- [ImageStyle](#ImageStyle)
- [ItemStyle](#ItemStyle)
- [LabelLine](#LabelLine)
- [LabelStyle](#LabelStyle)
- [LineStyle](#LineStyle)
- [SerieDataBaseInfo](#SerieDataBaseInfo)
- [SerieSymbol](#SerieSymbol)
- [TitleStyle](#TitleStyle)
@@ -190,7 +200,6 @@ the animation of serie.
| `dataChangeEnable` |true | 是否开启数据变更动画。 |
| `dataChangeDuration` |500 | The milliseconds duration of the data change animation. |
| `actualDuration` | | The milliseconds actual duration of the first animation. |
| `alongWithLinePath` | | |
## `AreaStyle`
@@ -240,7 +249,7 @@ The axis in rectangular coordinate.
| `max` | | The maximum value of axis.Valid when `minMaxType` is `Custom` |
| `splitNumber` |0 | Number of segments that the axis is split into. |
| `interval` |0 | Compulsively set segmentation interval for axis.This is unavailable for category axis. |
| `boundaryGap` |true | |
| `boundaryGap` |true | The boundary gap on both sides of a coordinate axis, which is valid only for category axis with type: 'Category'. |
| `maxCache` |0 | The max number of axis data cache. |
| `logBase` |10 | Base of logarithm, which is valid only for numeric axes with type: 'Log'. |
| `logBaseE` |false | On the log axis, if base e is the natural number, and is true, logBase fails. |
@@ -250,7 +259,7 @@ The axis in rectangular coordinate.
| `insertDataToHead` | | Whether to add new data at the head or at the end of the list. |
| `icons` | | 类目数据对应的图标。 |
| `data` | | Category data, available in type: 'Category' axis. |
| `axisLine` | | [AxisLine](AxisLine)|
| `axisLine` | | axis Line. [AxisLine](AxisLine)|
| `axisName` | | axis name. [AxisName](AxisName)|
| `axisTick` | | axis tick. [AxisTick](AxisTick)|
| `axisLabel` | | axis label. [AxisLabel](AxisLabel)|
@@ -306,7 +315,7 @@ Split area of axis in grid area, not shown by default.
|field|default|comment|
|--|--|--|
| `show` | | Set this to true to show the splitArea. |
| `color` | | Color of split area. SplitArea color could also be set in color array, which the split lines would take as their colors in turns. |
| `color` | | Color of split area. SplitArea color could also be set in color array, which the split lines would take as their colors in turns. Dark and light colors in turns are used by default. |
## `AxisSplitLine`
@@ -316,9 +325,9 @@ Split line of axis in grid area.
|field|default|comment|
|--|--|--|
| `interval` | | |
| `interval` | | Interval of Axis splitLine. |
| `distance` | | The distance between the split line and axis line. |
| `autoColor` | | |
| `autoColor` | | auto color. |
## `AxisTheme`
@@ -353,7 +362,7 @@ Background component.
| `image` | | the image of background. |
| `imageType` | | the fill type of background image. |
| `imageColor` | | 背景图颜色。 |
| `hideThemeBackgroundColor` |true | Whether to hide the background color set in the theme when the background component is on. |
| `autoColor` |true | Whether to use theme background color for component color when the background component is on. |
## `Bar`
@@ -414,6 +423,45 @@ Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContai
## `ChildComponent`
## `Comment`
Inherits or Implemented: [MainComponent](#MainComponent)
comment of chart.
|field|default|comment|
|--|--|--|
| `show` |true | Set this to false to prevent the comment from showing. |
| `labelStyle` | | The text style of all comments. [LabelStyle](LabelStyle)|
| `markStyle` | | The text style of all comments. [CommentMarkStyle](CommentMarkStyle)|
| `items` | | |
## `CommentItem`
Inherits or Implemented: [ChildComponent](#ChildComponent)
comment of chart.
|field|default|comment|
|--|--|--|
| `show` |true | Set this to false to prevent this comment item from showing. |
| `content` | | content of comment. |
| `position` | | position of comment. |
| `markRect` | | the mark rect of comment. |
| `markStyle` | | the mark rect style. [CommentMarkStyle](CommentMarkStyle)|
| `labelStyle` | | The text style of all comments. [LabelStyle](LabelStyle)|
## `CommentMarkStyle`
Inherits or Implemented: [ChildComponent](#ChildComponent)
the comment mark style.
|field|default|comment|
|--|--|--|
| `show` |true | Set this to false to prevent this comment item from showing. |
| `lineStyle` | | line style of comment mark area. [LineStyle](LineStyle)|
## `ComponentTheme`
Inherits or Implemented: [ChildComponent](#ChildComponent)
@@ -424,7 +472,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
| `textColor` | | the color of text. |
| `textBackgroundColor` | | the color of text. |
| `fontSize` |18 | the font size of text. |
| `tMPFont` | | the font of chart text。 字体。 |
| `tMPFont` | | the font of chart text。 |
## `CoordSystem`
@@ -453,7 +501,6 @@ DataZoom component is used for zooming a specific area, which enables user to in
| `showDataShadow` | | Whether to show data shadow, to indicate the data tendency in brief. |
| `showDetail` | | Whether to show detail, that is, show the detailed data information when dragging. |
| `zoomLock` | | Specify whether to lock the size of window (selected area). |
| `realtime` | | |
| `fillerColor` | | the color of dataZoom data area. |
| `borderColor` | | the color of dataZoom border. |
| `borderWidth` | | 边框宽。 |
@@ -465,8 +512,6 @@ DataZoom component is used for zooming a specific area, which enables user to in
| `rangeMode` | | Use absolute value or percent value in DataZoom.start and DataZoom.end.</br>`DataZoom.RangeMode`:</br>- `//Value`: The value type of start and end.取值类型</br>- `Percent`: percent value.</br>|
| `start` | | The start percentage of the window out of the data extent, in the range of 0 ~ 100. |
| `end` | | The end percentage of the window out of the data extent, in the range of 0 ~ 100. |
| `startValue` | | |
| `endValue` | | |
| `minShowNum` |1 | Minimum number of display data. Minimum number of data displayed when DataZoom is enlarged to maximum. |
| `scrollSensitivity` |1.1f | The sensitivity of dataZoom scroll. The larger the number, the more sensitive it is. |
| `orient` | | Specify whether the layout of dataZoom component is horizontal or vertical. What's more, it indicates whether the horizontal axis or vertical axis is controlled by default in catesian coordinate system.</br>`Orient`:</br>- `Horizonal`: 水平</br>- `Vertical`: 垂直</br>|
@@ -513,9 +558,30 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent
|--|--|--|
| `show` | | 是否启用高亮样式。 |
| `label` | | 图形文本标签。 [LabelStyle](LabelStyle)|
| `labelLine` | | [LabelLine](LabelLine)|
| `labelLine` | | 图形文本引导线样式。 [LabelLine](LabelLine)|
| `itemStyle` | | 图形样式。 [ItemStyle](ItemStyle)|
## `EmphasisItemStyle`
Inherits or Implemented: [ItemStyle](#ItemStyle),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent)
高亮的图形样式
## `EmphasisLabelLine`
Inherits or Implemented: [LabelLine](#LabelLine),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent)
高亮的标签引导线样式
## `EmphasisLabelStyle`
Inherits or Implemented: [LabelStyle](#LabelStyle),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent)
高亮的标签样式
## `EndLabelStyle`
Inherits or Implemented: [LabelStyle](#LabelStyle)
@@ -641,7 +707,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent
|field|default|comment|
|--|--|--|
| `show` |true | Whether the label line is showed. |
| `lineType` | | the type of visual guide line.</br>`LineType`:</br>- `Normal`: the normal line chart 普通折线图。</br>- `Smooth`: the smooth line chart 平滑曲线。</br>- `StepStart`: step line.</br>- `StepMiddle`: step line.</br>- `StepEnd`: step line.</br>|
| `lineType` | | the type of visual guide line.</br>`LineType`:</br>- `Normal`: the normal line chart</br>- `Smooth`: the smooth line chart</br>- `StepStart`: step line.</br>- `StepMiddle`: step line.</br>- `StepEnd`: step line.</br>|
| `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. |
@@ -660,12 +726,12 @@ Text label of chart, to explain some data information about graphic item like va
|field|default|comment|
|--|--|--|
| `show` |true | Whether the label is showed. |
| `Position` | | |
| `Position` | | The position of label. |
| `autoOffset` |false | 是否开启自动偏移。当开启时Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 |
| `offset` | | offset to the host graphic element. |
| `rotate` | | Rotation of label. |
| `distance` | | 距离轴线的距离。 |
| `formatter` | | |
| `formatter` | | formatter of label. |
| `numericFormatter` | | Standard numeric format strings. |
| `width` |0 | the width of label. If set as default value 0, it means than the label width auto set as the text width. |
| `height` |0 | the height of label. If set as default value 0, it means than the label height auto set as the text height. |
@@ -704,11 +770,13 @@ Legend component.The legend component shows different sets of tags, colors, and
| `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` | | |
| `itemOpacity` |1 | the opacity of item color. |
| `formatter` | | Legend content string template formatter. Support for wrapping lines with \n. Template:{value}. |
| `numericFormatter` | | Standard numeric format strings. |
| `labelStyle` | | the style of text. [LabelStyle](LabelStyle)|
| `data` | | Data array of legend. An array item is usually a name representing string. (If it is a pie chart, it could also be the name of a single data in the pie chart) of a series. |
| `icons` | | 自定义的图例标记图形。 |
| `colors` | | the colors of legend item. 图例标记的颜色列表。 |
## `LegendTheme`
@@ -724,9 +792,9 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
|field|default|comment|
|--|--|--|
| `label` | | [LabelStyle](LabelStyle)|
| `upperLabel` | | [LabelStyle](LabelStyle)|
| `itemStyle` | | [ItemStyle](ItemStyle)|
| `label` | | 文本标签样式。 [LabelStyle](LabelStyle)|
| `upperLabel` | | 上方的文本标签样式。 [LabelStyle](LabelStyle)|
| `itemStyle` | | 数据项样式。 [ItemStyle](ItemStyle)|
## `LevelStyle`
@@ -749,7 +817,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent
|field|default|comment|
|--|--|--|
| `show` | | Whether to show the arrow. |
| `position` | | The position of arrow.</br>`LineArrow.Position`:</br>- `End`: 末端箭头</br>- `Start`: 头端箭头</br>|
| `position` | | The position of arrow.</br>`LabelStyle.Position`:</br>- `Default`: The position of label.</br>- `Outside`: Outside of sectors of pie chart, which relates to corresponding sector through visual guide line.</br>- `Inside`: Inside the sectors of pie chart.</br>- `Center`: In the center of pie chart.</br>- `Top`: top of symbol.</br>- `Bottom`: the bottom of symbol.</br>- `Left`: the left of symbol.</br>- `Right`: the right of symbol.</br>- `Start`: the start of line.</br>- `Middle`: the middle of line.</br>- `End`: the end of line.</br>|
| `arrow` | | the arrow of line. [ArrowStyle](ArrowStyle)|
## `LineStyle`
@@ -765,8 +833,8 @@ The style of line.
| `color` | | the color of line, default use serie color. |
| `toColor` | | the middle color of line, default use serie color. |
| `toColor2` | | the end color of line, default use serie color. |
| `width` |0 | |
| `length` |0 | |
| `width` |0 | the width of line. |
| `length` |0 | the length of line. |
| `opacity` |1 | Opacity of the line. Supports value from 0 to 1, and the line will not be drawn when set to 0. |
## `Location`
@@ -792,24 +860,28 @@ Inherits or Implemented: [IComparable](#IComparable)
Inherits or Implemented: [MainComponent](#MainComponent)
Used to mark an area in chart. For example, mark a time interval.
|field|default|comment|
|--|--|--|
| `show` |true | |
| `text` | | |
| `serieIndex` |0 | |
| `start` | | [MarkAreaData](MarkAreaData)|
| `end` | | [MarkAreaData](MarkAreaData)|
| `itemStyle` | | [ItemStyle](ItemStyle)|
| `label` | | [LabelStyle](LabelStyle)|
| `show` |true | 是否显示标域。 |
| `text` | | The text of markArea. 标域显示的文本。 |
| `serieIndex` |0 | Serie index of markArea. 标域影响的Serie索引。 |
| `start` | | 标域范围的起始数据。 [MarkAreaData](MarkAreaData)|
| `end` | | 标域范围的结束数据。 [MarkAreaData](MarkAreaData)|
| `itemStyle` | | 标域样式。 [ItemStyle](ItemStyle)|
| `label` | | 标域文本样式。 [LabelStyle](LabelStyle)|
## `MarkAreaData`
Inherits or Implemented: [ChildComponent](#ChildComponent)
标域的数据。
|field|default|comment|
|--|--|--|
| `type` | | Special markArea types, are used to label maximum value, minimum value and so on.</br>`MarkAreaType`:</br>- `None`: 标域类型</br>- `Min`: 最小值。</br>- `Max`: 最大值。</br>- `Average`: 平均值。</br>- `Median`: 中位数。</br>|
| `name` | | |
| `name` | | Name of the marker, which will display as a label. |
| `dimension` |1 | From which dimension of data to calculate the maximum and minimum value and so on. |
| `xPosition` | | The x coordinate relative to the origin, in pixels. |
| `yPosition` | | The y coordinate relative to the origin, in pixels. |
@@ -825,7 +897,7 @@ Use a line in the chart to illustrate.
|field|default|comment|
|--|--|--|
| `show` |true | Whether to display the marking line. |
| `serieIndex` |0 | |
| `serieIndex` |0 | The serie index of markLine. |
| `animation` | | The animation of markline. [AnimationStyle](AnimationStyle)|
| `data` | | A list of marked data. When the group of data item is 0, each data item represents a line; When the group is not 0, two data items of the same group represent the starting point and the ending point of the line respectively to form a line. In this case, the relevant style parameters of the line are the parameters of the starting point. |
@@ -833,12 +905,12 @@ Use a line in the chart to illustrate.
Inherits or Implemented: [ChildComponent](#ChildComponent)
Data of marking line. 图表标线的数据。
Data of marking line.
|field|default|comment|
|--|--|--|
| `type` | | Special label types, are used to label maximum value, minimum value and so on.</br>`MarkLineType`:</br>- `None`: 标线类型</br>- `Min`: 最小值。</br>- `Max`: 最大值。</br>- `Average`: 平均值。</br>- `Median`: 中位数。</br>|
| `name` | | |
| `name` | | Name of the marker, which will display as a label. |
| `dimension` |1 | From which dimension of data to calculate the maximum and minimum value and so on. |
| `xPosition` | | The x coordinate relative to the origin, in pixels. |
| `yPosition` | | The y coordinate relative to the origin, in pixels. |
@@ -850,7 +922,6 @@ Data of marking line. 图表标线的数据。
| `endSymbol` | | The symbol of the end point of markline. [SymbolStyle](SymbolStyle)|
| `lineStyle` | | The line style of markline. [LineStyle](LineStyle)|
| `label` | | Text styles of label. You can set position to Start, Middle, and End to display text in different locations. [LabelStyle](LabelStyle)|
| `emphasis` | | [Emphasis](Emphasis)|
## `Parallel`
@@ -948,13 +1019,6 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
|field|default|comment|
|--|--|--|
| `labels` | | |
| `labelLines` | | |
| `endLabels` | | |
| `lineArrows` | | |
| `areaStyles` | | |
| `titleStyles` | | |
| `emphases` | | |
| `index` | | The index of serie. |
| `show` |true | Whether to show serie in chart. |
| `coordSystem` | | the chart coord system of serie. |
@@ -970,15 +1034,15 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `parallelIndex` |0 | Index of parallel coord component that serie uses. |
| `minShow` | | The min number of data to show in chart. |
| `maxShow` | | The max number of data to show in chart. |
| `maxCache` | | The max number of serie data cache. |
| `maxCache` | | The max number of serie data cache. The first data will be remove when the size of serie data is larger then maxCache. |
| `sampleDist` |0 | the min pixel dist of sample. |
| `sampleType` | | the type of sample.</br>`SampleType`:</br>- `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.</br>- `Average`: Take the average of the filter points.</br>- `Max`: Take the maximum value of the filter point.</br>- `Min`: Take the minimum value of the filter point.</br>- `Sum`: Take the sum of the filter points.</br>|
| `sampleAverage` |0 | 设定的采样平均值。当sampleType 为 Peak 时用于和过滤数据的平均值做对比是取最大值还是最小值。默认为0时会实时计算所有数据的平均值。 |
| `lineType` | | The type of line chart.</br>`LineType`:</br>- `Normal`: the normal line chart 普通折线图。</br>- `Smooth`: the smooth line chart 平滑曲线。</br>- `StepStart`: step line.</br>- `StepMiddle`: step line.</br>- `StepEnd`: step line.</br>|
| `barType` | | 柱形图类型。</br>`BarType`:</br>- `Normal`: 普通柱形图</br>- `Zebra`: 斑马柱形图</br>- `Capsule`: 胶囊柱形图</br>|
| `lineType` | | The type of line chart.</br>`LineType`:</br>- `Normal`: the normal line chart</br>- `Smooth`: the smooth line chart</br>- `StepStart`: step line.</br>- `StepMiddle`: step line.</br>- `StepEnd`: step line.</br>|
| `barType` | | 柱形图类型。</br>`BarType`:</br>- `Normal`: normal bar.</br>- `Zebra`: zebra bar.</br>- `Capsule`: capsule bar.</br>|
| `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. |
| `barWidth` |0 | The width of the bar. Adaptive when default 0. |
| `barGap` |0.1f | The gap between bars between different series, is a percent value like '0.3f' , which means 30% of the bar width, can be set as a fixed value. Set barGap as '-1' can overlap bars that belong to different series, which is useful when making a series of bar be background. In a single coodinate system, this attribute is shared by multiple 'bar' series. This attribute should be set on the last 'bar' series in the coodinate system, then it will be adopted by all 'bar' series in the coordinate system. |
| `barZebraWidth` |4f | 斑马线的粗细。 |
| `barZebraGap` |2f | 斑马线的间距。 |
| `min` | | 最小值。 |
@@ -992,13 +1056,12 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `roundCap` | | 是否开启圆弧效果。 |
| `splitNumber` | | 刻度分割段数。最大可设置36。 |
| `clickOffset` |true | Whether offset when mouse click pie chart item. |
| `roseType` | | Whether to show as Nightingale chart.</br>`RoseType`:</br>- `None`: Don't show as Nightingale chart.不展示成南丁格尔玫瑰图</br>- `Radius`: Use central angle to show the percentage of data, radius to show data size.</br>- `Area`: All the sectors will share the same central angle, the data size is shown only through radiuses.</br>|
| `roseType` | | Whether to show as Nightingale chart.</br>`RoseType`:</br>- `None`: Don't show as Nightingale chart.</br>- `Radius`: Use central angle to show the percentage of data, radius to show data size.</br>- `Area`: All the sectors will share the same central angle, the data size is shown only through radiuses.</br>|
| `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才有效。 |
@@ -1007,7 +1070,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `large` |true | 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。 开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。 缺点优化后不能自定义设置单个数据项的样式不能显示Label。 |
| `largeThreshold` |200 | 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 |
| `avoidLabelOverlap` |false | 在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。 |
| `radarType` | | 雷达图类型。</br>`RadarType`:</br>- `Multiple`: 多圈雷达图。此时可一个雷达里绘制多个圈一个serieData就可组成一个圈多维数据。</br>- `Single`: 单圈雷达图。此时一个雷达只能绘制一个圈多个serieData组成一个圈数据取自`data[1]`</br>|
| `radarType` | | 雷达图类型。</br>`RadarType`:</br>- `Multiple`: multiple radar.</br>- `Single`: single radar.</br>|
| `placeHolder` |false | 占位模式。占位模式时,数据有效但不参与渲染和显示。 |
| `dataSortType` | | 组件的数据排序。</br>`SerieDataSortType`:</br>- `None`: 按 data 的顺序</br>- `Ascending`: 升序</br>- `Descending`: 降序</br>|
| `orient` | | 组件的朝向。</br>`Orient`:</br>- `Horizonal`: 水平</br>- `Vertical`: 垂直</br>|
@@ -1031,32 +1094,14 @@ A data item of serie.
|field|default|comment|
|--|--|--|
| `index` | | |
| `index` | | the index of SerieData. |
| `name` | | the name of data item. |
| `id` | | 数据项的唯一id。唯一id不是必须设置的。 |
| `parentId` | | |
| `baseInfos` | | |
| `itemStyles` | | |
| `labels` | | |
| `labelLines` | | |
| `emphases` | | |
| `symbols` | | |
| `lineStyles` | | |
| `areaStyles` | | |
| `titleStyles` | | |
| `data` | | An arbitrary dimension data list of data item. |
## `SerieDataBaseInfo`
Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent)
数据项的其他基础数据。
|field|default|comment|
|--|--|--|
| `ignore` |false | 是否忽略数据。当为 true 时,数据不进行绘制。 |
| `id` | | the id of data. |
| `parentId` | | the id of parent SerieData. |
| `ignore` | | 是否忽略数据。当为 true 时,数据不进行绘制。 |
| `selected` | | Whether the data item is selected. |
| `radius` | | 自定义半径。可用在饼图中自定义某个数据项的半径。 |
| `data` | | An arbitrary dimension data list of data item. |
## `SerieSymbol`
@@ -1145,8 +1190,8 @@ Single axis.
| `right` |0.1f | Distance between component and the right side of the container. |
| `top` |0f | Distance between component and the top side of the container. |
| `bottom` |0.2f | Distance between component and the bottom side of the container. |
| `width` |0 | |
| `height` |50 | |
| `width` |0 | width of axis. |
| `height` |50 | height of axis. |
## `SingleAxisCoord`
@@ -1183,7 +1228,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
| `height` |0f | 图形的高。 |
| `offset` |Vector2.zero | 图形的偏移。 |
| `image` | | 自定义的标记图形。 |
| `imageType` | | |
| `imageType` | | the fill type of image. |
| `color` | | 图形的颜色。 |
## `TextLimit`
@@ -1207,11 +1252,11 @@ Settings related to text.
|field|default|comment|
|--|--|--|
| `show` |true | |
| `top` |2 | |
| `right` |4 | |
| `left` |4 | |
| `bottom` |2 | |
| `show` |true | show padding. 是否显示。 |
| `top` |2 | padding of top. |
| `right` |4 | padding of right. |
| `left` |4 | padding of left. |
| `bottom` |2 | padding of bottom. |
## `TextStyle`
@@ -1232,7 +1277,7 @@ Settings related to text.
| `fontStyle` | | font style. |
| `lineSpacing` |1f | text line spacing. |
| `alignment` | | 对齐方式。 |
| `tMPFont` | | |
| `tMPFont` | | the font of textmeshpro. |
| `tMPFontStyle` | | |
| `tMPAlignment` | | |
@@ -1245,9 +1290,9 @@ Theme.
|field|default|comment|
|--|--|--|
| `themeType` | | the theme of chart.</br>`ThemeType`:</br>- `Default`: 默认主题。</br>- `Light`: 亮主题。</br>- `Dark`: 暗主题。</br>- `Custom`: 自定义主题。</br>|
| `themeName` | | |
| `font` | | the font of chart text。 字体。 |
| `tMPFont` | | the font of chart text。 字体。 |
| `themeName` | | the name of theme. |
| `font` | | the font of chart text。 |
| `tMPFont` | | the font of chart text。 |
| `contrastColor` | | the contrast color of chart. |
| `backgroundColor` | | the background color of chart. |
| `colorPalette` | | The color list of palette. If no color is set in series, the colors would be adopted sequentially and circularly from this list as the colors of series. |
@@ -1316,8 +1361,8 @@ Tooltip component.
| `show` |true | Whether to show the tooltip component. |
| `type` | | Indicator type.</br>`Painter.Type`:</br>- `Base`: </br>- `Serie`: </br>- `Top`: </br>|
| `trigger` | | Type of triggering.</br>`Tooltip.Trigger`:</br>- `Item`: Triggered by data item, which is mainly used for charts that don't have a category axis like scatter charts or pie charts.</br>- `Axis`: Triggered by axes, which is mainly used for charts that have category axes, like bar charts or line charts.</br>- `None`: Trigger nothing.</br>|
| `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` | | |
| `itemFormatter` | | a string template formatter for a single Serie or data item content. Support for wrapping lines with \n. 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> {f} is sum of data.</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> |
| `titleFormatter` | | The string template formatter for the tooltip title content. Support for wrapping lines with \n. The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. Template see itemFormatter. |
| `marker` | | the marker of serie. |
| `fixedWidth` |0 | Fixed width. Higher priority than minWidth. |
| `fixedHeight` |0 | Fixed height. Higher priority than minHeight. |
@@ -1335,17 +1380,17 @@ Tooltip component.
| `backgroundType` | | The background type of tooltip. |
| `backgroundColor` | | The background color of tooltip. |
| `borderWidth` |2f | the width of tooltip border. |
| `fixedXEnable` |false | |
| `fixedX` |0f | |
| `fixedYEnable` |false | |
| `fixedY` |0f | |
| `titleHeight` |25f | |
| `itemHeight` |25f | |
| `fixedXEnable` |false | enable fixedX. |
| `fixedX` |0f | the x positionn of fixedX. |
| `fixedYEnable` |false | enable fixedY. |
| `fixedY` |0f | the y position of fixedY. |
| `titleHeight` |25f | height of title text. |
| `itemHeight` |25f | height of content text. |
| `borderColor` |Color32(230, 230, 230, 255) | the color of tooltip border. |
| `lineStyle` | | the line style of indicator line. [LineStyle](LineStyle)|
| `indicatorLabelStyle` | | the label style of tooltip axis indicator label. [LabelStyle](LabelStyle)|
| `titleLabelStyle` | | 标题的文本样式。 [LabelStyle](LabelStyle)|
| `contentLabelStyles` | | |
| `titleLabelStyle` | | the textstyle of title. [LabelStyle](LabelStyle)|
| `contentLabelStyles` | | the textstyle list of content. |
## `TooltipTheme`
@@ -1392,11 +1437,10 @@ VisualMap component. Mapping data to visual elements such as colors.
| `location` | | The location of component. [Location](Location)|
| `workOnLine` |true | Whether the visualmap is work on linestyle of linechart. |
| `workOnArea` |false | Whether the visualmap is work on areaStyle of linechart. |
| `inRange` | | Defines the visual color in the selected range. |
| `outOfRange` | | Defines a visual color outside of the selected range. |
| `pieces` | | 分段式每一段的相关配置。 |
| `inRange` | | 分段式每一段的相关配置。 |
## `VisualMapPieces`
## `VisualMapRange`
Inherits or Implemented: [ChildComponent](#ChildComponent)
@@ -1437,7 +1481,7 @@ Inherits or Implemented: [ScriptableObject](#ScriptableObject)
| `lang` | | [Lang](Lang)|
| `font` | | |
| `tMPFont` | | |
| `fontSizeLv1` |28 | |
| `fontSizeLv1` |28 | 一级字体大小。 |
| `fontSizeLv2` |24 | |
| `fontSizeLv3` |20 | |
| `fontSizeLv4` |18 | |

View File

@@ -47,6 +47,7 @@
- [Axis](#Axis)
- [Background](#Background)
- [CalendarCoord](#CalendarCoord)
- [Comment](#Comment)
- [CoordSystem](#CoordSystem)
- [DataZoom](#DataZoom)
- [GridCoord](#GridCoord)
@@ -82,9 +83,14 @@
- [AxisTick](#AxisTick)
- [BaseAxisTheme](#BaseAxisTheme)
- [BaseLine](#BaseLine)
- [CommentItem](#CommentItem)
- [CommentMarkStyle](#CommentMarkStyle)
- [ComponentTheme](#ComponentTheme)
- [DataZoomTheme](#DataZoomTheme)
- [Emphasis](#Emphasis)
- [EmphasisItemStyle](#EmphasisItemStyle)
- [EmphasisLabelLine](#EmphasisLabelLine)
- [EmphasisLabelStyle](#EmphasisLabelStyle)
- [EndLabelStyle](#EndLabelStyle)
- [IconStyle](#IconStyle)
- [ImageStyle](#ImageStyle)
@@ -103,7 +109,6 @@
- [RadarAxisTheme](#RadarAxisTheme)
- [RadiusAxisTheme](#RadiusAxisTheme)
- [SerieData](#SerieData)
- [SerieDataBaseInfo](#SerieDataBaseInfo)
- [SerieSymbol](#SerieSymbol)
- [SerieTheme](#SerieTheme)
- [StageColor](#StageColor)
@@ -116,13 +121,16 @@
- [TitleStyle](#TitleStyle)
- [TitleTheme](#TitleTheme)
- [TooltipTheme](#TooltipTheme)
- [VisualMapPieces](#VisualMapPieces)
- [VisualMapRange](#VisualMapRange)
- [VisualMapTheme](#VisualMapTheme)
## ISerieExtraComponent Serie额外组件
- [AreaStyle](#AreaStyle)
- [Emphasis](#Emphasis)
- [EmphasisItemStyle](#EmphasisItemStyle)
- [EmphasisLabelLine](#EmphasisLabelLine)
- [EmphasisLabelStyle](#EmphasisLabelStyle)
- [ImageStyle](#ImageStyle)
- [LabelLine](#LabelLine)
- [LabelStyle](#LabelStyle)
@@ -133,12 +141,14 @@
- [AreaStyle](#AreaStyle)
- [Emphasis](#Emphasis)
- [EmphasisItemStyle](#EmphasisItemStyle)
- [EmphasisLabelLine](#EmphasisLabelLine)
- [EmphasisLabelStyle](#EmphasisLabelStyle)
- [ImageStyle](#ImageStyle)
- [ItemStyle](#ItemStyle)
- [LabelLine](#LabelLine)
- [LabelStyle](#LabelStyle)
- [LineStyle](#LineStyle)
- [SerieDataBaseInfo](#SerieDataBaseInfo)
- [SerieSymbol](#SerieSymbol)
- [TitleStyle](#TitleStyle)
@@ -190,7 +200,6 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
| `dataChangeEnable` |true | 是否开启数据变更动画。 |
| `dataChangeDuration` |500 | 数据变更的动画时长(毫秒)。 |
| `actualDuration` | | 实际的动画时长(毫秒)。 |
| `alongWithLinePath` | | |
## `AreaStyle`
@@ -240,7 +249,7 @@ Inherits or Implemented: [MainComponent](#MainComponent)
| `max` | | 设定的坐标轴刻度最大值当minMaxType为Custom时有效。 |
| `splitNumber` |0 | 坐标轴的期望的分割段数。默认为0表示自动分割。 |
| `interval` |0 | 强制设置坐标轴分割间隔。无法在类目轴中使用。 |
| `boundaryGap` |true | |
| `boundaryGap` |true | 坐标轴两边是否留白。只对类目轴有效。 |
| `maxCache` |0 | The first data will be remove when the size of axis data is larger then maxCache. |
| `logBase` |10 | 对数轴的底数只在对数轴type:'Log')中有效。 |
| `logBaseE` |false | 对数轴是否以自然数 e 为底数,为 true 时 logBase 失效。 |
@@ -250,7 +259,7 @@ Inherits or Implemented: [MainComponent](#MainComponent)
| `insertDataToHead` | | 添加新数据时是在列表的头部还是尾部加入。 |
| `icons` | | 类目数据对应的图标。 |
| `data` | | 类目数据在类目轴type: 'category')中有效。 |
| `axisLine` | | [AxisLine](AxisLine)|
| `axisLine` | | 坐标轴轴线。 [AxisLine](AxisLine)|
| `axisName` | | 坐标轴名称。 [AxisName](AxisName)|
| `axisTick` | | 坐标轴刻度。 [AxisTick](AxisTick)|
| `axisLabel` | | 坐标轴刻度标签。 [AxisLabel](AxisLabel)|
@@ -306,7 +315,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
|field|default|comment|
|--|--|--|
| `show` | | 是否显示分隔区域。 |
| `color` | | Dark and light colors in turns are used by default. |
| `color` | | 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。 |
## `AxisSplitLine`
@@ -316,9 +325,9 @@ Inherits or Implemented: [BaseLine](#BaseLine)
|field|default|comment|
|--|--|--|
| `interval` | | |
| `interval` | | 坐标轴分隔线的显示间隔。 |
| `distance` | | 刻度线与轴线的距离。 |
| `autoColor` | | |
| `autoColor` | | 自动设置颜色。 |
## `AxisTheme`
@@ -353,7 +362,7 @@ Inherits or Implemented: [MainComponent](#MainComponent)
| `image` | | 背景图。 |
| `imageType` | | 背景图填充类型。 |
| `imageColor` | | 背景图颜色。 |
| `hideThemeBackgroundColor` |true | 当background组件开启时是否隐藏主题中设置的背景色。 |
| `autoColor` |true | 当background组件开启时是否自动使用主题背景色作为backgrounnd组件的颜色。当设置为false时用imageColor作为颜色。 |
## `Bar`
@@ -414,6 +423,45 @@ Inherits or Implemented: [Serie](#Serie),[INeedSerieContainer](#INeedSerieContai
## `ChildComponent`
## `Comment`
Inherits or Implemented: [MainComponent](#MainComponent)
图表注解组件。
|field|default|comment|
|--|--|--|
| `show` |true | 是否显示注解组件。 |
| `labelStyle` | | 所有组件的文本样式。 [LabelStyle](LabelStyle)|
| `markStyle` | | 所有组件的文本样式。 [CommentMarkStyle](CommentMarkStyle)|
| `items` | | |
## `CommentItem`
Inherits or Implemented: [ChildComponent](#ChildComponent)
注解项。
|field|default|comment|
|--|--|--|
| `show` |true | 是否显示当前注解项。 |
| `content` | | 注解的文本内容。支持模板参数可以参考Tooltip的itemFormatter。 |
| `position` | | 注解项的位置坐标。 |
| `markRect` | | 注解区域。 |
| `markStyle` | | 注解标记区域样式。 [CommentMarkStyle](CommentMarkStyle)|
| `labelStyle` | | 注解项的文本样式。 [LabelStyle](LabelStyle)|
## `CommentMarkStyle`
Inherits or Implemented: [ChildComponent](#ChildComponent)
注解项区域样式。
|field|default|comment|
|--|--|--|
| `show` |true | 是否显示当前注解项。 |
| `lineStyle` | | 线条样式。 [LineStyle](LineStyle)|
## `ComponentTheme`
Inherits or Implemented: [ChildComponent](#ChildComponent)
@@ -424,7 +472,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
| `textColor` | | 文本颜色。 |
| `textBackgroundColor` | | 文本颜色。 |
| `fontSize` |18 | 文本字体大小。 |
| `tMPFont` | | the font of chart text。 字体。 |
| `tMPFont` | | 字体。 |
## `CoordSystem`
@@ -453,7 +501,6 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息
| `showDataShadow` | | 是否显示数据阴影。数据阴影可以简单地反应数据走势。 |
| `showDetail` | | 是否显示detail即拖拽时候显示详细数值信息。 |
| `zoomLock` | | 是否锁定选择区域(或叫做数据窗口)的大小。 如果设置为 true 则锁定选择区域的大小,也就是说,只能平移,不能缩放。 |
| `realtime` | | |
| `fillerColor` | | 数据区域颜色。 |
| `borderColor` | | 边框颜色。 |
| `borderWidth` | | 边框宽。 |
@@ -465,8 +512,6 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息
| `rangeMode` | | 取绝对值还是百分比。</br>`DataZoom.RangeMode`:</br>- `//Value`: The value type of start and end.取值类型</br>- `Percent`: 百分比。</br>|
| `start` | | 数据窗口范围的起始百分比。范围是0 ~ 100。 |
| `end` | | 数据窗口范围的结束百分比。范围是0 ~ 100。 |
| `startValue` | | |
| `endValue` | | |
| `minShowNum` |1 | 最小显示数据个数。当DataZoom放大到最大时最小显示的数据个数。 |
| `scrollSensitivity` |1.1f | 缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。 |
| `orient` | | 布局方式是横还是竖。不仅是布局方式,对于直角坐标系而言,也决定了,缺省情况控制横向数轴还是纵向数轴。</br>`Orient`:</br>- `Horizonal`: 水平</br>- `Vertical`: 垂直</br>|
@@ -513,9 +558,30 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent
|--|--|--|
| `show` | | 是否启用高亮样式。 |
| `label` | | 图形文本标签。 [LabelStyle](LabelStyle)|
| `labelLine` | | [LabelLine](LabelLine)|
| `labelLine` | | 图形文本引导线样式。 [LabelLine](LabelLine)|
| `itemStyle` | | 图形样式。 [ItemStyle](ItemStyle)|
## `EmphasisItemStyle`
Inherits or Implemented: [ItemStyle](#ItemStyle),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent)
高亮的图形样式
## `EmphasisLabelLine`
Inherits or Implemented: [LabelLine](#LabelLine),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent)
高亮的标签引导线样式
## `EmphasisLabelStyle`
Inherits or Implemented: [LabelStyle](#LabelStyle),[ISerieExtraComponent](#ISerieExtraComponent),[ISerieDataComponent](#ISerieDataComponent)
高亮的标签样式
## `EndLabelStyle`
Inherits or Implemented: [LabelStyle](#LabelStyle)
@@ -641,7 +707,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent
|field|default|comment|
|--|--|--|
| `show` |true | 是否显示视觉引导线。 |
| `lineType` | | 视觉引导线类型。</br>`LineType`:</br>- `Normal`: the normal line chart 普通折线图。</br>- `Smooth`: the smooth line chart 平滑曲线。</br>- `StepStart`: 阶梯线图:当前点。</br>- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。</br>- `StepEnd`: 阶梯线图:下一个拐点。</br>|
| `lineType` | | 视觉引导线类型。</br>`LineType`:</br>- `Normal`: 普通折线图。</br>- `Smooth`: 平滑曲线。</br>- `StepStart`: 阶梯线图:当前点。</br>- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。</br>- `StepEnd`: 阶梯线图:下一个拐点。</br>|
| `lineColor` |ChartConst.clearColor32 | 视觉引导线颜色。默认和serie一致取自调色板。 |
| `lineAngle` |0 | 视觉引导线的固定角度。对折线和曲线有效。 |
| `lineWidth` |1.0f | 视觉引导线的宽度。 |
@@ -660,12 +726,12 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent
|field|default|comment|
|--|--|--|
| `show` |true | 是否显示文本标签。 |
| `Position` | | |
| `Position` | | 标签的位置。 |
| `autoOffset` |false | 是否开启自动偏移。当开启时Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 |
| `offset` | | 距离图形元素的偏移 |
| `rotate` | | 文本的旋转。 |
| `distance` | | 距离轴线的距离。 |
| `formatter` | | |
| `formatter` | | 标签内容字符串模版格式器。支持用 \n 换行。 模板变量有: {.}:圆点标记。 {a}:系列名。 {a}:系列名。 {b}:类目值或数据名。 {c}:数据值。 {d}:百分比。 {e}:数据名。 {f}:数据和。 示例:“{b}:{c}” |
| `numericFormatter` | | 标准数字格式字符串。用于将数值格式化显示为字符串。 使用Axx的形式A是格式说明符的单字符支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明从0-99。 参考https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings |
| `width` |0 | 标签的宽度。一般不用指定,不指定时则自动是文字的宽度。 |
| `height` |0 | 标签的高度。一般不用指定,不指定时则自动是文字的高度。 |
@@ -704,11 +770,13 @@ Inherits or Implemented: [MainComponent](#MainComponent),[IPropertyChanged](#IPr
| `itemHeight` |12.0f | 图例标记的图形高度。 [default:12f] |
| `itemGap` |10f | 图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 [default:10f] |
| `itemAutoColor` |true | 图例标记的图形是否自动匹配颜色。 [default:true] |
| `textAutoColor` |false | 图例标记的文本是否自动匹配颜色。 [default:false] |
| `formatter` | | |
| `itemOpacity` |1 | 图例标记的图形的颜色透明度。 |
| `formatter` | | 图例内容字符串模版格式器。支持用 \n 换行。 模板变量为图例名称 {value}。其他模板变量参考Toolip的itemFormatter。 |
| `numericFormatter` | | 标准数字格式字符串。用于将数值格式化显示为字符串。 使用Axx的形式A是格式说明符的单字符支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明从0-99。 参考https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings |
| `labelStyle` | | 文本样式。 [LabelStyle](LabelStyle)|
| `data` | | If data is not specified, it will be auto collected from series. |
| `icons` | | 自定义的图例标记图形。 |
| `colors` | | the colors of legend item. 图例标记的颜色列表。 |
## `LegendTheme`
@@ -724,9 +792,9 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
|field|default|comment|
|--|--|--|
| `label` | | [LabelStyle](LabelStyle)|
| `upperLabel` | | [LabelStyle](LabelStyle)|
| `itemStyle` | | [ItemStyle](ItemStyle)|
| `label` | | 文本标签样式。 [LabelStyle](LabelStyle)|
| `upperLabel` | | 上方的文本标签样式。 [LabelStyle](LabelStyle)|
| `itemStyle` | | 数据项样式。 [ItemStyle](ItemStyle)|
## `LevelStyle`
@@ -749,7 +817,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent
|field|default|comment|
|--|--|--|
| `show` | | 是否显示箭头。 |
| `position` | | 箭头位置。</br>`LineArrow.Position`:</br>- `End`: 末端箭头</br>- `Start`: 头端箭头</br>|
| `position` | | 箭头位置。</br>`LabelStyle.Position`:</br>- `Default`: 标签的位置。</br>- `Outside`: 饼图扇区外侧,通过视觉引导线连到相应的扇区。</br>- `Inside`: 饼图扇区内部。</br>- `Center`: 在饼图中心位置。</br>- `Top`: 图形标志的顶部。</br>- `Bottom`: 图形标志的底部。</br>- `Left`: 图形标志的左边。</br>- `Right`: 图形标志的右边。</br>- `Start`: 线的起始点。</br>- `Middle`: 线的中点。</br>- `End`: 线的结束点。</br>|
| `arrow` | | 箭头。 [ArrowStyle](ArrowStyle)|
## `LineStyle`
@@ -765,8 +833,8 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent]
| `color` | | 线的颜色。 |
| `toColor` | | 线的渐变颜色(需要水平方向渐变时)。 |
| `toColor2` | | 线的渐变颜色2需要水平方向三个渐变色的渐变时。 |
| `width` |0 | |
| `length` |0 | |
| `width` |0 | 线宽。 |
| `length` |0 | 线长。 |
| `opacity` |1 | 线的透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 |
## `Location`
@@ -792,24 +860,28 @@ Inherits or Implemented: [IComparable](#IComparable)
Inherits or Implemented: [MainComponent](#MainComponent)
图表标域,常用于标记图表中某个范围的数据。
|field|default|comment|
|--|--|--|
| `show` |true | |
| `text` | | |
| `serieIndex` |0 | |
| `start` | | [MarkAreaData](MarkAreaData)|
| `end` | | [MarkAreaData](MarkAreaData)|
| `itemStyle` | | [ItemStyle](ItemStyle)|
| `label` | | [LabelStyle](LabelStyle)|
| `show` |true | 是否显示标域。 |
| `text` | | The text of markArea. 标域显示的文本。 |
| `serieIndex` |0 | Serie index of markArea. 标域影响的Serie索引。 |
| `start` | | 标域范围的起始数据。 [MarkAreaData](MarkAreaData)|
| `end` | | 标域范围的结束数据。 [MarkAreaData](MarkAreaData)|
| `itemStyle` | | 标域样式。 [ItemStyle](ItemStyle)|
| `label` | | 标域文本样式。 [LabelStyle](LabelStyle)|
## `MarkAreaData`
Inherits or Implemented: [ChildComponent](#ChildComponent)
标域的数据。
|field|default|comment|
|--|--|--|
| `type` | | 特殊的标域类型,用于标注最大值最小值等。</br>`MarkAreaType`:</br>- `None`: 标域类型</br>- `Min`: 最小值。</br>- `Max`: 最大值。</br>- `Average`: 平均值。</br>- `Median`: 中位数。</br>|
| `name` | | |
| `name` | | 标注名称。会作为文字显示。 |
| `dimension` |1 | 从哪个维度的数据计算最大最小值等。 |
| `xPosition` | | 相对原点的 x 坐标单位像素。当type为None时有效。 |
| `yPosition` | | 相对原点的 y 坐标单位像素。当type为None时有效。 |
@@ -825,7 +897,7 @@ Inherits or Implemented: [MainComponent](#MainComponent)
|field|default|comment|
|--|--|--|
| `show` |true | 是否显示标线。 |
| `serieIndex` |0 | |
| `serieIndex` |0 | 标线影响的Serie索引。 |
| `animation` | | 标线的动画样式。 [AnimationStyle](AnimationStyle)|
| `data` | | 标线的数据列表。当数据项的group为0时每个数据项表示一条标线当group不为0时相同group的两个数据项分别表 示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。 |
@@ -833,12 +905,12 @@ Inherits or Implemented: [MainComponent](#MainComponent)
Inherits or Implemented: [ChildComponent](#ChildComponent)
Data of marking line. 图表标线的数据。
图表标线的数据。
|field|default|comment|
|--|--|--|
| `type` | | 特殊的标线类型,用于标注最大值最小值等。</br>`MarkLineType`:</br>- `None`: 标线类型</br>- `Min`: 最小值。</br>- `Max`: 最大值。</br>- `Average`: 平均值。</br>- `Median`: 中位数。</br>|
| `name` | | |
| `name` | | 标线名称将会作为文字显示。label的formatter可通过{b}显示名称,通过{c}显示数值。 |
| `dimension` |1 | 从哪个维度的数据计算最大最小值等。 |
| `xPosition` | | 相对原点的 x 坐标单位像素。当type为None时有效。 |
| `yPosition` | | 相对原点的 y 坐标单位像素。当type为None时有效。 |
@@ -850,7 +922,6 @@ Data of marking line. 图表标线的数据。
| `endSymbol` | | 结束点的图形标记。 [SymbolStyle](SymbolStyle)|
| `lineStyle` | | 标线样式。 [LineStyle](LineStyle)|
| `label` | | 文本样式。可设置position为Start、Middle和End在不同的位置显示文本。 [LabelStyle](LabelStyle)|
| `emphasis` | | [Emphasis](Emphasis)|
## `Parallel`
@@ -948,13 +1019,6 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
|field|default|comment|
|--|--|--|
| `labels` | | |
| `labelLines` | | |
| `endLabels` | | |
| `lineArrows` | | |
| `areaStyles` | | |
| `titleStyles` | | |
| `emphases` | | |
| `index` | | 系列索引。 |
| `show` |true | 系列是否显示在图表上。 |
| `coordSystem` | | 使用的坐标系。 |
@@ -970,15 +1034,15 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `parallelIndex` |0 | 所使用的 parallel coord 组件的 index。 |
| `minShow` | | 系列所显示数据的最小索引 |
| `maxShow` | | 系列所显示数据的最大索引 |
| `maxCache` | | The first data will be remove when the size of serie data is larger then maxCache. |
| `maxCache` | | 系列中可缓存的最大数据量。默认为0没有限制大于0时超过指定值会移除旧数据再插入新数据。 |
| `sampleDist` |0 | 采样的最小像素距离默认为0时不采样。当两个数据点间的水平距离小于改值时开启采样保证两点间的水平距离不小于改值。 |
| `sampleType` | | 采样类型。当sampleDist大于0时有效。</br>`SampleType`:</br>- `Peak`: 取峰值。</br>- `Average`: 取过滤点的平均值。</br>- `Max`: 取过滤点的最大值。</br>- `Min`: 取过滤点的最小值。</br>- `Sum`: 取过滤点的和。</br>|
| `sampleAverage` |0 | 设定的采样平均值。当sampleType 为 Peak 时用于和过滤数据的平均值做对比是取最大值还是最小值。默认为0时会实时计算所有数据的平均值。 |
| `lineType` | | 折线图样式类型。</br>`LineType`:</br>- `Normal`: the normal line chart 普通折线图。</br>- `Smooth`: the smooth line chart 平滑曲线。</br>- `StepStart`: 阶梯线图:当前点。</br>- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。</br>- `StepEnd`: 阶梯线图:下一个拐点。</br>|
| `barType` | | 柱形图类型。</br>`BarType`:</br>- `Normal`: 普通柱形图</br>- `Zebra`: 斑马柱形图</br>- `Capsule`: 胶囊柱形图</br>|
| `lineType` | | 折线图样式类型。</br>`LineType`:</br>- `Normal`: 普通折线图。</br>- `Smooth`: 平滑曲线。</br>- `StepStart`: 阶梯线图:当前点。</br>- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。</br>- `StepEnd`: 阶梯线图:下一个拐点。</br>|
| `barType` | | 柱形图类型。</br>`BarType`:</br>- `Normal`: 普通柱形图</br>- `Zebra`: 斑马柱形图</br>- `Capsule`: 胶囊柱形图</br>|
| `barPercentStack` |false | 柱形图是否为百分比堆积。相同stack的serie只要有一个barPercentStack为true则就显示成百分比堆叠柱状图。 |
| `barWidth` |0.6f | 柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 |
| `barGap` |0.3f; // 30 | <para>Set barGap as '-1' can overlap bars that belong to different series, which is useful when making a series of bar be background. |
| `barWidth` |0 | 柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 |
| `barGap` |0.1f | 不同系列的柱间距离。为百分比(如 '0.3f',表示柱子宽度的 30% 如果想要两个系列的柱子重叠,可以设置 barGap '-1f'。这在用柱子做背景的时候有用。 在同一坐标系上,此属性会被多个 'bar' 系列共享。此属性应设置于此坐标系中最后一个 'bar' 系列上才会生效,并且是对此坐标系中所有 'bar' 系列生效。 |
| `barZebraWidth` |4f | 斑马线的粗细。 |
| `barZebraGap` |2f | 斑马线的间距。 |
| `min` | | 最小值。 |
@@ -992,13 +1056,12 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `roundCap` | | 是否开启圆弧效果。 |
| `splitNumber` | | 刻度分割段数。最大可设置36。 |
| `clickOffset` |true | 鼠标点击时是否开启偏移一般用在PieChart图表中。 |
| `roseType` | | 是否展示成南丁格尔图,通过半径区分数据大小。</br>`RoseType`:</br>- `None`: Don't show as Nightingale chart.不展示成南丁格尔玫瑰图</br>- `Radius`: 扇区圆心角展现数据的百分比,半径展现数据的大小。</br>- `Area`: 所有扇区圆心角相同,仅通过半径展现数据大小。</br>|
| `roseType` | | 是否展示成南丁格尔图,通过半径区分数据大小。</br>`RoseType`:</br>- `None`: 不展示成南丁格尔玫瑰图</br>- `Radius`: 扇区圆心角展现数据的百分比,半径展现数据的大小。</br>- `Area`: 所有扇区圆心角相同,仅通过半径展现数据大小。</br>|
| `gap` | | 间距。 |
| `center` | | 中心点。 |
| `radius` | | 半径。radius[0]表示内径radius[1]表示外径。 |
| `showDataDimension` | | 数据项里的数据维数。 |
| `showDataName` | | 在Editor的inpsector上是否显示name参数 |
| `showDataIcon` | | |
| `clip` |false | 是否裁剪超出坐标系部分的图形。 |
| `ignore` |false | 是否开启忽略数据。当为 true 时,数据值为 ignoreValue 时不进行绘制。 |
| `ignoreValue` |0 | 忽略数据的默认值。当ignore为true才有效。 |
@@ -1031,32 +1094,14 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
|field|default|comment|
|--|--|--|
| `index` | | |
| `index` | | 数据项索引。 |
| `name` | | 数据项名称。 |
| `id` | | 数据项的唯一id。唯一id不是必须设置的。 |
| `parentId` | | |
| `baseInfos` | | |
| `itemStyles` | | |
| `labels` | | |
| `labelLines` | | |
| `emphases` | | |
| `symbols` | | |
| `lineStyles` | | |
| `areaStyles` | | |
| `titleStyles` | | |
| `data` | | 可指定任意维数的数值列表。 |
## `SerieDataBaseInfo`
Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieDataComponent](#ISerieDataComponent)
数据项的其他基础数据。
|field|default|comment|
|--|--|--|
| `ignore` |false | 是否忽略数据。当为 true 时,数据不进行绘制。 |
| `parentId` | | 父节点id。父节点id不是必须设置的。 |
| `ignore` | | 是否忽略数据。当为 true 时,数据不进行绘制。 |
| `selected` | | 该数据项是否被选中。 |
| `radius` | | 自定义半径。可用在饼图中自定义某个数据项的半径。 |
| `data` | | 可指定任意维数的数值列表。 |
## `SerieSymbol`
@@ -1145,8 +1190,8 @@ Inherits or Implemented: [Axis](#Axis),[IUpdateRuntimeData](#IUpdateRuntimeData)
| `right` |0.1f | 组件离容器右侧的距离。 |
| `top` |0f | 组件离容器上侧的距离。 |
| `bottom` |0.2f | 组件离容器下侧的距离。 |
| `width` |0 | |
| `height` |50 | |
| `width` |0 | 坐标轴宽。 |
| `height` |50 | 坐标轴高。 |
## `SingleAxisCoord`
@@ -1183,7 +1228,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
| `height` |0f | 图形的高。 |
| `offset` |Vector2.zero | 图形的偏移。 |
| `image` | | 自定义的标记图形。 |
| `imageType` | | |
| `imageType` | | 图形填充类型。 |
| `color` | | 图形的颜色。 |
## `TextLimit`
@@ -1207,11 +1252,11 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
|field|default|comment|
|--|--|--|
| `show` |true | |
| `top` |2 | |
| `right` |4 | |
| `left` |4 | |
| `bottom` |2 | |
| `show` |true | show padding. 是否显示。 |
| `top` |2 | 顶部间距。 |
| `right` |4 | 右部间距。 |
| `left` |4 | 左边间距。 |
| `bottom` |2 | 底部间距。 |
## `TextStyle`
@@ -1232,7 +1277,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
| `fontStyle` | | 文本字体的风格。 [default: FontStyle.Normal] |
| `lineSpacing` |1f | 行间距。 [default: 1f] |
| `alignment` | | 对齐方式。 |
| `tMPFont` | | |
| `tMPFont` | | TextMeshPro字体。 |
| `tMPFontStyle` | | |
| `tMPAlignment` | | |
@@ -1245,9 +1290,9 @@ Inherits or Implemented: [ScriptableObject](#ScriptableObject)
|field|default|comment|
|--|--|--|
| `themeType` | | 主题类型。</br>`ThemeType`:</br>- `Default`: 默认主题。</br>- `Light`: 亮主题。</br>- `Dark`: 暗主题。</br>- `Custom`: 自定义主题。</br>|
| `themeName` | | |
| `font` | | the font of chart text。 字体。 |
| `tMPFont` | | the font of chart text。 字体。 |
| `themeName` | | 主题名称。 |
| `font` | | 主题字体。 |
| `tMPFont` | | 主题字体。 |
| `contrastColor` | | 对比色。 |
| `backgroundColor` | | 背景颜色。 |
| `colorPalette` | | 调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。 |
@@ -1316,8 +1361,8 @@ Inherits or Implemented: [MainComponent](#MainComponent)
| `show` |true | 是否显示提示框组件。 |
| `type` | | 提示框指示器类型。</br>`Painter.Type`:</br>- `Base`: </br>- `Serie`: </br>- `Top`: </br>|
| `trigger` | | 触发类型。</br>`Tooltip.Trigger`:</br>- `Item`: 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。</br>- `Axis`: 坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。</br>- `None`: 什么都不触发。</br>|
| `itemFormatter` | | 提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。当formatter不为空时优先使用formatter否则使用itemFormatter。 |
| `titleFormatter` | | |
| `itemFormatter` | | 提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。 模板变量有{.}、{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> {f}为数据总和。</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}" |
| `titleFormatter` | | 提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。 模板变量参考Toolip的itemFormatter。 |
| `marker` | | serie的符号标志。 |
| `fixedWidth` |0 | 固定宽度。比 minWidth 优先。 |
| `fixedHeight` |0 | 固定高度。比 minHeight 优先。 |
@@ -1335,17 +1380,17 @@ Inherits or Implemented: [MainComponent](#MainComponent)
| `backgroundType` | | 提示框的背景图片显示类型。 |
| `backgroundColor` | | 提示框的背景颜色。 |
| `borderWidth` |2f | 边框线宽。 |
| `fixedXEnable` |false | |
| `fixedX` |0f | |
| `fixedYEnable` |false | |
| `fixedY` |0f | |
| `titleHeight` |25f | |
| `itemHeight` |25f | |
| `fixedXEnable` |false | 是否固定X位置。 |
| `fixedX` |0f | 固定X位置的坐标。 |
| `fixedYEnable` |false | 是否固定Y位置。 |
| `fixedY` |0f | 固定Y位置的坐标。 |
| `titleHeight` |25f | 标题文本的高。 |
| `itemHeight` |25f | 数据项文本的高。 |
| `borderColor` |Color32(230, 230, 230, 255) | 边框颜色。 |
| `lineStyle` | | 指示线样式。 [LineStyle](LineStyle)|
| `indicatorLabelStyle` | | 提示框的坐标轴指示器文本的样式。 [LabelStyle](LabelStyle)|
| `titleLabelStyle` | | 标题的文本样式。 [LabelStyle](LabelStyle)|
| `contentLabelStyles` | | |
| `contentLabelStyles` | | 内容部分的文本样式列表。和列一一对应。 |
## `TooltipTheme`
@@ -1392,11 +1437,10 @@ Inherits or Implemented: [MainComponent](#MainComponent)
| `location` | | 组件显示的位置。 [Location](Location)|
| `workOnLine` |true | 组件是否对LineChart的LineStyle有效。 |
| `workOnArea` |false | 组件是否对LineChart的AreaStyle有效。 |
| `inRange` | | 定义 在选中范围中 的视觉颜色。 |
| `outOfRange` | | 定义 在选中范围外 的视觉颜色。 |
| `pieces` | | 分段式每一段的相关配置。 |
| `inRange` | | 分段式每一段的相关配置。 |
## `VisualMapPieces`
## `VisualMapRange`
Inherits or Implemented: [ChildComponent](#ChildComponent)
@@ -1437,7 +1481,7 @@ Inherits or Implemented: [ScriptableObject](#ScriptableObject)
| `lang` | | [Lang](Lang)|
| `font` | | |
| `tMPFont` | | |
| `fontSizeLv1` |28 | |
| `fontSizeLv1` |28 | 一级字体大小。 |
| `fontSizeLv2` |24 | |
| `fontSizeLv3` |20 | |
| `fontSizeLv4` |18 | |

View File

@@ -32,7 +32,6 @@
[QA 26: How do I use the background component? What are the conditions?](#How-do-I-use-the-background-component-What-are-the-conditions)
[QA 27: Mesh can not have more than 65000 vertices?](#Mesh-cannot-have-more-than-65000-vertices)
[QA 28: Why are the parameters set in Serie reset after they run?](#Why-are-the-parameters-set-in-Serie-reset-after-they-run)
[QA 29: Why are many custom colors lost after upgrading to 1.6.0? How should I upgrade?](#Why_are_many_custom_colors_lost_after_upgrading_to_1_6_0_How_should_I_upgrade)
## How-to-adjust-the-margin-between-the-axis-and-the=-background
@@ -146,16 +145,6 @@ A: This is the limit of `UGUI` on the number of vertices for a single `Graphic`.
A: Check whether `RemoveData()` and add new `Serie` in the code. If you want to keep the configuration of `Serie`, you can only `ClearData()` which just clear data and then readd the data to the old serie.
## Why_are_many_custom_colors_lost_after_upgrading_to_1_6_0_How_should_I_upgrade
A: In version `1.6.0`, in order to reduce implicit conversion, all drawing related `Color` was changed to `Color32`, so some custom colors were lost. The main components affected are: `ItemStyle`, `LineStyle`, `AreaStyle`, `Vessel`, `VisualMap`, `AxisSplitArea`, `AxisSplitLine`, `GaugeAxis`,`SerieLabel`, etc. Can use the script [UpgradeChartColor.cs](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs) to upgrade.
The upgrade steps are as follows:
1. Back up the project.
2. Download or copy the script [UpgradeChartColor.cs](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs) in the old project `Editor`, Change the `color` field inside to `color.clear` (because some fields may not exist in the old version).
3. After compilation, the old version of color configuration file is exported through `menu bar -> XCharts-> ExportColorConfig` (the configuration file is saved by default to `color.config` under `Assets`).
4. Upgrade `XCharts` to the latest version.
5. The custom color can be restored by importing `color.config` through `menu bar -> XCharts-> ImportColorConfig` (if `color.config` is not under `Assets` of the upgraded project, copy it to this directory).
[XCharts Homepage](https://github.com/XCharts-Team/XCharts)</br>
[XCharts API](XChartsAPI-EN.md)</br>
[XCharts Configuration](XChartsConfiguration-EN.md)

View File

@@ -32,7 +32,6 @@
[QA 26如何使用背景组件有什么条件限制](#如何使用背景组件_有什么条件限制)
[QA 27Mesh can not have more than 65000 vertices?](#Mesh_cannot_have_more_than_65000_vertices)
[QA 28为什么serie里设置的参数运行后又被重置了?](#为什么serie里设置的参数运行后又被重置了)
[QA 29为什么升级到1.6.0版本后很多自定义颜色丢失了?应该如何升级?](#为什么升级到1_6_0版本后很多自定义颜色丢失了_应该如何升级)
## 如何调整坐标轴与背景的边距
@@ -150,18 +149,6 @@
答:检测下代码里是否调用了`RemoveData()`并重新添加`Serie`了。如果想保留`Serie`的配置可以只`ClearData()`,然后重新添加数据。
## 为什么升级到1_6_0版本后很多自定义颜色丢失了_应该如何升级
1.6.0版本为了减少隐式转换,将所有的绘制相关的`Color`都改为了`Color32`,所以会导致一些自定义的颜色的丢失。影响到的主要组件有:`ItemStyle``LineStyle``AreaStyle``Vessel``VisualMap``AxisSplitArea``AxisSplitLine``GaugeAxis``SerieLabel`等。可以用脚本[UpgradeChartColor.cs](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs)进行升级。
升级步骤如下:
1. 备份好你的项目。
2. 先不升级`XCharts`,只下载或拷贝脚本[UpgradeChartColor.cs](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs)放到旧项目的`Editor`由于旧版本可能不存在某些新版本才有的图表或者属性配置可能会编译错误需要处理按34步骤处理一下。
3. 若是由`itemStyle.toColor2`引起的编译报错,可将导出地方的`itemStyle.toColor2`改为`Color.clear`;导入的地方注释掉即可。
4. 若是由`LiquidChart`引起的编译报错,将所有涉及`LiquidChart`的地方都注释掉即可。
5. 编译通过后,通过`菜单栏->XCharts->ExportColorConfig`导出旧版本的颜色配置文件(配置文件默认保存到`Assets`下的`color.config`)。
6. 升级`XCharts`到最新版本。
7. 通过`菜单栏->XCharts->ImportColorConfig``color.config`导入即可恢复自定义的颜色(如果`color.config`不在升级后的项目的`Assets`下的话需要拷贝到此目录下)。
[XCharts主页](https://github.com/XCharts-Team/XCharts)
[XChartsAPI](XChartsAPI-ZH.md)
[XCharts配置项手册](XChartsConfiguration-ZH.md)

View File

@@ -7,56 +7,58 @@
## 获取和导入 XCharts
1. 直接放入XCharts源码到项目
XCharts可通过以下任意一种方式导入到项目
- 直接将XCharts源码到项目
下载好XCharts源码后直接将XCharts目录拷贝到Unity项目工程的Assets目录下。
2. 通过`Assets/Import Package`导入XCharts
- 通过`Assets/Import Package`导入XCharts
下载好XCharts的.unitypackage文件后打开Unity菜单栏 Assets-->Import Package-->选中.unitypackage导入即可开始使用XCharts。
3. 通过`Package Manager`导入XCharts
- 通过`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。
对于Unity 2018.3以上版本,可通过 Package Manager来导入XCharts打开Package Manager后通过 `Add package form git URL...`输入XCharts3.0的GitHub URL: `https://github.com/XCharts-Team/XCharts.git#3.0` 稍等片刻后即可使用XCharts。
也可以直接将package加入到`manifest.json`文件:打开`Packages`目录下的`manifest.json`文件,在`dependencies`下加入:
``` json
"com.monitor1394.xcharts": "https://github.com/XCharts-Team/XCharts.git#master",
"com.monitor1394.xcharts": "https://github.com/XCharts-Team/XCharts.git#3.0",
```
如需更新`XCharts`,删除`manifest.json`文件部分Unity版本可能是packages-lock.json文件的`lock`下的`com.monitor1394.xcharts`相关内容即会重新下载编译。
## 添加一个简单图表
在`Hierarchy`图下右键或菜单栏`GameObject`下拉`XCharts->LineChart`
![op_addchart](res/op_addchart.png)
即可快速创建一个简单的折线图出来:
在`Hierarchy`图下右键或菜单栏`GameObject`下拉选择`XCharts->LineChart`,即可快速创建一个默认的折线图出来
![linechart1](res/linechart1.png)
## 添加多个Seire
如何在上图的基础上添加两条折线呢,只需`Add Serie`按钮,选择对应的`Serie`类型即可
在`Inspector`视图,找到`LineChart`的面板,通过`Add Serie`按钮,可以添加第二条`Line`折线
![op_addserie](res/op_addserie.png)
![linechart2](res/linechart2.png)
## 添加其他组件
默认图表没有`Legend`,需要`Legend`组件可通过`Add Component`按钮添加:
![op_addcomponent](res/op_addcomponent.png)
## 添加Serie组件
如果需要给折线图区域填充颜色,可单独给`Serie`添加`Component`
Serie只自带了几个常见的组件其他组件按需额外添加。比如需要给折线图区域填充颜色,可单独给`Serie`添加`AreaStyle`组件
![op_addseriecomponent](res/op_addseriecomponent.png)
![linechart3](res/linechart3.png)
## 添加SerieData组件
如果需要个性化定制每个数据项的配置,可以单独给每个`SerieData`添加`Component`。比如我们给第一个折线图的第二个数据单独显示`Label`
如果需要个性化定制每个数据项的配置,可以单独给每个`SerieData`添加`Component`。比如我们给折线图的第二个数据单独显示`Label`
![op_addseriedatacomponent](res/op_addseriedatacomponent.png)
![linechart4](res/linechart4.png)
@@ -68,11 +70,17 @@
## 如何快速调整参数
`XCharts`是配置参数驱动。想要什么效果,你只需要去调整对应组件下的配置参数就可以,不需要去改`Hierarchy`图下的节点,因为那些节点是由`XCharts`内部根据配置参数生成的。你改了也会变还原
`XCharts`是配置参数驱动。想要什么效果,你只需要去调整对应组件下的配置参数就可以,不需要去改`Hierarchy`图下的节点,因为那些节点是由`XCharts`内部根据配置参数生成的,即使改了也会在刷新时被还原回来
快速定位你想要改的效果对应的组件。这就需要对组件有一定的了解。比如我们想要让X轴的轴线末端显示箭头如何定位第一步X轴定位到`XAxis0`;第二步,轴线定位到`AxisLine`;最后,再去看`AxisLine`组件下有没有这样的参数可以实现这个效果。
`XCharts`提供从全局`Theme`、系列`Serie`、单个数据项`SerieData`全方位的参数配置。优先级从大到小为:`SerieData`->`Serie`->`Theme`。以`ItemStyle`的颜色例,如果`SerieData`的`ItemStyle`配置有颜色值,则优先用这个颜色值。
`XCharts`提供从全局`Theme`、系列`Serie`、单个数据项`SerieData`全方位的参数配置。优先级从大到小为:`SerieData`->`Serie`->`Theme`。以`ItemStyle`的颜色为例:
1. 如果`SerieData`的`ItemStyle`配置有非`0000`颜色值,则优先用这个颜色值。
2. 如果`Serie`的`ItemStyle`配置有非`0000`颜色值,则优先用这个颜色值。
3. 否则颜色值取自主题`Theme`的`Color Palette`。
通常颜色值为0000时表示用主题默认颜色配置为0或null时表示用主题默认配置。
## 用代码添加折线图
@@ -140,6 +148,7 @@ for (int i = 0; i < 10; i++)
```
这样一个简单的折线图就出来了:
![linechart-simple](res/linechart-simple.png)
如果一个Chart里面有多个系列时则Axis的data只需要加一次不要多个循环加重复了。记住Axis的数据个数要和Serie的数据个数一致。
@@ -148,16 +157,38 @@ for (int i = 0; i < 10; i++)
你还可以用代码控制更多的参数,`Examples`下还有更多的其他例子,凡是`Inspector`上看到的可配置的参数,都可以通过代码来设置。[XCharts配置项手册](XChartsConfiguration-ZH.md)里面的所有参数都是可以通过代码控制的。
另外,除非定制,建议调用[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI-ZH.md) 里面的接口,这些接口内部会做一些关联处理,比如刷新图表等。如果自己调用了内部组件的接口,需要自己处理刷新等其他问题。
另外,除非定制,建议调用`Chart`下提供的`public`接口,特别是数据相关操作部分。这些接口内部会做一些关联处理,比如刷新图表等。常见的接口有:
1. `chart.ClearData()`清空图表数据不移除Series
2. `chart.RemoveData()`清除图表数据会移除所有Serie
3. `chart.AddSerie()`添加Serie
4. `chart.AddXAxisData()`添加X轴数据
5. `chart.AddData()`添加Serie数据
6. `chart.UpdateData()`更新Serie数据
7. `chart.UpdateXAxisData()`更新X轴数据
8. `chart.UpdateDataName()`更新Serie数据的名字
XCharts内部有自动刷新机制但也是在一定条件下。如果自己调用了内部组件的接口碰到组件没有刷新确实找不到原因的话可以用以下两个接口强制刷新
1. `chart.RefreshAllComponent()`:刷新图表组件,会重新初始化所有组件,不建议频繁待用。
2. `chart.RefreshChart()`:刷新图表绘制,只刷新绘制部分,不会刷新组件文本,位置等部分。
## 使用TextMeshPro
XCharts支持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`来清理让图表重新初始化。
建议在项目初就规划好是否使用TextMeshPro并设置好字体。在已有很多图表的情况下切换TMP时可能某些图表无法自动刷新可以手动点击`Rebuild Chart Object`按钮来重建图表,即可正常初始化。
开启了TMP项目在更新XCharts时可能会碰到丢失了TMP引用而无法编译通过的问题可通过以下两种方式解决
1. 找到`XCharts.Runtime.asmdef`和`XCharts.Editor.asmdef`,手动加上 `TextMeshPro`的引用
2. 移除`PlayerSetting`中`Scripting Define Symbols`的`dUI_TextMeshPro`宏
## 用代码改图表参数
@@ -180,7 +211,7 @@ xAxis.type = Axis.AxisType.Category;
### 改Serie的参数
新添加Serie
新添加Serie
```C#
var serie = chart.AddSerie<Pie>();
@@ -220,7 +251,7 @@ var serieData = chart.AddData(0, 20);
//var serieData = serie.GetSerieData(0); //从已有数据中获取
serieData.radius = 10;
var itemStyle = serieData.GetOrAddComponent<ItemStyle>(); //启用SerieData的Component
var itemStyle = serieData.GetOrAddComponent<ItemStyle>(); //给数据项添加ItemStyle组件
itemStyle.color = Color.blue;
```

View File

@@ -7,56 +7,58 @@
## 获取和导入 XCharts
1. 直接放入XCharts源码到项目
XCharts可通过以下任意一种方式导入到项目
- 直接将XCharts源码到项目
下载好XCharts源码后直接将XCharts目录拷贝到Unity项目工程的Assets目录下。
2. 通过`Assets/Import Package`导入XCharts
- 通过`Assets/Import Package`导入XCharts
下载好XCharts的.unitypackage文件后打开Unity菜单栏 Assets-->Import Package-->选中.unitypackage导入即可开始使用XCharts。
3. 通过`Package Manager`导入XCharts
- 通过`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。
对于Unity 2018.3以上版本,可通过 Package Manager来导入XCharts打开Package Manager后通过 `Add package form git URL...`输入XCharts3.0的GitHub URL: `https://github.com/XCharts-Team/XCharts.git#3.0` 稍等片刻后即可使用XCharts。
也可以直接将package加入到`manifest.json`文件:打开`Packages`目录下的`manifest.json`文件,在`dependencies`下加入:
``` json
"com.monitor1394.xcharts": "https://github.com/XCharts-Team/XCharts.git#master",
"com.monitor1394.xcharts": "https://github.com/XCharts-Team/XCharts.git#3.0",
```
如需更新`XCharts`,删除`manifest.json`文件部分Unity版本可能是packages-lock.json文件的`lock`下的`com.monitor1394.xcharts`相关内容即会重新下载编译。
## 添加一个简单图表
在`Hierarchy`图下右键或菜单栏`GameObject`下拉`XCharts->LineChart`
![op_addchart](res/op_addchart.png)
即可快速创建一个简单的折线图出来:
在`Hierarchy`图下右键或菜单栏`GameObject`下拉选择`XCharts->LineChart`,即可快速创建一个默认的折线图出来
![linechart1](res/linechart1.png)
## 添加多个Seire
如何在上图的基础上添加两条折线呢,只需`Add Serie`按钮,选择对应的`Serie`类型即可
在`Inspector`视图,找到`LineChart`的面板,通过`Add Serie`按钮,可以添加第二条`Line`折线
![op_addserie](res/op_addserie.png)
![linechart2](res/linechart2.png)
## 添加其他组件
默认图表没有`Legend`,需要`Legend`组件可通过`Add Component`按钮添加:
![op_addcomponent](res/op_addcomponent.png)
## 添加Serie组件
如果需要给折线图区域填充颜色,可单独给`Serie`添加`Component`
Serie只自带了几个常见的组件其他组件按需额外添加。比如需要给折线图区域填充颜色,可单独给`Serie`添加`AreaStyle`组件
![op_addseriecomponent](res/op_addseriecomponent.png)
![linechart3](res/linechart3.png)
## 添加SerieData组件
如果需要个性化定制每个数据项的配置,可以单独给每个`SerieData`添加`Component`。比如我们给第一个折线图的第二个数据单独显示`Label`
如果需要个性化定制每个数据项的配置,可以单独给每个`SerieData`添加`Component`。比如我们给折线图的第二个数据单独显示`Label`
![op_addseriedatacomponent](res/op_addseriedatacomponent.png)
![linechart4](res/linechart4.png)
@@ -68,11 +70,17 @@
## 如何快速调整参数
`XCharts`是配置参数驱动。想要什么效果,你只需要去调整对应组件下的配置参数就可以,不需要去改`Hierarchy`图下的节点,因为那些节点是由`XCharts`内部根据配置参数生成的。你改了也会变还原
`XCharts`是配置参数驱动。想要什么效果,你只需要去调整对应组件下的配置参数就可以,不需要去改`Hierarchy`图下的节点,因为那些节点是由`XCharts`内部根据配置参数生成的,即使改了也会在刷新时被还原回来
快速定位你想要改的效果对应的组件。这就需要对组件有一定的了解。比如我们想要让X轴的轴线末端显示箭头如何定位第一步X轴定位到`XAxis0`;第二步,轴线定位到`AxisLine`;最后,再去看`AxisLine`组件下有没有这样的参数可以实现这个效果。
`XCharts`提供从全局`Theme`、系列`Serie`、单个数据项`SerieData`全方位的参数配置。优先级从大到小为:`SerieData`->`Serie`->`Theme`。以`ItemStyle`的颜色例,如果`SerieData`的`ItemStyle`配置有颜色值,则优先用这个颜色值。
`XCharts`提供从全局`Theme`、系列`Serie`、单个数据项`SerieData`全方位的参数配置。优先级从大到小为:`SerieData`->`Serie`->`Theme`。以`ItemStyle`的颜色为例:
1. 如果`SerieData`的`ItemStyle`配置有非`0000`颜色值,则优先用这个颜色值。
2. 如果`Serie`的`ItemStyle`配置有非`0000`颜色值,则优先用这个颜色值。
3. 否则颜色值取自主题`Theme`的`Color Palette`。
通常颜色值为0000时表示用主题默认颜色配置为0或null时表示用主题默认配置。
## 用代码添加折线图
@@ -140,6 +148,7 @@ for (int i = 0; i < 10; i++)
```
这样一个简单的折线图就出来了:
![linechart-simple](res/linechart-simple.png)
如果一个Chart里面有多个系列时则Axis的data只需要加一次不要多个循环加重复了。记住Axis的数据个数要和Serie的数据个数一致。
@@ -148,16 +157,38 @@ for (int i = 0; i < 10; i++)
你还可以用代码控制更多的参数,`Examples`下还有更多的其他例子,凡是`Inspector`上看到的可配置的参数,都可以通过代码来设置。[XCharts配置项手册](XChartsConfiguration-ZH.md)里面的所有参数都是可以通过代码控制的。
另外,除非定制,建议调用[XChartsAPI接口](https://github.com/XCharts-Team/XCharts/master/Documentation/XChartsAPI-ZH.md) 里面的接口,这些接口内部会做一些关联处理,比如刷新图表等。如果自己调用了内部组件的接口,需要自己处理刷新等其他问题。
另外,除非定制,建议调用`Chart`下提供的`public`接口,特别是数据相关操作部分。这些接口内部会做一些关联处理,比如刷新图表等。常见的接口有:
1. `chart.ClearData()`清空图表数据不移除Series
2. `chart.RemoveData()`清除图表数据会移除所有Serie
3. `chart.AddSerie()`添加Serie
4. `chart.AddXAxisData()`添加X轴数据
5. `chart.AddData()`添加Serie数据
6. `chart.UpdateData()`更新Serie数据
7. `chart.UpdateXAxisData()`更新X轴数据
8. `chart.UpdateDataName()`更新Serie数据的名字
XCharts内部有自动刷新机制但也是在一定条件下。如果自己调用了内部组件的接口碰到组件没有刷新确实找不到原因的话可以用以下两个接口强制刷新
1. `chart.RefreshAllComponent()`:刷新图表组件,会重新初始化所有组件,不建议频繁待用。
2. `chart.RefreshChart()`:刷新图表绘制,只刷新绘制部分,不会刷新组件文本,位置等部分。
## 使用TextMeshPro
XCharts支持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`来清理让图表重新初始化。
建议在项目初就规划好是否使用TextMeshPro并设置好字体。在已有很多图表的情况下切换TMP时可能某些图表无法自动刷新可以手动点击`Rebuild Chart Object`按钮来重建图表,即可正常初始化。
开启了TMP项目在更新XCharts时可能会碰到丢失了TMP引用而无法编译通过的问题可通过以下两种方式解决
1. 找到`XCharts.Runtime.asmdef`和`XCharts.Editor.asmdef`,手动加上 `TextMeshPro`的引用
2. 移除`PlayerSetting`中`Scripting Define Symbols`的`dUI_TextMeshPro`宏
## 用代码改图表参数
@@ -180,7 +211,7 @@ xAxis.type = Axis.AxisType.Category;
### 改Serie的参数
新添加Serie
新添加Serie
```C#
var serie = chart.AddSerie<Pie>();
@@ -220,7 +251,7 @@ var serieData = chart.AddData(0, 20);
//var serieData = serie.GetSerieData(0); //从已有数据中获取
serieData.radius = 10;
var itemStyle = serieData.GetOrAddComponent<ItemStyle>(); //启用SerieData的Component
var itemStyle = serieData.GetOrAddComponent<ItemStyle>(); //给数据项添加ItemStyle组件
itemStyle.color = Color.blue;
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -1,76 +0,0 @@
fileFormatVersion: 2
guid: 5b533c6dca4e643c0a3cf0152ea053c3
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 33ca1e807bf9b44daa62fa68040f7a17
guid: c62c735b2989c4367b8c97b8ca75c216
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}

View File

@@ -1,5 +1,3 @@
using System;
namespace XCharts.Editor

View File

@@ -1,5 +1,3 @@
using System;
namespace XCharts.Editor

View File

@@ -1,4 +1,3 @@

using System;
using System.Collections.Generic;
using System.Text;
@@ -45,7 +44,7 @@ namespace XCharts.Editor
protected virtual void OnEnable()
{
if (target == null) return;
m_Chart = (BaseChart)target;
m_Chart = (BaseChart) target;
m_Script = serializedObject.FindProperty("m_Script");
m_EnableTextMeshPro = serializedObject.FindProperty("m_EnableTextMeshPro");
m_ChartName = serializedObject.FindProperty("m_ChartName");
@@ -172,7 +171,7 @@ namespace XCharts.Editor
{
m_Series.Add(prop.GetArrayElementAtIndex(i));
}
m_Series.Sort(delegate (SerializedProperty a, SerializedProperty b)
m_Series.Sort(delegate(SerializedProperty a, SerializedProperty b)
{
var index1 = a.FindPropertyRelative("m_Index").intValue;
var index2 = b.FindPropertyRelative("m_Index").intValue;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -23,7 +22,6 @@ namespace XCharts.Editor
PropertyField(prop, "m_DataChangeEnable");
PropertyField(prop, "m_DataChangeDuration");
PropertyField(prop, "m_ActualDuration");
PropertyField(prop, "m_AlongWithLinePath");
--EditorGUI.indentLevel;
}
}

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
@@ -110,7 +109,7 @@ namespace XCharts.Editor
{
if (IngorePropertys.Contains(relativePropName)) return;
if (!ChartEditorHelper.PropertyFieldWithMinValue(ref m_DrawRect, m_Heights, m_KeyName, prop,
relativePropName, minValue))
relativePropName, minValue))
{
Debug.LogError("PropertyField ERROR:" + prop.displayName + ", " + relativePropName);
}
@@ -119,7 +118,7 @@ namespace XCharts.Editor
{
if (IngorePropertys.Contains(relativePropName)) return;
if (!ChartEditorHelper.PropertyFieldWithMaxValue(ref m_DrawRect, m_Heights, m_KeyName, prop,
relativePropName, maxValue))
relativePropName, maxValue))
{
Debug.LogError("PropertyField ERROR:" + prop.displayName + ", " + relativePropName);
}
@@ -163,25 +162,40 @@ namespace XCharts.Editor
}
}
protected bool MakeComponentFoldout(SerializedProperty prop, string relativePropName, bool relativePropEnable,
params HeaderMenuInfo[] menus)
params HeaderMenuInfo[] menus)
{
if (string.IsNullOrEmpty(relativePropName))
{
return ChartEditorHelper.MakeComponentFoldout(ref m_DrawRect, m_Heights, m_PropToggles, m_KeyName,
m_DisplayName, null, relativePropEnable, menus);
m_DisplayName, null, null, relativePropEnable, menus);
}
else
{
{
var relativeProp = prop.FindPropertyRelative(relativePropName);
return ChartEditorHelper.MakeComponentFoldout(ref m_DrawRect, m_Heights, m_PropToggles, m_KeyName,
m_DisplayName, relativeProp, relativePropEnable, menus);
m_DisplayName, relativeProp, null, relativePropEnable, menus);
}
}
protected virtual void DrawExtendeds(SerializedProperty prop)
protected bool MakeComponentFoldout(SerializedProperty prop, string relativePropName, string relativePropName2,
bool relativePropEnable, params HeaderMenuInfo[] menus)
{
if (string.IsNullOrEmpty(relativePropName))
{
return ChartEditorHelper.MakeComponentFoldout(ref m_DrawRect, m_Heights, m_PropToggles, m_KeyName,
m_DisplayName, null, null, relativePropEnable, menus);
}
else
{
var relativeProp = prop.FindPropertyRelative(relativePropName);
var relativeProp2 = prop.FindPropertyRelative(relativePropName2);
return ChartEditorHelper.MakeComponentFoldout(ref m_DrawRect, m_Heights, m_PropToggles, m_KeyName,
m_DisplayName, relativeProp, relativeProp2, relativePropEnable, menus);
}
}
protected virtual void DrawExtendeds(SerializedProperty prop) { }
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
{
var key = GetKeyName(prop);

View File

@@ -0,0 +1,26 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(CommentItem), true)]
public class CommentItemDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "CommentItem"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show", "m_Content", true))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_Content");
PropertyField(prop, "m_Position");
//PropertyField(prop, "m_MarkRect");
//PropertyField(prop, "m_MarkStyle");
PropertyField(prop, "m_LabelStyle");
--EditorGUI.indentLevel;
}
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 418b81a68e59a4572ab57787b5362d5a
guid: d485d6a729a1449cdb5032f380fba70f
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -0,0 +1,22 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(CommentMarkStyle), true)]
public class CommentMarkStyleDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "MarkStyle"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show", true))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_LineStyle");
--EditorGUI.indentLevel;
}
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a6d8757fbd847419aaed450e020e827c
guid: d74ed458b24774b129611ed816b6b6cd
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,4 +1,3 @@

using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
@@ -59,6 +58,7 @@ namespace XCharts.Editor
{
public override string ClassName { get { return "Axis"; } }
}
[CustomPropertyDrawer(typeof(RadiusAxisTheme), true)]
public class RadiusAxisThemeDrawer : BaseAxisThemeDrawer
{
@@ -67,8 +67,9 @@ namespace XCharts.Editor
{
get
{
return new List<string> {
"m_TextBackgroundColor" ,
return new List<string>
{
"m_TextBackgroundColor",
"m_LineLength",
"m_SplitLineLength",
};

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
@@ -23,4 +22,22 @@ namespace XCharts.Editor
}
}
}
[CustomPropertyDrawer(typeof(EmphasisItemStyle), true)]
public class EmphasisItemStyleDrawer : ItemStyleDrawer
{
public override string ClassName { get { return "EmphasisItemStyle"; } }
}
[CustomPropertyDrawer(typeof(EmphasisLabelStyle), true)]
public class EmphasisLabelStyleDrawer : LabelStyleDrawer
{
public override string ClassName { get { return "EmphasisLabel"; } }
}
[CustomPropertyDrawer(typeof(EmphasisLabelLine), true)]
public class EmphasisLabelLineDrawer : LabelLineDrawer
{
public override string ClassName { get { return "EmphasisLabelLine"; } }
}
}

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -24,7 +23,7 @@ namespace XCharts.Editor
}
}
}
[CustomPropertyDrawer(typeof(LineArrow), true)]
public class LineArrowStyleDrawer : BasePropertyDrawer
{

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -47,6 +46,7 @@ namespace XCharts.Editor
PropertyField(prop, "m_AutoColor");
}
}
[CustomPropertyDrawer(typeof(AxisTick), true)]
public class AxisTickDrawer : BaseLineDrawer
{

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,25 +0,0 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(SerieDataBaseInfo), true)]
public class SerieDataBaseInfoDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "BaseInfo"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show", false))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_Ignore");
PropertyField(prop, "m_Selected");
PropertyField(prop, "m_Radius");
--EditorGUI.indentLevel;
}
}
}
}

View File

@@ -1,4 +1,3 @@

using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
@@ -16,7 +15,7 @@ namespace XCharts.Editor
if (MakeComponentFoldout(prop, "m_Show", true))
{
++EditorGUI.indentLevel;
var type = (SymbolType)prop.FindPropertyRelative("m_Type").enumValueIndex;
var type = (SymbolType) prop.FindPropertyRelative("m_Type").enumValueIndex;
PropertyField(prop, "m_Type");
if (type == SymbolType.Custom)
{
@@ -28,7 +27,7 @@ namespace XCharts.Editor
}
PropertyField(prop, "m_Gap");
PropertyField(prop, "m_SizeType");
switch ((SymbolSizeType)prop.FindPropertyRelative("m_SizeType").enumValueIndex)
switch ((SymbolSizeType) prop.FindPropertyRelative("m_SizeType").enumValueIndex)
{
case SymbolSizeType.Custom:
PropertyField(prop, "m_Size");

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -13,10 +12,10 @@ namespace XCharts.Editor
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show", false, new HeaderMenuInfo("Reset", () =>
{
var chart = prop.serializedObject.targetObject as BaseChart;
chart.settings.Reset();
})))
{
var chart = prop.serializedObject.targetObject as BaseChart;
chart.settings.Reset();
})))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_ReversePainter");

View File

@@ -1,4 +1,3 @@

using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
@@ -16,7 +15,7 @@ namespace XCharts.Editor
if (MakeComponentFoldout(prop, "m_Show", true))
{
++EditorGUI.indentLevel;
var type = (SymbolType)prop.FindPropertyRelative("m_Type").enumValueIndex;
var type = (SymbolType) prop.FindPropertyRelative("m_Type").enumValueIndex;
PropertyField(prop, "m_Type");
if (type == SymbolType.Custom)
{

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using UnityEngine;
#if dUI_TextMeshPro

View File

@@ -1,4 +1,3 @@

using System.IO;
using UnityEditor;
using UnityEngine;
@@ -20,17 +19,17 @@ namespace XCharts.Editor
var defaultX = pos.x;
var chart = prop.serializedObject.targetObject as BaseChart;
if (MakeComponentFoldout(prop, "m_Show", false, new HeaderMenuInfo("Reset|Reset to theme default color", () =>
{
chart.theme.sharedTheme.ResetTheme();
chart.RefreshAllComponent();
}), new HeaderMenuInfo("Export|Export theme to asset for a new theme", () =>
{
ExportThemeWindow.target = chart;
EditorWindow.GetWindow(typeof(ExportThemeWindow));
}), new HeaderMenuInfo("Sync color to custom|Sync shared theme color to custom color", () =>
{
chart.theme.SyncSharedThemeColorToCustom();
})))
{
chart.theme.sharedTheme.ResetTheme();
chart.RefreshAllComponent();
}), new HeaderMenuInfo("Export|Export theme to asset for a new theme", () =>
{
ExportThemeWindow.target = chart;
EditorWindow.GetWindow(typeof(ExportThemeWindow));
}), new HeaderMenuInfo("Sync color to custom|Sync shared theme color to custom color", () =>
{
chart.theme.SyncSharedThemeColorToCustom();
})))
{
++EditorGUI.indentLevel;
var chartNameList = XCThemeMgr.GetAllThemeNames();
@@ -46,12 +45,12 @@ namespace XCharts.Editor
PropertyField(prop, "m_SharedTheme");
PropertyField(prop, "m_TransparentBackground");
PropertyField(prop, "m_EnableCustomTheme");
using (new EditorGUI.DisabledScope(!prop.FindPropertyRelative("m_EnableCustomTheme").boolValue))
{
PropertyField(prop, "m_CustomBackgroundColor");
PropertyField(prop, "m_CustomColorPalette");
}
--EditorGUI.indentLevel;
using(new EditorGUI.DisabledScope(!prop.FindPropertyRelative("m_EnableCustomTheme").boolValue))
{
PropertyField(prop, "m_CustomBackgroundColor");
PropertyField(prop, "m_CustomColorPalette");
}
--EditorGUI.indentLevel;
}
}
@@ -71,7 +70,7 @@ namespace XCharts.Editor
private string m_ChartName;
static void Init()
{
window = (ExportThemeWindow)EditorWindow.GetWindow(typeof(ExportThemeWindow), false, "Export Theme", true);
window = (ExportThemeWindow) EditorWindow.GetWindow(typeof(ExportThemeWindow), false, "Export Theme", true);
window.minSize = new Vector2(600, 50);
window.maxSize = new Vector2(600, 50);
window.Show();
@@ -117,14 +116,14 @@ namespace XCharts.Editor
}
else if (IsAssetsExist(XCThemeMgr.GetThemeAssetPath(m_ChartName)))
{
ShowNotification(new GUIContent("ERROR:The asset is exist! \npath="
+ XCThemeMgr.GetThemeAssetPath(m_ChartName)));
ShowNotification(new GUIContent("ERROR:The asset is exist! \npath=" +
XCThemeMgr.GetThemeAssetPath(m_ChartName)));
}
else
{
XCThemeMgr.ExportTheme(target.theme.sharedTheme, m_ChartName);
ShowNotification(new GUIContent("SUCCESS:The theme is exported. \npath="
+ XCThemeMgr.GetThemeAssetPath(m_ChartName)));
ShowNotification(new GUIContent("SUCCESS:The theme is exported. \npath=" +
XCThemeMgr.GetThemeAssetPath(m_ChartName)));
}
}
}

View File

@@ -1,4 +1,4 @@
using UnityEditor;
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -13,7 +12,7 @@ namespace XCharts.Editor
var m_Type = baseProperty.FindPropertyRelative("m_Type");
var m_LogBase = baseProperty.FindPropertyRelative("m_LogBase");
var m_MinMaxType = baseProperty.FindPropertyRelative("m_MinMaxType");
var type = (Axis.AxisType)m_Type.enumValueIndex;
var type = (Axis.AxisType) m_Type.enumValueIndex;
EditorGUI.indentLevel++;
if (component is ParallelAxis)
{
@@ -41,7 +40,7 @@ namespace XCharts.Editor
if (type == Axis.AxisType.Value || type == Axis.AxisType.Time)
{
PropertyField("m_MinMaxType");
Axis.AxisMinMaxType minMaxType = (Axis.AxisMinMaxType)m_MinMaxType.enumValueIndex;
Axis.AxisMinMaxType minMaxType = (Axis.AxisMinMaxType) m_MinMaxType.enumValueIndex;
switch (minMaxType)
{
case Axis.AxisMinMaxType.Default:
@@ -95,13 +94,11 @@ namespace XCharts.Editor
[ComponentEditor(typeof(XAxis))]
public class XAxisEditor : AxisEditor
{
}
{ }
[ComponentEditor(typeof(YAxis))]
public class YAxisEditor : AxisEditor
{
}
{ }
[ComponentEditor(typeof(SingleAxis))]
public class SingleAxisEditor : AxisEditor
@@ -132,13 +129,11 @@ namespace XCharts.Editor
[ComponentEditor(typeof(RadiusAxis))]
public class RadiusAxisEditor : AxisEditor
{
}
{ }
[ComponentEditor(typeof(ParallelAxis))]
public class ParallelAxisEditor : AxisEditor
{
}
{ }
[CustomPropertyDrawer(typeof(AxisLabel), true)]
public class AxisLabelDrawer : BasePropertyDrawer
@@ -159,6 +154,7 @@ namespace XCharts.Editor
PropertyField(prop, "m_ShowEndLabel");
PropertyField(prop, "m_Rotate");
PropertyField(prop, "m_Offset");
PropertyField(prop, "m_Distance");
PropertyField(prop, "m_Formatter");
PropertyField(prop, "m_NumericFormatter");
@@ -168,6 +164,7 @@ namespace XCharts.Editor
PropertyField(prop, "m_Background");
PropertyField(prop, "m_TextStyle");
PropertyField(prop, "m_TextPadding");
PropertyField(prop, "m_TextLimit");
--EditorGUI.indentLevel;
}
}

View File

@@ -1,5 +1,3 @@
using UnityEditor;
using XCharts.Runtime;
@@ -15,7 +13,7 @@ namespace XCharts.Editor
PropertyField("m_Image");
PropertyField("m_ImageType");
PropertyField("m_ImageColor");
PropertyField("m_HideThemeBackgroundColor");
PropertyField("m_AutoColor");
--EditorGUI.indentLevel;
}
}

View File

@@ -0,0 +1,18 @@
using UnityEditor;
using XCharts.Runtime;
namespace XCharts.Editor
{
[ComponentEditor(typeof(Comment))]
public class CommentEditor : MainComponentEditor<Comment>
{
public override void OnInspectorGUI()
{
++EditorGUI.indentLevel;
PropertyField("m_LabelStyle");
//PropertyField("m_MarkStyle");
PropertyListField("m_Items", true);
--EditorGUI.indentLevel;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f2364066bf3174aa39b79020266ce72d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using XCharts.Runtime;
@@ -15,12 +14,14 @@ namespace XCharts.Editor
PropertyField("m_ItemHeight");
PropertyField("m_ItemGap");
PropertyField("m_ItemAutoColor");
PropertyField("m_ItemOpacity");
PropertyField("m_SelectedMode");
PropertyField("m_Orient");
PropertyField("m_Formatter");
PropertyField("m_Location");
PropertyField("m_LabelStyle");
PropertyListField("m_Icons");
PropertyListField("m_Colors");
PropertyListField("m_Data");
--EditorGUI.indentLevel;
}

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.Assertions;
@@ -28,12 +27,10 @@ namespace XCharts.Editor
}
public virtual void OnEnable()
{
}
{ }
public virtual void OnDisable()
{
}
{ }
internal void OnInternalInspectorGUI()
{
@@ -42,12 +39,10 @@ namespace XCharts.Editor
}
public virtual void OnInspectorGUI()
{
}
{ }
protected virtual void DrawExtendeds()
{
}
{ }
public virtual string GetDisplayTitle()
{

View File

@@ -1,10 +1,8 @@
using XCharts.Runtime;
namespace XCharts.Editor
{
public class MainComponentEditor<T> : MainComponentBaseEditor
where T : MainComponent
{
}
where T : MainComponent
{ }
}

View File

@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using UnityEngine.Assertions;
using UnityEditor;
using System.Linq;
using UnityEditor;
using UnityEngine.Assertions;
using XCharts.Runtime;
namespace XCharts.Editor
@@ -84,7 +83,7 @@ namespace XCharts.Editor
editor.showProperty,
() => { ResetComponentEditor(id); },
() => { RemoveComponentEditor(id); }
);
);
if (displayContent)
{
editor.OnInternalInspectorGUI();
@@ -120,7 +119,7 @@ namespace XCharts.Editor
if (!m_EditorTypes.TryGetValue(settingsType, out editorType))
editorType = typeof(MainComponentBaseEditor);
var editor = (MainComponentBaseEditor)Activator.CreateInstance(editorType);
var editor = (MainComponentBaseEditor) Activator.CreateInstance(editorType);
editor.Init(chart, component, property, m_BaseEditor);
if (index < 0)

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -31,7 +30,7 @@ namespace XCharts.Editor
if (MakeComponentFoldout(prop, "", true))
{
++EditorGUI.indentLevel;
var type = (MarkAreaType)(prop.FindPropertyRelative("m_Type")).enumValueIndex;
var type = (MarkAreaType) (prop.FindPropertyRelative("m_Type")).enumValueIndex;
PropertyField(prop, "m_Type");
PropertyField(prop, "m_Name");
switch (type)

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -28,7 +27,7 @@ namespace XCharts.Editor
if (MakeComponentFoldout(prop, "", true))
{
++EditorGUI.indentLevel;
var type = (MarkLineType)(prop.FindPropertyRelative("m_Type")).enumValueIndex;
var type = (MarkLineType) (prop.FindPropertyRelative("m_Type")).enumValueIndex;
var group = prop.FindPropertyRelative("m_Group").intValue;
PropertyField(prop, "m_Type");
PropertyField(prop, "m_Name");

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;

View File

@@ -1,5 +1,3 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -12,7 +10,14 @@ namespace XCharts.Editor
[CustomEditor(typeof(Theme))]
public class ThemeEditor : UnityEditor.Editor
{
static class Styles
{
internal static GUIContent btnReset = new GUIContent("Reset", "Reset to default theme");
internal static GUIContent btnSync = new GUIContent("Sync Font", "Sync main theme font to sub theme font");
}
private Theme m_Theme;
void OnEnable()
{
m_Theme = target as Theme;
@@ -20,15 +25,15 @@ namespace XCharts.Editor
public override void OnInspectorGUI()
{
// serializedObject.Update();
// EditorGUILayout.PropertyField(m_BackgroundColor);
// EditorGUILayout.PropertyField(m_ColorPalette);
// serializedObject.ApplyModifiedProperties();
base.OnInspectorGUI();
if (GUILayout.Button(new GUIContent("Reset", "Reset to default theme")))
if (GUILayout.Button(Styles.btnReset))
{
m_Theme.ResetTheme();
}
if (GUILayout.Button(Styles.btnSync))
{
m_Theme.SyncFontToSubComponent();
}
}
}
}

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -11,7 +10,7 @@ namespace XCharts.Editor
public override void OnInspectorGUI()
{
++EditorGUI.indentLevel;
var type = (VisualMap.Type)baseProperty.FindPropertyRelative("m_Type").enumValueIndex;
var type = (VisualMap.Type) baseProperty.FindPropertyRelative("m_Type").enumValueIndex;
var isPiece = type == VisualMap.Type.Piecewise;
PropertyField("m_Type");
PropertyField("m_SerieIndex");
@@ -39,19 +38,19 @@ namespace XCharts.Editor
PropertyField("m_Location");
}
PropertyListField("m_OutOfRange");
PropertyListField(isPiece ? "m_Pieces" : "m_InRange");
PropertyListField("m_InRange");
--EditorGUI.indentLevel;
}
}
[CustomPropertyDrawer(typeof(VisualMapPieces), true)]
public class PiecesDrawer : BasePropertyDrawer
[CustomPropertyDrawer(typeof(VisualMapRange), true)]
public class VisualMapRangeDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "Pieces"; } }
public override string ClassName { get { return "Range"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeFoldout(prop, ""))
if (MakeFoldout(prop, "m_Color"))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_Min");

View File

@@ -1,4 +1,3 @@
using XCharts.Runtime;
namespace XCharts.Editor

View File

@@ -11,17 +11,14 @@ namespace XCharts.Editor
PropertyField("m_Gap");
PropertyTwoFiled("m_Center");
PropertyTwoFiled("m_Radius");
//PropertyField("m_StartAngle");
PropertyField("m_AvoidLabelOverlap");
PropertyFiledMore(() =>
{
PropertyField("m_MinAngle");
PropertyField("m_RoundCap");
PropertyField("m_Ignore");
PropertyField("m_IgnoreValue");
PropertyField("m_AvoidLabelOverlap");
});
PropertyField("m_ItemStyle");
PropertyField("m_Animation");
}

View File

@@ -9,7 +9,7 @@ namespace XCharts.Editor
{
PropertyField("m_RadarType");
PropertyField("m_RadarIndex");
PropertyField("m_Symbol");
PropertyField("m_LineStyle");
PropertyField("m_ItemStyle");

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using UnityEditor;
@@ -17,6 +16,7 @@ namespace XCharts.Editor
internal SerializedProperty baseProperty;
internal SerializedProperty showProperty;
internal List<HeaderMenuInfo> menus = new List<HeaderMenuInfo>();
internal List<HeaderMenuInfo> serieDataMenus = new List<HeaderMenuInfo>();
protected Dictionary<string, Type> m_CoordOptionsDic;
protected List<string> m_CoordOptionsNames;
private string m_DisplayName;
@@ -62,12 +62,10 @@ namespace XCharts.Editor
}
public virtual void OnEnable()
{
}
{ }
public virtual void OnDisable()
{
}
{ }
internal void OnInternalInspectorGUI()
{
@@ -76,12 +74,10 @@ namespace XCharts.Editor
}
public virtual void OnInspectorGUI()
{
}
{ }
protected virtual void DrawExtendeds()
{
}
{ }
public virtual string GetDisplayTitle()
{
@@ -136,11 +132,11 @@ namespace XCharts.Editor
{
case SerializedPropertyType.Float:
if (prop.floatValue < min)
prop.floatValue = (float)min;
prop.floatValue = (float) min;
break;
case SerializedPropertyType.Integer:
if (prop.intValue < min)
prop.intValue = (int)min;
prop.intValue = (int) min;
break;
}
@@ -152,11 +148,11 @@ namespace XCharts.Editor
{
case SerializedPropertyType.Float:
if (prop.floatValue > max)
prop.floatValue = (float)max;
prop.floatValue = (float) max;
break;
case SerializedPropertyType.Integer:
if (prop.intValue > max)
prop.intValue = (int)max;
prop.intValue = (int) max;
break;
}
}

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
@@ -36,12 +35,11 @@ namespace XCharts.Editor
}
public virtual void OnCustomInspectorGUI()
{
}
{ }
private void OnExtraInspectorGUI()
{
foreach (var kv in Serie.extraComponentFieldNameDict)
foreach (var kv in Serie.extraComponentMap)
{
var prop = FindProperty(kv.Value);
if (prop.arraySize > 0)
@@ -52,11 +50,11 @@ namespace XCharts.Editor
private void PropertyFieldData()
{
m_DataFoldout = ChartEditorHelper.DrawHeader("Data", m_DataFoldout, false, null, null,
new HeaderMenuInfo("Import ECharts Data", () =>
{
PraseExternalDataEditor.UpdateData(chart, serie, null);
PraseExternalDataEditor.ShowWindow();
}));
new HeaderMenuInfo("Import ECharts Data", () =>
{
PraseExternalDataEditor.UpdateData(chart, serie, null);
PraseExternalDataEditor.ShowWindow();
}));
if (!m_DataFoldout) return;
EditorGUI.indentLevel++;
var m_Datas = FindProperty("m_Data");
@@ -75,7 +73,7 @@ namespace XCharts.Editor
while (listSize > m_Datas.arraySize) m_Datas.arraySize++;
while (listSize < m_Datas.arraySize) m_Datas.arraySize--;
}
if (listSize > 30)// && !XCSettings.editorShowAllListData)
if (listSize > 30) // && !XCSettings.editorShowAllListData)
{
int num = listSize > 10 ? 10 : listSize;
for (int i = 0; i < num; i++)
@@ -117,69 +115,69 @@ namespace XCharts.Editor
}
var fieldCount = dimension + (showName ? 1 : 0);
m_DataElementFoldout[index] = ChartEditorHelper.DrawHeader("SerieData " + index, flag, false, null,
delegate (Rect drawRect)
{
//drawRect.width -= 2f;
var maxX = drawRect.xMax;
var currentWidth = drawRect.width;
var lastX = drawRect.x;
var lastWid = drawRect.width;
var lastFieldWid = EditorGUIUtility.fieldWidth;
var lastLabelWid = EditorGUIUtility.labelWidth;
var serieData = m_Datas.GetArrayElementAtIndex(index);
var sereName = serieData.FindPropertyRelative("m_Name");
var data = serieData.FindPropertyRelative("m_Data");
delegate(Rect drawRect)
{
//drawRect.width -= 2f;
var maxX = drawRect.xMax;
var currentWidth = drawRect.width;
var lastX = drawRect.x;
var lastWid = drawRect.width;
var lastFieldWid = EditorGUIUtility.fieldWidth;
var lastLabelWid = EditorGUIUtility.labelWidth;
var serieData = m_Datas.GetArrayElementAtIndex(index);
var sereName = serieData.FindPropertyRelative("m_Name");
var data = serieData.FindPropertyRelative("m_Data");
#if UNITY_2019_3_OR_NEWER
var gap = 2;
var namegap = 3;
var gap = 2;
var namegap = 3;
#else
var gap = 0;
var namegap = 0;
var gap = 0;
var namegap = 0;
#endif
if (fieldCount <= 1)
{
while (2 > data.arraySize)
if (fieldCount <= 1)
{
var value = data.arraySize == 0 ? index : 0;
data.arraySize++;
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = value;
}
SerializedProperty element = data.GetArrayElementAtIndex(1);
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15 + gap;
drawRect.x = startX;
drawRect.xMax = maxX;
EditorGUI.PropertyField(drawRect, element, GUIContent.none);
}
else
{
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15 + gap;
var dataWidTotal = (currentWidth - (startX + 20.5f + 1));
var dataWid = dataWidTotal / fieldCount;
var xWid = dataWid - 2;
for (int i = 0; i < dimension; i++)
{
var dataCount = i < 1 ? 2 : i + 1;
while (dataCount > data.arraySize)
while (2 > data.arraySize)
{
var value = data.arraySize == 0 ? index : 0;
data.arraySize++;
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = value;
}
drawRect.x = startX + i * xWid;
drawRect.width = dataWid + 25;
SerializedProperty element = data.GetArrayElementAtIndex(dimension <= 1 ? 1 : i);
SerializedProperty element = data.GetArrayElementAtIndex(1);
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15 + gap;
drawRect.x = startX;
drawRect.xMax = maxX;
EditorGUI.PropertyField(drawRect, element, GUIContent.none);
}
if (showName)
else
{
drawRect.x = startX + (fieldCount - 1) * xWid;
drawRect.width = dataWid + 40 + dimension * namegap - 2.5f;
EditorGUI.PropertyField(drawRect, sereName, GUIContent.none);
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15 + gap;
var dataWidTotal = (currentWidth - (startX + 20.5f + 1));
var dataWid = dataWidTotal / fieldCount;
var xWid = dataWid - 2;
for (int i = 0; i < dimension; i++)
{
var dataCount = i < 1 ? 2 : i + 1;
while (dataCount > data.arraySize)
{
var value = data.arraySize == 0 ? index : 0;
data.arraySize++;
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = value;
}
drawRect.x = startX + i * xWid;
drawRect.width = dataWid + 25;
SerializedProperty element = data.GetArrayElementAtIndex(dimension <= 1 ? 1 : i);
EditorGUI.PropertyField(drawRect, element, GUIContent.none);
}
if (showName)
{
drawRect.x = startX + (fieldCount - 1) * xWid;
drawRect.width = dataWid + 40 + dimension * namegap - 2.5f;
EditorGUI.PropertyField(drawRect, sereName, GUIContent.none);
}
EditorGUIUtility.fieldWidth = lastFieldWid;
EditorGUIUtility.labelWidth = lastLabelWid;
}
EditorGUIUtility.fieldWidth = lastFieldWid;
EditorGUIUtility.labelWidth = lastLabelWid;
}
});
});
if (m_DataElementFoldout[index])
{
if (!(serie is ISimplifiedSerie))
@@ -192,113 +190,53 @@ namespace XCharts.Editor
EditorGUI.indentLevel++;
var serieData = m_Datas.GetArrayElementAtIndex(index);
var m_Name = serieData.FindPropertyRelative("m_Name");
var m_Id = serieData.FindPropertyRelative("m_Id");
var m_ParentId = serieData.FindPropertyRelative("m_ParentId");
var m_BaseInfo = serieData.FindPropertyRelative("m_BaseInfos");
var m_Label = serieData.FindPropertyRelative("m_Labels");
var m_ItemStyle = serieData.FindPropertyRelative("m_ItemStyles");
var m_Emphasis = serieData.FindPropertyRelative("m_Emphases");
var m_Symbol = serieData.FindPropertyRelative("m_Symbols");
var m_LineStyle = serieData.FindPropertyRelative("m_LineStyles");
var m_AreaStyle = serieData.FindPropertyRelative("m_AreaStyles");
var m_TitleStyle = serieData.FindPropertyRelative("m_TitleStyles");
PropertyField(m_Name);
PropertyField(m_Id);
PropertyField(m_ParentId);
if (serie.GetType().IsDefined(typeof(SerieDataExtraFieldAttribute), false))
{
var attribute = serie.GetType().GetAttribute<SerieDataExtraFieldAttribute>();
foreach (var field in attribute.fields)
{
PropertyField(serieData.FindPropertyRelative(field));
}
}
var componentNum = m_BaseInfo.arraySize + m_Label.arraySize + m_ItemStyle.arraySize + m_Emphasis.arraySize
+ m_Symbol.arraySize + m_LineStyle.arraySize + m_AreaStyle.arraySize;
var title = "Component";
if (componentNum == 0) title += " (None)";
m_DataComponentFoldout = ChartEditorHelper.DrawHeader(title, m_DataComponentFoldout, false, null, null,
new HeaderMenuInfo("Add BaseInfo", () =>
serieDataMenus.Clear();
if (serie.GetType().IsDefined(typeof(SerieDataExtraComponentAttribute), false))
{
serie.GetSerieData(index).GetOrAddComponent<SerieDataBaseInfo>();
}, m_BaseInfo.arraySize == 0),
new HeaderMenuInfo("Add ItemStyle", () =>
{
serie.GetSerieData(index).GetOrAddComponent<ItemStyle>();
}, m_ItemStyle.arraySize == 0),
new HeaderMenuInfo("Add Label", () =>
{
serie.GetSerieData(index).GetOrAddComponent<LabelStyle>();
}, m_Label.arraySize == 0),
new HeaderMenuInfo("Add Emphasis", () =>
{
serie.GetSerieData(index).GetOrAddComponent<Emphasis>();
}, m_Emphasis.arraySize == 0),
new HeaderMenuInfo("Add Symbol", () =>
{
serie.GetSerieData(index).GetOrAddComponent<SerieSymbol>();
}, m_Symbol.arraySize == 0),
new HeaderMenuInfo("Add LineStyle", () =>
{
serie.GetSerieData(index).GetOrAddComponent<LineStyle>();
}, m_LineStyle.arraySize == 0),
new HeaderMenuInfo("Add AreaStyle", () =>
{
serie.GetSerieData(index).GetOrAddComponent<AreaStyle>();
}, m_AreaStyle.arraySize == 0),
new HeaderMenuInfo("Add TitleStyle", () =>
{
serie.GetSerieData(index).GetOrAddComponent<TitleStyle>();
}, m_TitleStyle.arraySize == 0),
new HeaderMenuInfo("Remove BaseInfo", () =>
{
serie.GetSerieData(index).RemoveComponent<SerieDataBaseInfo>();
}, m_BaseInfo.arraySize > 0),
new HeaderMenuInfo("Remove ItemStyle", () =>
{
serie.GetSerieData(index).RemoveComponent<ItemStyle>();
}, m_ItemStyle.arraySize > 0),
new HeaderMenuInfo("Remove Label", () =>
{
serie.GetSerieData(index).RemoveComponent<LabelStyle>();
}, m_Label.arraySize > 0),
new HeaderMenuInfo("Remove Emphasis", () =>
{
serie.GetSerieData(index).RemoveComponent<Emphasis>();
}, m_Emphasis.arraySize > 0),
new HeaderMenuInfo("Remove Symbol", () =>
{
serie.GetSerieData(index).RemoveComponent<SerieSymbol>();
}, m_Symbol.arraySize > 0),
new HeaderMenuInfo("Remove LineStyle", () =>
{
serie.GetSerieData(index).RemoveComponent<LineStyle>();
}, m_LineStyle.arraySize > 0),
new HeaderMenuInfo("Remove AreaStyle", () =>
{
serie.GetSerieData(index).RemoveComponent<AreaStyle>();
}, m_AreaStyle.arraySize > 0),
new HeaderMenuInfo("Remove TitleStyle", () =>
{
serie.GetSerieData(index).RemoveComponent<TitleStyle>();
}, m_TitleStyle.arraySize > 0),
new HeaderMenuInfo("Remove All", () =>
var attribute = serie.GetType().GetAttribute<SerieDataExtraComponentAttribute>();
foreach (var type in attribute.types)
{
var size = serieData.FindPropertyRelative(SerieData.extraComponentMap[type]).arraySize;
serieDataMenus.Add(new HeaderMenuInfo("Add " + type.Name, () =>
{
serie.GetSerieData(index).GetOrAddComponent(type);
EditorUtility.SetDirty(chart);
}, size == 0));
}
foreach (var type in attribute.types)
{
var size = serieData.FindPropertyRelative(SerieData.extraComponentMap[type]).arraySize;
serieDataMenus.Add(new HeaderMenuInfo("Remove " + type.Name, () =>
{
serie.GetSerieData(index).RemoveComponent(type);
EditorUtility.SetDirty(chart);
}, size > 0));
}
}
serieDataMenus.Add(new HeaderMenuInfo("Remove All", () =>
{
serie.GetSerieData(index).RemoveAllComponent();
}, componentNum > 0));
}, true));
m_DataComponentFoldout = ChartEditorHelper.DrawHeader("Component", m_DataComponentFoldout, false, null, null, serieDataMenus);
if (m_DataComponentFoldout)
{
if (m_BaseInfo.arraySize > 0)
PropertyField(m_BaseInfo.GetArrayElementAtIndex(0));
if (m_Label.arraySize > 0)
PropertyField(m_Label.GetArrayElementAtIndex(0));
if (m_ItemStyle.arraySize > 0)
PropertyField(m_ItemStyle.GetArrayElementAtIndex(0));
if (m_Emphasis.arraySize > 0)
PropertyField(m_Emphasis.GetArrayElementAtIndex(0));
if (m_Symbol.arraySize > 0)
PropertyField(m_Symbol.GetArrayElementAtIndex(0));
if (m_LineStyle.arraySize > 0)
PropertyField(m_LineStyle.GetArrayElementAtIndex(0));
if (m_AreaStyle.arraySize > 0)
PropertyField(m_AreaStyle.GetArrayElementAtIndex(0));
if (m_TitleStyle.arraySize > 0)
PropertyField(m_TitleStyle.GetArrayElementAtIndex(0));
foreach (var kv in SerieData.extraComponentMap)
{
var prop = serieData.FindPropertyRelative(kv.Value);
if (prop.arraySize > 0)
PropertyField(prop.GetArrayElementAtIndex(0));
}
}
EditorGUI.indentLevel--;
}

View File

@@ -1,10 +1,9 @@
using System;
using System.Collections.Generic;
using UnityEngine.Assertions;
using UnityEditor;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine.Assertions;
using XCharts.Runtime;
namespace XCharts.Editor
@@ -22,7 +21,6 @@ namespace XCharts.Editor
List<SerieBaseEditor> m_Editors;
private bool m_SerieFoldout;
public SerieListEditor(BaseChartEditor editor)
{
Assert.IsNotNull(editor);
@@ -136,7 +134,7 @@ namespace XCharts.Editor
if (!m_EditorTypes.TryGetValue(settingsType, out editorType))
editorType = typeof(SerieBaseEditor);
var editor = (SerieBaseEditor)Activator.CreateInstance(editorType);
var editor = (SerieBaseEditor) Activator.CreateInstance(editorType);
editor.Init(chart, serie, property, m_BaseEditor);
editor.menus.Clear();
editor.menus.Add(new HeaderMenuInfo("Clone", () =>
@@ -176,7 +174,7 @@ namespace XCharts.Editor
var attribute = editor.serie.GetType().GetAttribute<SerieExtraComponentAttribute>();
foreach (var type in attribute.types)
{
var size = editor.FindProperty(Serie.extraComponentFieldNameDict[type]).arraySize;
var size = editor.FindProperty(Serie.extraComponentMap[type]).arraySize;
editor.menus.Add(new HeaderMenuInfo("Add " + type.Name, () =>
{
editor.serie.AddExtraComponent(type);
@@ -187,7 +185,7 @@ namespace XCharts.Editor
}
foreach (var type in attribute.types)
{
var size = editor.FindProperty(Serie.extraComponentFieldNameDict[type]).arraySize;
var size = editor.FindProperty(Serie.extraComponentMap[type]).arraySize;
editor.menus.Add(new HeaderMenuInfo("Remove " + type.Name, () =>
{
editor.serie.RemoveExtraComponent(type);

View File

@@ -1,4 +1,3 @@
using XCharts.Runtime;
namespace XCharts.Editor

View File

@@ -1,8 +1,7 @@

using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
namespace XCharts.Editor
@@ -53,7 +52,7 @@ namespace XCharts.Editor
public static void SecondField(Rect drawRect, SerializedProperty prop)
{
RectOffset offset = new RectOffset(-(int)EditorGUIUtility.labelWidth, 0, 0, 0);
RectOffset offset = new RectOffset(-(int) EditorGUIUtility.labelWidth, 0, 0, 0);
drawRect = offset.Add(drawRect);
EditorGUI.PropertyField(drawRect, prop, GUIContent.none);
drawRect = offset.Remove(drawRect);
@@ -166,7 +165,7 @@ namespace XCharts.Editor
}
public static bool MakeComponentFoldout(ref Rect drawRect, Dictionary<string, float> heights,
Dictionary<string, bool> moduleToggle, string key, string content, SerializedProperty prop,
bool propEnable, params HeaderMenuInfo[] menus)
SerializedProperty prop2, bool propEnable, params HeaderMenuInfo[] menus)
{
var sourRect = drawRect;
float defaultWidth = drawRect.width;
@@ -181,10 +180,16 @@ namespace XCharts.Editor
if (prop.propertyType == SerializedPropertyType.Boolean)
{
if (!propEnable)
using (new EditorGUI.DisabledScope(true))
MakeBool(drawRect, prop);
using(new EditorGUI.DisabledScope(true))
MakeBool(drawRect, prop);
else
MakeBool(drawRect, prop);
if (prop2 != null && !moduleToggle[key])
{
drawRect.x = EditorGUIUtility.labelWidth - EditorGUI.indentLevel * INDENT_WIDTH + ARROW_WIDTH + BOOL_WIDTH;
drawRect.width = defaultWidth - drawRect.x + ARROW_WIDTH;
EditorGUI.PropertyField(drawRect, prop2, GUIContent.none);
}
}
else
{
@@ -201,8 +206,6 @@ namespace XCharts.Editor
return moduleToggle[key];
}
public static void MakeBool(Rect drawRect, SerializedProperty boolProp, int index = 0, string name = null)
{
float defaultWidth = drawRect.width;
@@ -378,9 +381,9 @@ namespace XCharts.Editor
{
var temp = INDENT_WIDTH + GAP_WIDTH + iconGap;
var isSerie = "Serie".Equals(element.type);
var elementRect = isSerie
? new Rect(drawRect.x, drawRect.y, drawRect.width + INDENT_WIDTH - 2 * iconGap, drawRect.height)
: new Rect(drawRect.x, drawRect.y, drawRect.width - 3 * iconWidth, drawRect.height);
var elementRect = isSerie ?
new Rect(drawRect.x, drawRect.y, drawRect.width + INDENT_WIDTH - 2 * iconGap, drawRect.height) :
new Rect(drawRect.x, drawRect.y, drawRect.width - 3 * iconWidth, drawRect.height);
EditorGUI.PropertyField(elementRect, element, new GUIContent("Element " + i));
var iconRect = new Rect(drawRect.width - 3 * iconWidth + temp, drawRect.y, iconWidth, drawRect.height);
var oldColor = GUI.contentColor;
@@ -436,7 +439,7 @@ namespace XCharts.Editor
if (prop.propertyType == SerializedPropertyType.Float && prop.floatValue < minValue)
prop.floatValue = minValue;
if (prop.propertyType == SerializedPropertyType.Integer && prop.intValue < minValue)
prop.intValue = (int)minValue;
prop.intValue = (int) minValue;
var hig = EditorGUI.GetPropertyHeight(prop);
drawRect.y += hig;
heights[key] += hig;
@@ -451,7 +454,7 @@ namespace XCharts.Editor
if (prop.propertyType == SerializedPropertyType.Float && prop.floatValue > maxValue)
prop.floatValue = maxValue;
if (prop.propertyType == SerializedPropertyType.Integer && prop.intValue > maxValue)
prop.intValue = (int)maxValue;
prop.intValue = (int) maxValue;
var hig = EditorGUI.GetPropertyHeight(prop);
drawRect.y += hig;
heights[key] += hig;
@@ -540,7 +543,7 @@ namespace XCharts.Editor
Action<Rect> drawCallback, params HeaderMenuInfo[] menus)
{
var rect = GUILayoutUtility.GetRect(1f, HEADER_HEIGHT);
var labelRect = DrawHeaderInternal(rect, title, state, drawBackground, activeField);
var labelRect = DrawHeaderInternal(rect, title, ref state, drawBackground, activeField);
DrawMenu(rect, menus);
if (drawCallback != null)
{
@@ -565,7 +568,7 @@ namespace XCharts.Editor
Action<Rect> drawCallback, List<HeaderMenuInfo> menus)
{
var rect = GUILayoutUtility.GetRect(1f, HEADER_HEIGHT);
var labelRect = DrawHeaderInternal(rect, title, state, drawBackground, activeField);
var labelRect = DrawHeaderInternal(rect, title, ref state, drawBackground, activeField);
DrawMenu(rect, menus);
if (drawCallback != null)
{
@@ -586,7 +589,7 @@ namespace XCharts.Editor
return state;
}
private static Rect DrawHeaderInternal(Rect rect, string title, bool state, bool drawBackground, SerializedProperty activeField)
private static Rect DrawHeaderInternal(Rect rect, string title, ref bool state, bool drawBackground, SerializedProperty activeField)
{
var splitRect = rect;
splitRect.x = EditorGUI.indentLevel * INDENT_WIDTH + 4;

View File

@@ -1,5 +1,3 @@
using UnityEditor;
using UnityEngine;
@@ -9,12 +7,11 @@ namespace XCharts.Editor
{
static readonly Color splitterDark = new Color(0.12f, 0.12f, 0.12f, 0.5f);
static readonly Color splitterLight = new Color(0.6f, 0.6f, 0.6f, 0.5f);
static readonly Texture2D paneOptionsIconDark = (Texture2D)EditorGUIUtility.Load("Builtin Skins/DarkSkin/Images/pane options.png");
static readonly Texture2D paneOptionsIconLight = (Texture2D)EditorGUIUtility.Load("Builtin Skins/LightSkin/Images/pane options.png");
static readonly Texture2D paneOptionsIconDark = (Texture2D) EditorGUIUtility.Load("Builtin Skins/DarkSkin/Images/pane options.png");
static readonly Texture2D paneOptionsIconLight = (Texture2D) EditorGUIUtility.Load("Builtin Skins/LightSkin/Images/pane options.png");
static readonly Color headerBackgroundDark = new Color(0.1f, 0.1f, 0.1f, 0.2f);
static readonly Color headerBackgroundLight = new Color(1f, 1f, 1f, 0.2f);
public static readonly GUIStyle headerStyle = UnityEditor.EditorStyles.boldLabel;
public static readonly GUIStyle foldoutStyle = new GUIStyle(UnityEditor.EditorStyles.foldout)
{
@@ -28,7 +25,6 @@ namespace XCharts.Editor
public static readonly GUIStyle invisibleButton = "InvisibleButton";
public static readonly GUIStyle smallTickbox = new GUIStyle("ShurikenToggle");
public static Color splitter { get { return EditorGUIUtility.isProSkin ? splitterDark : splitterLight; } }
public static Texture2D paneOptionsIcon { get { return EditorGUIUtility.isProSkin ? paneOptionsIconDark : paneOptionsIconLight; } }
public static Color headerBackground { get { return EditorGUIUtility.isProSkin ? headerBackgroundDark : headerBackgroundLight; } }

View File

@@ -1,4 +1,3 @@
using System.IO;
using UnityEditor;
using UnityEngine;

View File

@@ -1,4 +1,3 @@

using UnityEditor;
using XCharts.Runtime;

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using UnityEditor;
@@ -194,8 +193,7 @@ namespace XCharts.Editor
else if (a.StartsWith("selected:"))
{
string selected = a.Substring(9, a.Length - 9);
var baseInfo = serieData.GetOrAddComponent<SerieDataBaseInfo>();
baseInfo.selected = bool.Parse(selected);
serieData.selected = bool.Parse(selected);
}
}
serie.AddSerieData(serieData);

View File

@@ -1,4 +1,3 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
@@ -20,10 +19,8 @@ namespace XCharts.Editor
{
XCResourcesImporter m_ResourceImporter;
public XCResourceImporterProvider()
: base("Project/XCharts", SettingsScope.Project)
{
}
public XCResourceImporterProvider() : base("Project/XCharts", SettingsScope.Project)
{ }
public override void OnGUI(string searchContext)
{

View File

@@ -1,8 +1,7 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using XCharts.Runtime;
namespace XCharts.Editor
@@ -134,6 +133,7 @@ namespace XCharts.Editor
{
AddChart<CandlestickChart>("CandlestickChart");
}
[MenuItem("XCharts/PolarChart", priority = 54)]
[MenuItem("GameObject/XCharts/PolarChart", priority = 54)]
public static void PolarChart()

View File

@@ -1,4 +1,3 @@

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -278,13 +277,21 @@ namespace XCharts.Example
visualMap.range[0] = 0;
visualMap.range[1] = 100;
var colors = new List<string>{"#313695", "#4575b4", "#74add1", "#abd9e9", "#e0f3f8", "#ffffbf",
"#fee090", "#fdae61", "#f46d43", "#d73027", "#a50026"};
visualMap.inRange.Clear();
foreach (var str in colors)
var colors = new List<string>
{
visualMap.inRange.Add(ThemeStyle.GetColor(str));
}
"#313695",
"#4575b4",
"#74add1",
"#abd9e9",
"#e0f3f8",
"#ffffbf",
"#fee090",
"#fdae61",
"#f46d43",
"#d73027",
"#a50026"
};
visualMap.AddColors(colors);
var grid = chart.GetChartComponent<GridCoord>();
grid.left = 80;
grid.bottom = 100;

View File

@@ -1,4 +1,3 @@

using UnityEngine;
using XCharts.Runtime;

Some files were not shown because too many files have changed in this diff Show More