Compare commits
165 Commits
v3.0.0-pre
...
v3.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb2c3d8560 | ||
|
|
0c91f46aeb | ||
|
|
7d16cb2017 | ||
|
|
bdb171c4e6 | ||
|
|
d7ebfb1f41 | ||
|
|
c9d554d184 | ||
|
|
e0974fffbe | ||
|
|
cc63764eef | ||
|
|
687fc0d495 | ||
|
|
ce4e88c51c | ||
|
|
42a77a9439 | ||
|
|
bbab8d9b75 | ||
|
|
b1eae7045b | ||
|
|
a78eed9c5c | ||
|
|
a9fefae642 | ||
|
|
f6ad852a44 | ||
|
|
53610b53ca | ||
|
|
e1f20e0796 | ||
|
|
ab8ced4aed | ||
|
|
0662f62cd1 | ||
|
|
5ed6ee1d2a | ||
|
|
99769da035 | ||
|
|
75bf6e0e6c | ||
|
|
aec3e59aca | ||
|
|
1141208407 | ||
|
|
a9fe1f53b1 | ||
|
|
7f27325ce1 | ||
|
|
4c89bda4b9 | ||
|
|
bd9a0df52b | ||
|
|
eba8986f18 | ||
|
|
95c0bcdb75 | ||
|
|
4b8ca2e5e1 | ||
|
|
f0d6316c20 | ||
|
|
ae35a4d7e6 | ||
|
|
4e05759c3c | ||
|
|
ba9faa8bc6 | ||
|
|
afbfa20fd9 | ||
|
|
ac7628ce68 | ||
|
|
dd6833d322 | ||
|
|
a5e13794e8 | ||
|
|
16d055abc0 | ||
|
|
83744777c5 | ||
|
|
ccc5110e8e | ||
|
|
ce702fd1e3 | ||
|
|
a44eca0f91 | ||
|
|
8bd0c23e19 | ||
|
|
061ac49670 | ||
|
|
027f5f260c | ||
|
|
5f16685b64 | ||
|
|
6710a52950 | ||
|
|
de16bfad01 | ||
|
|
b01c2e4338 | ||
|
|
6ae4468aa2 | ||
|
|
48686e865c | ||
|
|
a885be625e | ||
|
|
a1d8f34720 | ||
|
|
b2f1fd00b1 | ||
|
|
442a51abc1 | ||
|
|
9552e877ce | ||
|
|
34dd3d1c4e | ||
|
|
9e07fa1db3 | ||
|
|
990c6dad90 | ||
|
|
99dc2af42a | ||
|
|
f32808a36d | ||
|
|
ca5470a351 | ||
|
|
34b132735d | ||
|
|
0f31f057df | ||
|
|
65d32f7aec | ||
|
|
fcc1314f17 | ||
|
|
9981ce2d23 | ||
|
|
f1f2ea78be | ||
|
|
d1f9c77571 | ||
|
|
19914586ae | ||
|
|
e7f19e72a5 | ||
|
|
35220a1026 | ||
|
|
b9812a4f98 | ||
|
|
74b078c926 | ||
|
|
44dc1f7b16 | ||
|
|
cdf0bc81e1 | ||
|
|
5b2b2d4059 | ||
|
|
b3b0c0b3aa | ||
|
|
4f93628667 | ||
|
|
8dde322c04 | ||
|
|
47ee421913 | ||
|
|
0355e3ed46 | ||
|
|
eedafa7011 | ||
|
|
aee49322b7 | ||
|
|
96a49f2b11 | ||
|
|
131aabc76a | ||
|
|
e42afe8d47 | ||
|
|
69243b7cd0 | ||
|
|
12757eb4db | ||
|
|
945a69ba70 | ||
|
|
9aa8431432 | ||
|
|
a499002426 | ||
|
|
4d5e2481b0 | ||
|
|
2248b61d03 | ||
|
|
419715bb2a | ||
|
|
f5c2e73098 | ||
|
|
197402dcb7 | ||
|
|
33fd4aa9f3 | ||
|
|
9b263c883b | ||
|
|
06574a201a | ||
|
|
fbdb51d847 | ||
|
|
47c9b99931 | ||
|
|
bb9f28dd5c | ||
|
|
0f2f55e436 | ||
|
|
6c9528cf19 | ||
|
|
91b9055039 | ||
|
|
564ff2e178 | ||
|
|
2a03e71312 | ||
|
|
0dbcc4ab2b | ||
|
|
f19b61f1f2 | ||
|
|
9a1c76c236 | ||
|
|
7c07499e44 | ||
|
|
8a6253621b | ||
|
|
5bc14dd37a | ||
|
|
b11e8fcb3a | ||
|
|
df0a87c935 | ||
|
|
431cf7de74 | ||
|
|
87049b5170 | ||
|
|
c24d89c8ab | ||
|
|
e8c46b676f | ||
|
|
0880b2f3f9 | ||
|
|
1d1ad6fa57 | ||
|
|
6e87f82131 | ||
|
|
9549159a58 | ||
|
|
e370bedc09 | ||
|
|
5740882d1c | ||
|
|
63166e5cd1 | ||
|
|
6ba6a7929d | ||
|
|
e0a596d02a | ||
|
|
9b7ebea827 | ||
|
|
0ad4a47c36 | ||
|
|
1ac59dff86 | ||
|
|
bafe032bb9 | ||
|
|
003f4da9de | ||
|
|
d77e1c3d91 | ||
|
|
d4b3f5eaa8 | ||
|
|
8a78867961 | ||
|
|
d9266b3c9c | ||
|
|
0801069f72 | ||
|
|
e92afac0de | ||
|
|
d1fd4dcf44 | ||
|
|
43c31405b8 | ||
|
|
4e4d0bc85d | ||
|
|
96b0ec45d2 | ||
|
|
8c02ce14ac | ||
|
|
419c704b23 | ||
|
|
9dedc1db68 | ||
|
|
f11ee84517 | ||
|
|
dfa978afe0 | ||
|
|
4e6658ad70 | ||
|
|
ef5988a851 | ||
|
|
5d6c5b5f79 | ||
|
|
80e4475f65 | ||
|
|
84cf39df4d | ||
|
|
d44bf55a87 | ||
|
|
ad273cf1b1 | ||
|
|
a3d2d3f1d5 | ||
|
|
7ca4ddcb88 | ||
|
|
9a3461084c | ||
|
|
09df6fa73d | ||
|
|
be4ed41ca6 | ||
|
|
e2b0c935e0 |
2
.github/FUNDING.yml
vendored
@@ -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']
|
||||
|
||||
265
CHANGELOG.md
@@ -1,18 +1,28 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
[master](#master)
|
||||
[v3.0.0-preivew7](#v3.0.0-preivew7)
|
||||
[v3.0.0-preivew6](#v3.0.0-preivew6)
|
||||
[v3.0.0-preivew5](#v3.0.0-preivew5)
|
||||
[v3.0.0-preivew4](#v3.0.0-preivew4)
|
||||
[v3.0.0-preivew3](#v3.0.0-preivew3)
|
||||
[v3.0.0-preivew2](#v3.0.0-preivew2)
|
||||
[v3.0.0-preivew1](#v3.0.0-preivew1)
|
||||
[master](#master)
|
||||
[v3.4.0](#v3.4.0)
|
||||
[v3.3.0](#v3.3.0)
|
||||
[v3.2.0](#v3.2.0)
|
||||
[v3.1.0](#v3.1.0)
|
||||
[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)
|
||||
[v3.0.0-preivew6](#v3.0.0-preivew6)
|
||||
[v3.0.0-preivew5](#v3.0.0-preivew5)
|
||||
[v3.0.0-preivew4](#v3.0.0-preivew4)
|
||||
[v3.0.0-preivew3](#v3.0.0-preivew3)
|
||||
[v3.0.0-preivew2](#v3.0.0-preivew2)
|
||||
[v3.0.0-preivew1](#v3.0.0-preivew1)
|
||||
[v2.8.1](#v2.8.1)
|
||||
[v2.8.0](#v2.8.0)
|
||||
[v2.7.0](#v2.7.0)
|
||||
[v2.6.0](#v2.6.0)
|
||||
[v2.5.0](#v2.5.0)
|
||||
[v2.4.0](#v2.4.0)
|
||||
[v2.4.0](#v2.4.0)
|
||||
[v2.3.0](#v2.3.0)
|
||||
[v2.2.3](#v2.2.3)
|
||||
[v2.2.2](#v2.2.2)
|
||||
@@ -50,6 +60,227 @@
|
||||
|
||||
## master
|
||||
|
||||
## v3.4.0
|
||||
|
||||
### 版本要点
|
||||
|
||||
* 增加`Axis`的`indicatorLabel`,可单独设置不同的指示文本样式
|
||||
* 增加`Serie`的`markColor`可设置标识颜色
|
||||
* 增加`RadarCoord`的`startAngle`可设置`Radar`起始角度
|
||||
* 优化`Axis`的数值间隔表现
|
||||
* 增加`DataZoom`对数值轴的支持
|
||||
* 增加`Line`的`SmoothLimit`可控制平滑曲线不同效果
|
||||
|
||||
### 日志详情
|
||||
|
||||
* (2022.11.01) 发布`v3.4.0`版本
|
||||
* (2022.10.30) 增加`API`:`AddData()`、`ClearSerieData()`、`ClearComponentData()`
|
||||
* (2022.10.30) 增加`Axis`的`indicatorLabel`,移除`Tooltip`的`indicatorLabelStyle` (#226)
|
||||
* (2022.10.29) 增加`Serie`的`markColor`可设置标识颜色用于`Legend`和`Tooltip`的展示 (#229)
|
||||
* (2022.10.26) 增加`RadarCoord`的`startAngle`可设置`Radar`起始角度
|
||||
* (2022.10.21) 修复`Chart`在受`Layout`控制时`Label`显示不正常的问题 (#231)
|
||||
* (2022.10.21) 修复`Unity2019.2`上的兼容问题
|
||||
* (2022.10.18) 优化`Axis`的数值表现
|
||||
* (2022.10.15) 修复`Axis`的`Label`在`DataZoom`开启时可能显示不正常的问题 (#227)
|
||||
* (2022.10.14) 增加`DataZoom`对数值轴的支持
|
||||
* (2022.10.13) 修复`Pie`的环形饼图设置边框时效果异常的问题 (#225)
|
||||
* (2022.10.13) 修复`Download`的接口造成`iOS`平台打包失败的问题
|
||||
* (2022.10.12) 增加`Animation`的`UnscaledTime`支持设置动画是否受TimeScale的影响 (#223)
|
||||
* (2022.10.10) 优化`Documentation`文档格式
|
||||
* (2022.10.10) 增加`Line`的`SmoothLimit`可控制平滑曲线不同效果
|
||||
* (2022.10.05) 修复`Serie`隐藏时`Tooltip`还显示信息的问题
|
||||
* (2022.09.30) 修复`Chart`在很小尺寸时出现`DivideByZeroException`异常的问题 (#230)
|
||||
|
||||
## v3.3.0
|
||||
|
||||
### 版本要点
|
||||
|
||||
* 优化图表细节,支持更多功能
|
||||
* 增加大量的Demo示例
|
||||
* 完善文档,修复若干问题
|
||||
* 新增PolarChart对Bar、Heatmap的支持
|
||||
* 新增HeatmapChart热力图类型
|
||||
* 完善Tooltip显示
|
||||
|
||||
### 日志详情
|
||||
|
||||
* (2022.09.28) 发布`v3.3.0`版本
|
||||
* (2022.09.26) 优化`Axis`在类目轴时的默认分割段数
|
||||
* (2022.09.25) 修复`API`文档中部分接口没有导出的问题
|
||||
* (2022.09.24) 优化`FunnelChart`
|
||||
* (2022.09.23) 优化`ParallelChart`
|
||||
* (2022.09.22) 增加`SaveAsImage()`接口保存图表到图片
|
||||
* (2022.09.21) 修复`InsertSerie()`接口不刷新图表的问题
|
||||
* (2022.09.21) 优化`PolarChart`对`Line`热力图的支持
|
||||
* (2022.09.20) 增加`PolarChart`对`Heatmap`热力图的支持
|
||||
* (2022.09.19) 增加`PolarChart`对多柱图和堆叠柱图的支持
|
||||
* (2022.09.16) 增加`PolarChart`对`Bar`柱图的支持
|
||||
* (2022.09.14) 增加`PolarCoord`可通过`radius`设置环形极坐标的支持
|
||||
* (2022.09.09) 修复`Editor`下编辑参数部分组件可能不会实时刷新的问题
|
||||
* (2022.09.08) 增加`RingChart`可设置`LabelLine`引导线的支持
|
||||
* (2022.09.06) 增加`SerieSymbol`的`minSize`和`maxSize`参数设置最大最小尺寸的支持
|
||||
* (2022.09.06) 增加`AxisSplitLine`的`showStartLine`和`showEndLine`参数设置是否显示首位分割线的支持
|
||||
* (2022.09.06) 增加`Heatmap`通过`symbol`设置不同的图案的支持
|
||||
* (2022.09.05) 增加`Heatmap`的`heatmapType`支持设置`Data`和`Count`两种不同映射方式的热力图
|
||||
* (2022.09.05) 优化`Tooltip`在热力图为数值轴时的指示
|
||||
* (2022.09.02) 增加`onPointerEnterPie`回调支持
|
||||
* (2022.09.02) 优化`HeatmapChart`
|
||||
* (2022.08.30) 优化`RadarChart`
|
||||
* (2022.08.30) 修复`DataZoom`在某些情况下计算范围不准确的问题 (#221)
|
||||
* (2022.08.29) 优化`BarChart`在数据过密时的默认表现
|
||||
* (2022.08.29) 优化`YAxis`在开启`DataZoom`时的最大最小值计算
|
||||
* (2022.08.29) 优化`CandlestickChart`大量数据绘制
|
||||
* (2022.08.28) 修复`LineChart`在堆叠和自定义Y轴范围的情况下显示不正常的问题
|
||||
* (2022.08.26) 增加`Legend`新图标类型`Candlestick`
|
||||
* (2022.08.26) 优化`CandlestickChart`表现,调整相关的`AddData()`接口参数
|
||||
* (2022.08.26) 增加`Tooltip`的`position`参数支持设置移动平台不同的显示位置
|
||||
* (2022.08.26) 删除`Tooltip`的`fixedXEnable`和`fixedYEnable`参数
|
||||
* (2022.08.25) 优化`EmphasisStyle`对`label`的支持
|
||||
* (2022.08.25) 增加`formatter`对`{d3}`指定维度数据百分比的支持
|
||||
* (2022.08.24) 修复`ScatterChart`的`label`不刷新的问题
|
||||
* (2022.08.24) 修复`MarkLine`的`label`某些情况下显示异常的问题
|
||||
|
||||
## v3.2.0
|
||||
|
||||
### 版本要点
|
||||
|
||||
* `Serie`支持高亮,淡出和选中三状态配置:`EmphasisStyle`,`BlurStyle`和`SelectStyle`
|
||||
* `Axis`支持坐标轴次刻度和次分割线:`MinorTick`和`MinorSplitLine`
|
||||
* `Serie`支持不同的取色策略:`colorBy`
|
||||
* `Radar`支持平滑曲线:`smooth`
|
||||
* `Line`支持当作凸多边形填充:`AreaStyle`的`innerFill`
|
||||
* `DataZoom`支持时间轴
|
||||
* 其他优化和修复
|
||||
|
||||
### 日志详情
|
||||
|
||||
* (2022.08.16) 发布`v3.2.0`版本
|
||||
* (2022.08.15) 优化`Smooth`贝塞尔曲线算法
|
||||
* (2022.08.13) 修复`DataZoom`组件开启时图表显示效果可能不正确的问题
|
||||
* (2022.08.11) 优化`Tooltip`支持`ignoreDataDefaultContent`
|
||||
* (2022.08.10) 修复`Chart`在3D相机下部分组件显示异常的问题
|
||||
* (2022.08.10) 修复`RemoveSerie()`接口不生效的问题 (#219)
|
||||
* (2022.08.10) 优化`Theme`的字体同步操作
|
||||
* (2022.08.10) 优化`Chart`的默认`layer`设置为`UI`
|
||||
* (2022.08.09) 优化`Axis`的`Time`时间轴的次分割线
|
||||
* (2022.08.09) 增加`AreaStyle`的`innerFill`参数支持填充凸多边形
|
||||
* (2022.08.08) 优化`Serie`的数据项索引维护,增加检测和修复功能,修复相关问题
|
||||
* (2022.07.29) 修复`Unity`版本兼容:在某些版本导入后图表创建异常的问题
|
||||
* (2022.07.29) 增加`Axis`为`Time`时间轴时,支持次刻度和次分割线
|
||||
* (2022.07.28) 优化`Radar`雷达图效果
|
||||
* (2022.07.28) 增加`Serie`的`colorBy`参数配置取色策略
|
||||
* (2022.07.27) 增加`StateStyle`的`Symbol`用于配置状态下的标记样式
|
||||
* (2022.07.27) 去掉`SerieSymbol`的`selectedSize`参数
|
||||
* (2022.07.24) 增加`Serie`和`SerieData`的`state`设置默认状态
|
||||
* (2022.07.22) 增加`Serie`的三种状态`EmphasisStyle`,`BlurStyle`,`SelectStyle`
|
||||
* (2022.07.22) 去掉`AreaStyle`的`highlightColor`和`highlightToColor`参数
|
||||
* (2022.07.22) 去掉`Emphasis`,`EmphasisItemStyle`,`EmphasisLabelStyle`,`EmphasisLabelLine`组件
|
||||
* (2022.07.20) 增加`Since`特性对类的支持
|
||||
* (2022.07.20) 修复`Axis`在`Value`轴时,`AxisLabel`的`showStartLabel`和`showEndLabel`参数设置不生效的问题
|
||||
* (2022.07.19) 增加`Axis`的`MinorSplitLine`设置坐标轴次分割线
|
||||
* (2022.07.19) 增加`Axis`的`MinorTick`设置坐标轴次刻度
|
||||
* (2022.07.17) 增加`Radar`的`smooth`参数设置平滑曲线
|
||||
* (2022.07.15) 增加`DataZoom`对`Time`时间轴的支持
|
||||
|
||||
## v3.1.0
|
||||
|
||||
### 版本要点
|
||||
|
||||
* 优化`Axis`
|
||||
* 优化`Tooltip`
|
||||
* 优化平滑曲线算法
|
||||
* 优化代码动态创建图表
|
||||
* 完善配置项手册
|
||||
* 修复若干问题
|
||||
|
||||
### 日志详情
|
||||
|
||||
* (2022.07.12) 发布`v3.1.0`版本
|
||||
* (2022.07.12) 修复`Serie`的`ignoreLineBreak`不生效的问题
|
||||
* (2022.07.07) 优化`Axis`的`minMaxType`指定为`MinMax`时支持精确到小数
|
||||
* (2022.07.05) 修复`Chart`里有多个坐标系时绘制异常的问题 (#210)
|
||||
* (2022.07.04) 增加`Settings`的`axisMaxSplitNumber`参数设置`Axis`的最大分隔段数
|
||||
* (2022.07.04) 修复`Axis`在设置`offset`后`Tick`绘制位置异常的问题 (#209)
|
||||
* (2022.07.03) 优化`AxisLabel`的`formatterFunction`自定义委托
|
||||
* (2022.07.03) 增加`AxisName`的`onZero`参数支持设置坐标轴名称位置是否和Y轴0刻度一致 (#207)
|
||||
* (2022.07.02) 修复`PieChart`用代码动态创建时`Legend`不正常的问题 (#206)
|
||||
* (2022.07.02) 修复`YAxis`的`AxisLabel`设置`onZero`不生效的问题
|
||||
* (2022.07.02) 修复`AxisLabel`代码设置`distance`属性后一直刷新的问题
|
||||
* (2022.06.30) 修复`Runtime`下代码创建图表时组件无法初始化的问题
|
||||
* (2022.06.29) 增加`Tooltip`的`itemFormatter`支持`{c0}`显示各维度数据 (#205)
|
||||
* (2022.06.28) 优化`Pie`设置`avoidLabelOverlap`时的文本表现 (#56)
|
||||
* (2022.06.25) 优化`Line`的平滑曲线表现 (#169)
|
||||
* (2022.06.25) 修复`DataZoom`开启时`Tooltip`显示数据不一致的问题 (#203)
|
||||
* (2022.06.25) 修复`Toolip`在类目轴无数据时绘制异常的问题 (#204)
|
||||
* (2022.06.25) 优化`Serie`设置`PlaceHolder`时的`Tooltip`表现
|
||||
* (2022.06.25) 增加`Since`特效用于标识配置参数从哪个版本开始支持
|
||||
* (2022.06.24) 优化`Painter`绘制层,`Top`层细分为`Upper`和`Top`层
|
||||
* (2022.06.24) 增加`Legend`对`Background`和`Padding`的支持
|
||||
* (2022.06.21) 增加`TextStyle`对`TextMeshPro`的`Sprite Asset`支持 (#201)
|
||||
* (2022.06.20) 优化`Tooltip`的边界限制 (#202)
|
||||
* (2022.06.20) 修复`TextMeshPro`开启时编译错误
|
||||
* (2022.06.20) 修复`Animation`的渐出动画不生效的问题
|
||||
|
||||
## 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`版本
|
||||
* (2022.05.05) 优化`ItemStyle`设置`color`时的一致性
|
||||
* (2022.05.05) 增加`Line`对`Dash`,`Dot`等的支持 (#197)
|
||||
* (2022.05.04) 增加`Legend`的委托回调
|
||||
* (2022.05.04) 优化`Symbol`和`Label`
|
||||
* (2022.05.01) 增加`Bar`对`clip`的支持 (#196)
|
||||
* (2022.05.01) 修复`RingChart`的`Label`不刷新的问题 (#195)
|
||||
* (2022.04.29) 增加`Tooltip`支持自定义背景图
|
||||
* (2022.04.27) 修复`ItemStyle`代码修改`color`不刷新的问题
|
||||
|
||||
## v3.0.0-preivew8
|
||||
|
||||
* (2022.04.26) 发布`v3.0.0-preivew8`版本
|
||||
* (2022.04.23) 移除`Serie`的`IconStyle`组件
|
||||
* (2022.04.23) 强化`LabelStyle`,所有组件的`TextStyle`都升级为`LabelStyle`
|
||||
* (2022.04.19) 增加`Label`的`rotate`支持设置旋转
|
||||
* (2022.04.17) 修复`Bar`在数值为负数时动画无效的问题
|
||||
* (2022.04.17) 增加`ItemStyle`的`BorderGap`支持设置边框间距
|
||||
* (2022.04.16) 优化`Bar`的`Border`和`Capsule`胶囊柱图
|
||||
* (2022.04.15) 增加`Liquid`对`Round Rect`圆角矩形水位图的支持
|
||||
* (2022.04.14) 增加`Line`对`EndLabel`的支持
|
||||
* (2022.04.13) 增加`VisualMap`的`workOnLine`和`workOnArea`支持折线和区域映射功能 (#191)
|
||||
* (2022.04.12) 优化`Radar`支持`Area`区域触发`Tooltip`
|
||||
* (2022.04.09) 优化`VisualMap`
|
||||
* (2022.04.09) 优化`Tooltip`
|
||||
|
||||
## v3.0.0-preivew7
|
||||
|
||||
* (2022.04.07) 发布`v3.0.0-preivew7`版本
|
||||
@@ -81,6 +312,22 @@
|
||||
|
||||
* (2022.01.07) 发布`v3.0.0-preivew1`版本
|
||||
|
||||
## v2.8.1
|
||||
|
||||
* (2022.05.06) 发布`v2.8.1`版本
|
||||
* (2022.05.03) 增加`Legend`的`onLegendClick`,`onLegendEnter`和`onLegendExit`委托回调
|
||||
* (2022.04.21) 修复`RingChart`的`Tooltip`异常的问题 #192
|
||||
* (2022.04.21) 修复`DataZoom`设置`minShowNum`时可能会报错的问题
|
||||
|
||||
## v2.8.0
|
||||
|
||||
* (2022.04.10) 发布`v2.8.0`版本
|
||||
* (2022.04.10) 增加`Debug`调试信息面板
|
||||
* (2022.04.09) 修复`VisualMap`某些情况下不生效的问题
|
||||
* (2022.04.08) 优化`XCharts`初始化 #190
|
||||
* (2022.04.08) 修复`Radar`的颜色异常问题 #187
|
||||
* (2022.03.24) 修复`Axis`的精度问题 #184
|
||||
|
||||
## v2.7.0
|
||||
|
||||
* (2022.03.20) 发布`v2.7.0`版本
|
||||
|
||||
@@ -2,6 +2,27 @@
|
||||
# 更新日志
|
||||
|
||||
[master](#master)
|
||||
[v3.4.0](#v3.4.0)
|
||||
[v3.3.0](#v3.3.0)
|
||||
[v3.2.0](#v3.2.0)
|
||||
[v3.1.0](#v3.1.0)
|
||||
[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)
|
||||
[v3.0.0-preivew6](#v3.0.0-preivew6)
|
||||
[v3.0.0-preivew5](#v3.0.0-preivew5)
|
||||
[v3.0.0-preivew4](#v3.0.0-preivew4)
|
||||
[v3.0.0-preivew3](#v3.0.0-preivew3)
|
||||
[v3.0.0-preivew2](#v3.0.0-preivew2)
|
||||
[v3.0.0-preivew1](#v3.0.0-preivew1)
|
||||
[v2.8.1](#v2.8.1)
|
||||
[v2.8.0](#v2.8.0)
|
||||
[v2.7.0](#v2.7.0)
|
||||
[v2.6.0](#v2.6.0)
|
||||
[v2.5.0](#v2.5.0)
|
||||
[v2.4.0](#v2.4.0)
|
||||
[v2.3.0](#v2.3.0)
|
||||
[v2.2.3](#v2.2.3)
|
||||
[v2.2.2](#v2.2.2)
|
||||
@@ -39,7 +60,267 @@
|
||||
|
||||
## master
|
||||
|
||||
* (2021.08.15) Fixed the problem of displaying exceptions after adding data again when `DataZoom` is enable (#163)
|
||||
## v3.4.0
|
||||
|
||||
### Highlights
|
||||
|
||||
* Added `indicatorLabel` of `Axis` to set different indicator text styles separately
|
||||
* Add `markColor` of `Serie` to set the logo color
|
||||
* Add `startAngle` of `RadarCoord` to set the starting Angle of `Radar`
|
||||
* Optimize the numerical interval representation of `Axis`
|
||||
* Added `DataZoom` support for numeric axes
|
||||
* Add `SmoothLimit` of `Line` to control different effects of smoothing curves
|
||||
|
||||
### Details
|
||||
|
||||
* (2022.11.01) Release `v3.4.0` version
|
||||
* (2022.10.30) adds API: `AddData()`, `ClearSerieData()`, `ClearComponentData()`
|
||||
* (2022.10.30) Added `Axis`'s `indicatorLabel`, removed `Tooltip`'s `indicatorLabelStyle` (#226)
|
||||
* (2022.10.29) Add `Serie` `markColor` to set logo colors for display of `Legend` and `Tooltip` (#229)
|
||||
* (2022.10.26) increase the startAngle of RadarCoord to set the startAngle of Radar
|
||||
* (2022.10.21) Fixed `Chart` not displaying `Label` properly when controlled by `Layout` (#231)
|
||||
* (2022.10.21) fixed compatibility issues on Unity2019.2
|
||||
* (2022.10.18) Optimize the numerical performance of `Axis`
|
||||
* (2022.10.15) Fixed an issue where `Axis` `Label` might not appear properly when `DataZoom` is enabled (#227)
|
||||
* (2022.10.14) Added `DataZoom` support for numeric axes
|
||||
* (2022.10.13) Fixed the `Pie` circle with abnormal border Settings (#225)
|
||||
* (2022.10.13) Fixed the `Download` interface causing the `iOS` platform packaging failure
|
||||
* (2022.10.12) Added support for `Animation` `UnscaledTime` to set whether the animation is affected by TimeScale (#223)
|
||||
* (2022.10.10) Optimizes the `Documentation` format
|
||||
* (2022.10.10) Add `Line` `SmoothLimit` to control different effects of smoothing curves
|
||||
* (2022.10.05) Fixed an issue where `Serie` hid information when `Tooltip` was also displayed
|
||||
* (2022.09.30) Fixed `DivideByZeroException` when Chart `is very small (#230)
|
||||
|
||||
## v3.3.0
|
||||
|
||||
### Highlights
|
||||
|
||||
* Optimized chart details to support more functions
|
||||
* Add lots of Demo examples
|
||||
* Improved documentation and fixed several issues
|
||||
* Added PolarChart support for Bar and Heatmap
|
||||
* Added a HeatmapChart type
|
||||
* Improved Tooltip display
|
||||
|
||||
### Details
|
||||
|
||||
* (2022.09.26) Optimizes the default number of segments for `Axis` at the category Axis
|
||||
* (2022.09.25) Fixed the problem that some interfaces in the `API` document were not exported
|
||||
* (2022.09.24) optimize `FunnelChart`
|
||||
* (2022.09.23) Optimizes `ParallelChart`
|
||||
* (2022.09.22) Added `SaveAsImage()` interface to save charts to images
|
||||
* (2022.09.21) Fixed an issue where the `InsertSerie()` interface did not refresh the graph
|
||||
* (2022.09.21) Optimized `PolarChart` for `Line` thermal map support
|
||||
* (2022.09.20) Added `PolarChart` support for `Heatmap`
|
||||
* (2022.09.19) Added `PolarChart` support for multi-bar graphs and stacked bar graphs
|
||||
* (2022.09.16) Added `PolarChart` support for `Bar` histogram
|
||||
* (2022.09.14) Added support for `PolarCoord` to set ring polar coordinates via `Radius`
|
||||
* (2022.09.09) Fixed an issue where some components of edit parameters in `Editor` might not refresh in real time
|
||||
* (2022.09.08) Added support for `RingChart` settable `LabelLine` bootline
|
||||
* (2022.09.06) Added support for `SerieSymbol` `minSize` and `maxSize` parameters to set maximum and minimum sizes
|
||||
* (2022.09.06) Added support for `showStartLine` and `showEndLine` parameters for `AxisSplitLine` to set whether to display the first splitter
|
||||
* (2022.09.06) Added `Heatmap` support for different patterns via `symbol`
|
||||
* (2022.09.05) added `Heatmap` `heatmapType` support for setting `Data` and `Count` two different mapping methods of Heatmap
|
||||
* (2022.09.05) Optimizes `Tooltip` when indicating numerical axis in thermograph
|
||||
* (2022.09.02) Added `onPointerEnterPie` callback support
|
||||
* (2022.09.02) Optimize the HeatmapChart `
|
||||
* (2022.08.30) optimizes` RadarChart `
|
||||
* (2022.08.30) Fixed `DataZoom` calculation range inaccuracies in some cases (#221)
|
||||
* (2022.08.29) optimizes the default behavior of `BarChart` when data is too dense
|
||||
* (2022.08.29) optimizes `YAxis` Max/min calculations when `DataZoom` is enabled
|
||||
* (2022.08.29) optimized `CandlestickChart` massive data rendering
|
||||
* (2022.08.28) fixed an issue where `LineChart` does not appear properly in the case of stacking and custom Y-axis range
|
||||
* (2022.08.26) added `Legend` new icon type `Candlestick`
|
||||
* (2022.08.26) optimizes` CandlestickChart `performance and adjusts related` AddData() `interface parameters
|
||||
* (2022.08.26) Added support for setting different display positions in Tooltip's `position` parameter
|
||||
* (2022.08.26) Delete the `fixedXEnable` and `fixedYEnable` arguments of Tooltip
|
||||
* (2022.08.25) EmphasisStyle `EmphasisStyle` has emphasised the support for `label`
|
||||
* (2022.08.25) Added support for `formatter` for `{d3}` specified percentage of dimension data
|
||||
* (2022.08.24) fixed the `label` of the `ScatterChart` not refreshing
|
||||
* (2022.08.24) fixed abnormal display of `label` of `MarkLine` in some cases
|
||||
|
||||
## v3.2.0
|
||||
|
||||
### Highlights
|
||||
|
||||
* `Serie` supports highlighting, EmphasisStyle, EmphasisStyle, BlurStyle, and SelectStyle
|
||||
* `Axis` supports sub-scale and sub-partition of coordinate axes:`MinorTick` and `MinorSplitLine`
|
||||
* `Serie` supports different color selection strategies: `colorBy`
|
||||
* `Radar` supports smooth curves: `smooth`
|
||||
* `Line` supports filling as a convex polygon: `AreaStyle` `innerFill`
|
||||
* `DataZoom` supports timeline
|
||||
* Other optimizations and issue fixes
|
||||
|
||||
### Details
|
||||
|
||||
* (2022.08.16) Release `v3.2.0` version
|
||||
* (2022.08.15) optimized `Smooth` Bezier curve algorithm
|
||||
* (2022.08.13) Fixed an issue where the `DataZoom` component might not display correctly when opened
|
||||
* (2022.08.11) Optimized Tooltip supports `ignoreDataDefaultContent`
|
||||
* (2022.08.10) fixed abnormal display of some components of `Chart` under 3D camera
|
||||
* (2022.08.10) Fix `RemoveSerie()` interface not working (#219)
|
||||
* (2022.08.10) Optimized font synchronization for Theme
|
||||
* (2022.08.10) optimizes the default `layer` of Chart to `UI`
|
||||
* (2022.08.09) optimizes the `Time` timeline of `Axis`
|
||||
* (2022.08.09) added AreaStyle `innerFill` parameter to support filling convex polygons
|
||||
* (2022.08.08) Optimized the maintenance of data item indexes in `Serie`, added detection and repair functions, and fixed related problems
|
||||
* (2022.07.29) Fixed `Unity` version compatibility: Chart creation exception after some versions import
|
||||
* (2022.07.29) Add `Axis` to` Time `timeline, support sub-scale and sub-divider
|
||||
* (2022.07.28) optimizes the `Radar` image
|
||||
* (2022.07.28) increase `Serie` `colorBy` parameter configuration color taking strategy
|
||||
* (2022.07.27) Adds StateStyle `Symbol` to configure the Symbol style in the state
|
||||
* (2022.07.27) remove selectedSize from SerieSymbol
|
||||
* (2022.07.24) adds default state Settings for `Serie` and `SerieData`
|
||||
* (2022.07.22) add three states` EmphasisStyle `, `EmphasisStyle`, `SelectStyle` of `Serie`
|
||||
* (2022.07.22) remove `highlightColor` and `highlightToColor` arguments from `AreaStyle`
|
||||
* (2022.07.22) Omit the `Emphasis`,` EmphasisItemStyle `, `EmphasisLabelStyle`, `EmphasisLabelLine` component
|
||||
* (2022.07.20) Added `Since` feature support for classes
|
||||
* (2022.07.20) fixed the `showStartLabel` and `showEndLabel` parameter Settings for `AxisLabel` not taking effect when `Axis` is on the` Value `Axis
|
||||
* (2022.07.19) added `Axis` to` MinorSplitLine `to set the Axis degree divider
|
||||
* (2022.07.19) added `Axis` `MinorTick` to set the Axis sub-scale
|
||||
* (2022.07.17) Add the `smooth` parameter for Radar to set the smooth curve
|
||||
* (2022.07.15) added DataZoom support for the `Time` timeline
|
||||
|
||||
## v3.1.0
|
||||
|
||||
* (2022.07.12) Release `v3.1.0` version
|
||||
* (2022.07.12) Fixed `Serie` `ignoreLineBreak` not working
|
||||
* (2022.07.07) Optimized `Axis` `minMaxType` to support precision to decimals when specified as `MinMax`
|
||||
* (2022.07.05) Fixed drawing exception when there are multiple coordinate systems in `Chart` (#210)
|
||||
* (2022.07.04) Added the axisMaxSplitNumber parameter of `Settings` to set the maximum number of partitions for `Axis`
|
||||
* (2022.07.04) Fixed Axis` Tick `drawing position after setting `offset`(#209)
|
||||
* (2022.07.03) Optimize the `AxisLabel` formatterFunction custom delegate
|
||||
* (2022.07.03) added the `onZero` parameter of `AxisName` to support setting the coordinate AxisName and position to match the Y-axis 0 scale (#207)
|
||||
* (2022.07.02) Fixed bug where `Legend` was not working when `PieChart` was being created dynamically with code (#206)
|
||||
* (2022.07.02) Fixed `YAxis` AxisLabel setting `onZero` not working
|
||||
* (2022.07.02) Fixed `AxisLabel` code refreshing after setting `distance` property
|
||||
* (2022.06.30) Fixed an issue where components could not be initialized when creating diagrams under `Runtime` code
|
||||
* (2022.06.29) Added `itemFormatter` support for `{c0}` in `Tooltip` to display dimension data (#205)
|
||||
* (2022.06.28) Optimize text performance when `Pie` sets up `avoidLabelOverlap` (#56)
|
||||
* (2022.06.25) Optimize smooth curve representation of `Line` (#169)
|
||||
* (2022.06.25) Fixed inconsistent display of `Tooltip` when `DataZoom` is enabled (#203)
|
||||
* (2022.06.25) Fixed `Toolip` drawing exception when there is no data in the category axis (#204)
|
||||
* (2022.06.25) Optimize `Serie` setting `PlaceHolder` for `Tooltip` performance
|
||||
* (2022.06.25) Added `Since` to identify the version from which the configuration parameter is supported
|
||||
* (2022.06.24) Optimize `Painter` drawing layer, `Top` layer is subdivided into `Upper` and `Top` layers
|
||||
* (2022.06.24) Added `Legend` support for `Background` and `Padding`
|
||||
* (2022.06.21) Added `TextStyle` support for `Sprite Asset` of `TextMeshPro` (#201)
|
||||
* (2022.06.20) Optimize boundary limits for `Tooltip` (#202)
|
||||
* (2022.06.20) Fixes compilation error when `TextMeshPro` is turned on
|
||||
* (2022.06.20) Fixed issue where the fade Animation of `Animation` would not work
|
||||
|
||||
## v3.0.1
|
||||
|
||||
* (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.
|
||||
|
||||
## v3.0.0_preview9
|
||||
|
||||
## v3.0.0_preview8
|
||||
|
||||
## v3.0.0_preview7
|
||||
|
||||
## v3.0.0_preview6
|
||||
|
||||
## v3.0.0_preview5
|
||||
|
||||
## v3.0.0_preview4
|
||||
|
||||
## v3.0.0_preview3
|
||||
|
||||
## v3.0.0_preview2
|
||||
|
||||
## v3.0.0_preview1
|
||||
|
||||
## v2.8.1
|
||||
|
||||
* (2022.05.03) Added `onLegendClick`, `onLegendEnter` and `onLegendExit` delegate callbacks for `Legend`
|
||||
* (2022.04.21) Fixed bug #192 with `RingChart` `Tooltip` exception
|
||||
* (2022.04.21) Fixed error when setting `minShowNum` in `DataZoom`
|
||||
|
||||
## v2.8.0
|
||||
|
||||
* (2022.04.10) Added the debug information panel
|
||||
* (2022.04.09) Fixed `VisualMap` not working in some cases
|
||||
* (2022.04.08) Optimized `XCharts` initialization #190
|
||||
* (2022.04.08) Fixed color error #187 in `Radar`
|
||||
* (2022.03.24) Fixed `Axis` precision issue #184
|
||||
|
||||
## v2.7.0
|
||||
|
||||
* (2022.03.20) Release `v2.7.0` version
|
||||
* (2022.02.21) Fixed chart name repeat check error #183
|
||||
* (2022.02.17) Fixed bug where axis split line might be displayed outside the coordinate system #181
|
||||
* (2022.02.08) Fixed {d} formatter error when value is 0
|
||||
* (2022.02.08) Fixed `YAxis` `AxisLabel`'s `onZero` does not work
|
||||
* (2022.01.06) Improved `Zebra` bar chart
|
||||
|
||||
## v2.6.0
|
||||
|
||||
* (2021.12.30) Release `v2.6.0` version
|
||||
* (2021.12.21) Fixed `Emphasis` dont work
|
||||
* (2021.12.17) Fixed `MarkLine` does not auto refresh label active when serie hide #178
|
||||
* (2021.12.10) Improved `Radar`'s `AxisLine` and `SplitLine` to be controlled separately
|
||||
* (2021.12.08) Fixed y axis does not refresh when serie hidden
|
||||
* (2021.12.04) Added `Symbol` new types: `EmptyRect`, `EmptyTriangle`, `EmptyDiamond`
|
||||
* (2021.12.04) Added setting symbol empty area color by itemStyle's backgroundColor
|
||||
* (2021.12.03) Fixed formatter `{c}` not work #175
|
||||
* (2021.12.03) Fixed axis `boundaryGap` display error in some cases #174
|
||||
* (2021.11.30) Fixed serie `ignore` display error in some cases #173
|
||||
|
||||
## v2.5.0
|
||||
|
||||
* (2021.11.27) Release `v2.5.0` version
|
||||
* (2021.11.27) Added `Tooltip` delegate function `positionFunction`
|
||||
* (2021.10.29) Removed settings for `TextMeshPro` when package first imported
|
||||
* (2021.10.29) Added support for `{e}` in `Tooltip` #170
|
||||
* (2021.09.08) Improved `RadarChart`
|
||||
* (2021.09.07) Fixed bug where `label` does not disappear at the end of `PieChart` fade animation #168
|
||||
* (2021.09.06) Fixed bug where `GaugeChart` changing `splitNumber` with code does not refresh `label` #167
|
||||
|
||||
## v2.4.0
|
||||
|
||||
### Highlights
|
||||
|
||||
* LineChart support the line of ignore data is disconnected or connected
|
||||
* LineChart support animation at a constant speed
|
||||
* Other optimizations and bug fixes
|
||||
|
||||
### Details
|
||||
|
||||
* (2021.08.31) Release `v2.4.0` version
|
||||
* (2021.08.31) Optimized the gradient effect of `RingChart`
|
||||
* (2021.08.31) Fixed bug where `SerieLabel` does not refresh when `DataZoom` is dragged (#165)
|
||||
* (2021.08.25) Fixed an issue where the theme switch could not be save to the scene (#166)
|
||||
* (2021.08.24) Added `Animation`'s `alongWithLinePath`
|
||||
* (2021.08.22) Added `Serie`'s `ignoreLineBreak` (#164)
|
||||
* (2021.08.22) Fixed `Axis` label may not be updated when `DataZoom` is turn on (#164)
|
||||
* (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
|
||||
@@ -50,7 +331,7 @@
|
||||
|
||||
## v2.3.0
|
||||
|
||||
### Main points
|
||||
### Highlights
|
||||
|
||||
* Data store upgraded from `float` to `double`
|
||||
* Added `MarkLine`
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01f7eaa065d094f1f8955111a9bc447b
|
||||
guid: 7425bc5c378354c95bb116c36dc1b5f8
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
141
Documentation/README.md
Normal 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
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
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`
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29f30ecf23bb44bc5b0820dc5ee7a23e
|
||||
guid: 56516e67d6e88401e949d4e63792c638
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -1,40 +1,77 @@
|
||||
## 技术支持
|
||||
# 订阅服务
|
||||
|
||||
如需技术支持,可订阅VIP服务。扫后面的支付宝二维码后可加VIP群(`867291970`,验证信息请输入支付宝账号)。企业VIP可加官方群私聊群主了解详情。
|
||||
如需技术支持,可订阅`个人VIP`服务。扫后面的二维码后可加VIP群`867291970`,验证信息请输入付费的账号。
|
||||
企业商务合作可联系QQ:3525422251(XCharts技术支持)。
|
||||
|
||||
## 订阅服务
|
||||
## 订阅VIP服务
|
||||
|
||||
| |免费用户|个人`1`年`VIP`|个人`2`年`VIP` | 个人长期`VIP` |
|
||||
| ----- |--|--|--|--|
|
||||
| 订阅费用 | -- | `298`¥ | `498`¥ | `888`¥ |
|
||||
| 席位时长 | -- | `1`个席位<br>`1`年 | `1`个席位<br>`2`年 | `1`个席位<br>`长期` |
|
||||
||
|
||||
| <b>`服务方式:`</b>|
|
||||
| 官方QQ群交流 | √ | √ | √ | √ |
|
||||
| 专属VIP群交流 | | √ | √ | √ |
|
||||
| 即时一对一交流 | | √ | √ | √ |
|
||||
||
|
||||
| <b>`服务内容:`</b>|
|
||||
| 可商用 | √ | √ | √ | √ |
|
||||
| 可二次开发 | √ | √ | √ | √ |
|
||||
| 有问必答 | | √ | √ | √ |
|
||||
| 新手指导 | | √ | √ | √ |
|
||||
| 开发指导 | | √ | √ | √ |
|
||||
| 优化指导 | | √ | √ | √ |
|
||||
| 其他技术支持 | | √ | √ | √ |
|
||||
| 问题及时处理 | | √ | √ | √ |
|
||||
| 需求优先考虑 | | √ | √ | √ |
|
||||
| 可另付费定制 | | √ | √ | √ |
|
||||
| 可另付费加急 | | √ | √ | √ |
|
||||
| 付费模块85折 | | | | √ |
|
||||
订阅服务分个人订阅和企业订阅:
|
||||
|
||||
- `个人`订阅:`个人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`¥ | 首年`1298`¥<br/>后续`298¥`* | `联系我们` |
|
||||
| 订阅时长 | -- | `7`天* | `1`年 | `1`年* | `1`年
|
||||
| 订阅席位 | -- | `1`个席位 | `1`个席位 |`1`个席位|`5`个以上席位|
|
||||
| __`服务方式:`__|
|
||||
| 官方QQ群交流 | √ | √ | √ | √ | √ |
|
||||
| 即时一对一交流 | | √ | √ | √ | √ |
|
||||
| 专属VIP群交流 | | | √ | √ | √(专属企业群) |
|
||||
| __`服务内容:`__|
|
||||
| 可商用 | √ | √ | √ | √ | √ |
|
||||
| 可二次开发 | √ | √ | √ | √ | √ |
|
||||
| 有问必答 | | √ | √ | √ | √ |
|
||||
| 即时回答 | | √ | √ | √ | √ |
|
||||
| 新手指导 | | √ | √ | √ | √ |
|
||||
| 开发指导 | | √ | √ | √ | √ |
|
||||
| 优化指导 | | √ | √ | √ | √ |
|
||||
| 其他技术支持 | | | √ | √ | √ |
|
||||
| 问题及时处理 | | | √ | √ | √ |
|
||||
| 需求优先考虑 | | | √ | √ | √ |
|
||||
| 可另付费定制 | | | √ | √ | √ |
|
||||
| 可另付费加急 | | | √ | √ | √ |
|
||||
| VIP专有功能教程和文档 | | | √待开放 | √待开放 | √待开放 |
|
||||
| 扩展图表购买 | | | 按需购买 | __全部免费__ | 按需购买 |
|
||||
| 扩展图表源码 | | | 永久持有 | 永久持有 | 永久持有 |
|
||||
| 扩展图表更新 | | | 1年更新支持 | 1年更新支持 | 1年更新支持 |
|
||||
|
||||
## 购买扩展图表
|
||||
|
||||
扩展图表为另付费购买图表,只对订阅了`VIP`服务的用户开放购买。对于`SVIP`的订阅用户,所有扩展图表仓库可免费使用,不用再单独购买。
|
||||
|
||||
对所有已购买的扩展图表,源码可永久持有,并获得持续一年的更新支持,一年后如需更新支持服务,可继续订阅`VIP`服务。
|
||||
|
||||
|编号|扩展图表|价格|备注|
|
||||
|--|--|--|--|
|
||||
| 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`用户才享有`付费加急`权利。
|
||||
2. __`付费加急`__ 是指用户可对自己非常紧急的需求进行付费,将开发优先级提到最高,并可要求在`Deadline`内交付,只有`VIP`用户才享有`付费加急`权利。
|
||||
3. __`付费咨询`__ 付费咨询有效期`7`天,且总咨询时长不超过`7`个小时。
|
||||
4. __`扩展图表`__ 购买后代码可永久持有和商用,1年的更新支持。
|
||||
|
||||
## 捐助支持
|
||||
|
||||
如果这个项目对您有帮助,请右上方点 `Star` 予以支持!也欢迎任何金额的赞助,非常感谢!
|
||||
如果这个项目对您有帮助,请右上方点 `Star` 予以支持!也欢迎任意金额的捐助,非常您的支持!
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# XCharts FAQ
|
||||
|
||||
[XCharts Homepage](https://github.com/XCharts-Team/XCharts)</br>
|
||||
[XCharts API](XChartsAPI-EN.md)</br>
|
||||
[XCharts Homepage](https://github.com/XCharts-Team/XCharts)<br/>
|
||||
[XCharts API](XChartsAPI-EN.md)<br/>
|
||||
[XCharts Configuration](XChartsConfiguration-EN.md)
|
||||
|
||||
[QA 1: How to adjust the margin between the axis and the background?](#How-to-adjust-the-margin-between-the-axis-and-the=-background)
|
||||
@@ -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 Homepage](https://github.com/XCharts-Team/XCharts)<br/>
|
||||
[XCharts API](XChartsAPI-EN.md)<br/>
|
||||
[XCharts Configuration](XChartsConfiguration-EN.md)
|
||||
@@ -1,4 +1,4 @@
|
||||
# XCharts问答
|
||||
# 问答
|
||||
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)
|
||||
[XChartsAPI](XChartsAPI-ZH.md)
|
||||
@@ -32,7 +32,9 @@
|
||||
[QA 26:如何使用背景组件?有什么条件限制?](#如何使用背景组件_有什么条件限制)
|
||||
[QA 27:Mesh 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版本后很多自定义颜色丢失了_应该如何升级)
|
||||
[QA 29:如何修改Serie的Symbol的颜色?](#如何修改Serie的Symbol的颜色)
|
||||
[QA 30:导入或更新XCharts时TMP报错怎么办?](#导入或更新XCharts时TMP报错怎么办)
|
||||
[QA 31:支持空数据吗?如何实现折线图断开的效果?](#支持空数据吗_如何实现折线图断开的效果)
|
||||
|
||||
## 如何调整坐标轴与背景的边距
|
||||
|
||||
@@ -68,7 +70,7 @@
|
||||
|
||||
## 如何调整图表的对齐方式
|
||||
|
||||
答:默认为左下角对齐,暂不支持调整。可以通过包一层parent来辅助控制。(最新版本`1.5.0`及以上已支持任意锚点,可和做UI一样任意调整对其方式)。
|
||||
答:调整RectTransform的锚点,和UGUI的其他组件的用法一致。
|
||||
|
||||
## 可以显示超过1000以上的大数据吗
|
||||
|
||||
@@ -88,7 +90,7 @@
|
||||
|
||||
## 如何在数据项顶上显示文本
|
||||
|
||||
答:通过设置`Serie`下的`Label`。
|
||||
答:通过设置`Serie`下的`Label`。3.0版本需要先添加`LabelStyle`组件。
|
||||
|
||||
## 如何给数据项自定义图标
|
||||
|
||||
@@ -124,7 +126,7 @@
|
||||
|
||||
## 如何做成预设
|
||||
|
||||
答:请删除chart下所有的子组件再拖成预设。
|
||||
答:做成prefab前,执行一下`Rebuild Chart Object`重新刷新节点,避免有冗余的节点存在。
|
||||
|
||||
## 如何在图表上画点画线等自定义内容
|
||||
|
||||
@@ -150,17 +152,20 @@
|
||||
|
||||
答:检测下代码里是否调用了`RemoveData()`并重新添加`Serie`了。如果想保留`Serie`的配置可以只`ClearData()`,然后重新添加数据。
|
||||
|
||||
## 为什么升级到1_6_0版本后很多自定义颜色丢失了_应该如何升级
|
||||
## 如何修改Serie的Symbol的颜色
|
||||
|
||||
答: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`下,由于旧版本可能不存在某些新版本才有的图表或者属性配置,可能会编译错误,需要处理按3,4步骤处理一下。
|
||||
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`下的话需要拷贝到此目录下)。
|
||||
答:`Symbol` 的颜色是使用的 `ItemStyle` 的 `color`。
|
||||
|
||||
## 导入或更新XCharts时TMP报错怎么办
|
||||
|
||||
答:XCharts默认时不开启TMP,所以asmdef上没有TMP的引用。当本地开启TMP后再更新XCharts可能会出现这个问题。可通过以下两种方式解决:
|
||||
|
||||
1. 找到`XCharts.Runtime.asmdef`和`XCharts.Editor.asmdef`,手动加上 `TextMeshPro`的引用
|
||||
2. 移除`PlayerSetting`中`Scripting Define Symbols`的`dUI_TextMeshPro`宏
|
||||
|
||||
## 支持空数据吗_如何实现折线图断开的效果
|
||||
|
||||
答:`Serie`的`data`是`double`类型,所以无法表示空数据。可通过开启`Serie`的`ignore`和指定`ignoreValue`来达到空数据的效果。也可以每个`SerieData`设置`ignore`参数。忽略数据后断开还是连接可设置`ignoreLineBreak`参数。
|
||||
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)
|
||||
[XChartsAPI](XChartsAPI-ZH.md)
|
||||
|
||||
@@ -1,62 +1,64 @@
|
||||
# 教程:5分钟上手 XCharts 3.0
|
||||
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)</br>
|
||||
[XCharts问答](XChartsFAQ-ZH.md)</br>
|
||||
[XChartsAPI接口](XChartsAPI-ZH.md)</br>
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)<br/>
|
||||
[XCharts问答](XChartsFAQ-ZH.md)<br/>
|
||||
[XChartsAPI接口](XChartsAPI-ZH.md)<br/>
|
||||
[XCharts配置项手册](XChartsConfiguration-ZH.md)
|
||||
|
||||
## 获取和导入 XCharts
|
||||
|
||||
1. 直接放入XCharts源码到项目
|
||||
XCharts可通过以下任意一种方式导入到项目:
|
||||
|
||||
下载好XCharts源码后,直接将XCharts目录拷贝到Unity项目工程的Assets目录下。
|
||||
- 直接将XCharts源码到项目
|
||||
|
||||
2. 通过`Assets/Import Package`导入XCharts
|
||||
下载好XCharts源码后,直接将XCharts目录拷贝到Unity项目工程的Assets目录或Packages目录下,编译通过后即可使用。
|
||||
|
||||
- 通过`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`:
|
||||
|
||||

|
||||
|
||||
即可快速创建一个简单的折线图出来:
|
||||
在`Hierarchy`视图下右键或菜单栏`GameObject`下拉选择`XCharts->LineChart`,即可快速创建一个默认的折线图出来:
|
||||
|
||||

|
||||
|
||||
## 添加多个Seire
|
||||
|
||||
如何在上图的基础上添加两条折线呢,只需`Add Serie`按钮,选择对应的`Serie`类型即可:
|
||||
在`Inspector`视图,找到`LineChart`的面板,通过`Add Serie`按钮,可以添加第二条`Line`折线:
|
||||
|
||||

|
||||

|
||||
|
||||
## 添加其他组件
|
||||
|
||||
默认图表没有`Legend`,需要`Legend`组件可通过`Add Component`按钮添加:
|
||||
|
||||

|
||||
|
||||
## 添加Serie组件
|
||||
|
||||
如果需要给折线图区域填充颜色,可单独给`Serie`添加`Component`:
|
||||
Serie只自带了几个常见的组件,其他组件要根据需求额外添加,不同的Serie支持不同的额外组件。比如,需要给折线图区域填充颜色,可单独给`Serie`添加`AreaStyle`组件:
|
||||
|
||||

|
||||

|
||||
|
||||
## 添加SerieData组件
|
||||
|
||||
如果需要个性化定制每个数据项的配置,可以单独给每个`SerieData`添加`Component`。比如我们给第一个折线图的第二个数据单独显示`Label`:
|
||||
如果需要个性化定制每个数据项的配置,可以单独给每个`SerieData`添加`Component`。比如我们给折线图的第二个数据单独显示`Label`:
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -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时表示用主题默认配置。
|
||||
|
||||
## 用代码添加折线图
|
||||
|
||||
@@ -86,6 +94,7 @@ if (chart == null)
|
||||
chart.Init();
|
||||
}
|
||||
```
|
||||
用代码生成的Chart需要调用一次Init()。
|
||||
|
||||
调整大小:
|
||||
|
||||
@@ -140,6 +149,7 @@ for (int i = 0; i < 10; i++)
|
||||
```
|
||||
|
||||
这样一个简单的折线图就出来了:
|
||||
|
||||

|
||||
|
||||
如果一个Chart里面有多个系列时,则Axis的data只需要加一次,不要多个循环加重复了。记住:Axis的数据个数要和Serie的数据个数一致。
|
||||
@@ -148,16 +158,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,但默认是不开启的,需要自己手动切换。可通过以下方式开启和关闭:
|
||||
|
||||

|
||||

|
||||
|
||||
开启后需要设置好TextMeshPro要用的全局字体,也可以在主题Theme里单独设置:
|
||||
|
||||

|
||||
建议在项目初就规划好是否使用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 +212,7 @@ xAxis.type = Axis.AxisType.Category;
|
||||
|
||||
### 改Serie的参数
|
||||
|
||||
新添加Serie:
|
||||
新添加的Serie:
|
||||
|
||||
```C#
|
||||
var serie = chart.AddSerie<Pie>();
|
||||
@@ -220,12 +252,12 @@ 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;
|
||||
|
||||
```
|
||||
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)</br>
|
||||
[XCharts问答](XChartsFAQ-ZH.md)</br>
|
||||
[XChartsAPI接口](XChartsAPI-ZH.md)</br>
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)<br/>
|
||||
[XCharts问答](XChartsFAQ-ZH.md)<br/>
|
||||
[XChartsAPI接口](XChartsAPI-ZH.md)<br/>
|
||||
[XCharts配置项手册](XChartsConfiguration-ZH.md)
|
||||
|
||||
@@ -1,78 +1,86 @@
|
||||
# 教程:5分钟上手 XCharts 3.0
|
||||
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)</br>
|
||||
[XCharts问答](XChartsFAQ-ZH.md)</br>
|
||||
[XChartsAPI接口](XChartsAPI-ZH.md)</br>
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)<br/>
|
||||
[XCharts问答](XChartsFAQ-ZH.md)<br/>
|
||||
[XChartsAPI接口](XChartsAPI-ZH.md)<br/>
|
||||
[XCharts配置项手册](XChartsConfiguration-ZH.md)
|
||||
|
||||
## 获取和导入 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`:
|
||||
|
||||

|
||||
|
||||
即可快速创建一个简单的折线图出来:
|
||||
在`Hierarchy`视图下右键或菜单栏`GameObject`下拉选择`XCharts->LineChart`,即可快速创建一个默认的折线图出来:
|
||||
|
||||

|
||||
|
||||
## 添加多个Seire
|
||||
|
||||
如何在上图的基础上添加两条折线呢,只需`Add Serie`按钮,选择对应的`Serie`类型即可:
|
||||
在`Inspector`视图,找到`LineChart`的面板,通过`Add Serie`按钮,可以添加第二条`Line`折线:
|
||||
|
||||

|
||||

|
||||
|
||||
## 添加其他组件
|
||||
|
||||
默认图表没有`Legend`,需要`Legend`组件可通过`Add Component`按钮添加:
|
||||
|
||||

|
||||
|
||||
## 添加Serie组件
|
||||
|
||||
如果需要给折线图区域填充颜色,可单独给`Serie`添加`Component`:
|
||||
Serie只自带了几个常见的组件,其他组件按需额外添加。比如,需要给折线图区域填充颜色,可单独给`Serie`添加`AreaStyle`组件:
|
||||
|
||||

|
||||

|
||||
|
||||
## 添加SerieData组件
|
||||
|
||||
如果需要个性化定制每个数据项的配置,可以单独给每个`SerieData`添加`Component`。比如我们给第一个折线图的第二个数据单独显示`Label`:
|
||||
如果需要个性化定制每个数据项的配置,可以单独给每个`SerieData`添加`Component`。比如我们给折线图的第二个数据单独显示`Label`:
|
||||
|
||||

|
||||

|
||||
|
||||
## 更多组件和配置参数
|
||||
|
||||
功能越丰富就越需要更多的组件和参数支持。XCharts有多达几十种的主组件和子组件,每个组件有几个至几十个不等的可配置参数,以支持各种灵活而复杂的功能。
|
||||
XCharts经过不断的迭代优化,目前已有多达几十种的主组件和子组件,每个组件有几个至几十个不等的可配置参数,以支持各种灵活而复杂的功能。
|
||||
|
||||
首次接触XCharts者可在 `Inspector` 视图下可以添加和调整各个组件,`Game` 视图会实时反馈调整的效果,以熟悉各种组件实现的效果。各个组件的详细参数说明可查阅[XCharts配置项手册](XChartsConfiguration-ZH.md)。
|
||||
首次使用XCharts,可在 `Inspector` 视图添加各种图表,给图表添加或调整里面组件,`Game` 视图会实时反馈调整后的效果,以熟悉各种组件的使用。各个组件的详细参数说明可查阅[XCharts配置项手册](XChartsConfiguration-ZH.md)。
|
||||
|
||||
## 如何快速调整参数
|
||||
|
||||
`XCharts`是配置参数驱动。想要什么效果,你只需要去调整对应组件下的配置参数就可以,不需要去改`Hierarchy`试图下的节点,因为那些节点是由`XCharts`内部根据配置参数生成的。你改了也会变还原。
|
||||
`XCharts`是配置和数据来驱动的。想要什么效果,只需要去调整对应组件下的配置参数就可以,不需要去改`Hierarchy`视图下的节点,因为那些节点是由`XCharts`内部根据配置和数据生成的,即使改了也会在刷新时还原回来。
|
||||
|
||||
快速定位你想要改的效果对应的组件。这就需要对组件有一定的了解。比如我们想要让X轴的轴线末端显示箭头,如何定位?第一步,X轴定位到`XAxis0`;第二步,轴线定位到`AxisLine`;最后,再去看`AxisLine`组件下有没有这样的参数可以实现这个效果。
|
||||
如何快速定位你想要改的效果所对应的组件,这就需要对组件有一定的了解。比如我们想要让X轴的轴线末端显示箭头,如何定位?第一步,X轴定位到`XAxis0`;第二步,轴线定位到`AxisLine`;最后,再去看`AxisLine`组件下有没有这样的参数可以实现这个效果,对于不太确定的参数可以查阅[XCharts配置项手册](XChartsConfiguration-ZH.md)。
|
||||
|
||||
`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++)
|
||||
```
|
||||
|
||||
这样一个简单的折线图就出来了:
|
||||
|
||||

|
||||
|
||||
如果一个Chart里面有多个系列时,则Axis的data只需要加一次,不要多个循环加重复了。记住:Axis的数据个数要和Serie的数据个数一致。
|
||||
@@ -148,20 +157,43 @@ 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()`:刷新图表绘制,只刷新绘制部分,不会刷新组件文本,位置等部分。
|
||||
3. 各个组件也可以通过`SetAllDirty()`只刷新自己。
|
||||
|
||||
## 使用TextMeshPro
|
||||
|
||||
XCharts支持TextMeshPro,但默认是不开启的,需要自己手动切换。可通过一下两种方式开启和关闭:
|
||||
XCharts支持TextMeshPro,但默认是不开启的,需要自己手动切换。可通过以下方式开启和关闭:
|
||||
|
||||

|
||||

|
||||
|
||||
开启后需要设置好TextMeshPro要用的全局字体,也可以在主题Theme里单独设置:
|
||||
|
||||

|
||||
建议在项目初就规划好是否使用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`宏
|
||||
|
||||
## 用代码改图表参数
|
||||
|
||||
`Inspector`上看到的所有参数都可以用代码来修改,关键是要定位好你要改的参数是在组件上、还是serie上、还是在具体的数据项上改。
|
||||
`Inspector`上看到的所有参数都可以用代码来修改,关键是要定位好你要改的参数是在组件上、还是Serie上、还是在具体的数据项SerieData上。
|
||||
|
||||
### 改主组件上的参数
|
||||
|
||||
@@ -180,7 +212,7 @@ xAxis.type = Axis.AxisType.Category;
|
||||
|
||||
### 改Serie的参数
|
||||
|
||||
新添加Serie:
|
||||
对于新添加的Serie:
|
||||
|
||||
```C#
|
||||
var serie = chart.AddSerie<Pie>();
|
||||
@@ -192,7 +224,7 @@ serie.animation.dataChangeEnable = true;
|
||||
serie.roundCap = true;
|
||||
```
|
||||
|
||||
已存在的Serie:
|
||||
对于已存在的Serie:
|
||||
|
||||
```C#
|
||||
var serie = chart.GetSerie<Pie>();
|
||||
@@ -220,12 +252,12 @@ 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;
|
||||
|
||||
```
|
||||
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)</br>
|
||||
[XCharts问答](XChartsFAQ-ZH.md)</br>
|
||||
[XChartsAPI接口](XChartsAPI-ZH.md)</br>
|
||||
[XCharts主页](https://github.com/XCharts-Team/XCharts)<br/>
|
||||
[XCharts问答](XChartsFAQ-ZH.md)<br/>
|
||||
[XChartsAPI接口](XChartsAPI-ZH.md)<br/>
|
||||
[XCharts配置项手册](XChartsConfiguration-ZH.md)
|
||||
|
||||
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 30 KiB |
BIN
Documentation/res/wechat.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33ca1e807bf9b44daa62fa68040f7a17
|
||||
guid: c62c735b2989c4367b8c97b8ca75c216
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
BIN
Documentation/res/xcharts3.0.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b533c6dca4e643c0a3cf0152ea053c3
|
||||
guid: d824662da0d024d1f95c8d10c870e3ca
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
using System;
|
||||
|
||||
namespace XCharts.Editor
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
using System;
|
||||
|
||||
namespace XCharts.Editor
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
@@ -17,6 +16,7 @@ namespace XCharts.Editor
|
||||
public static readonly GUIContent btnAddComponent = new GUIContent("Add Main Component", "");
|
||||
public static readonly GUIContent btnCovertXYAxis = new GUIContent("Covert XY Axis", "");
|
||||
public static readonly GUIContent btnRebuildChartObject = new GUIContent("Rebuild Chart Object", "");
|
||||
public static readonly GUIContent btnSaveAsImage = new GUIContent("Save As Image", "");
|
||||
public static readonly GUIContent btnCheckWarning = new GUIContent("Check Warning", "");
|
||||
public static readonly GUIContent btnHideWarning = new GUIContent("Hide Warning", "");
|
||||
}
|
||||
@@ -45,7 +45,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 +172,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;
|
||||
@@ -280,6 +280,10 @@ namespace XCharts.Editor
|
||||
{
|
||||
m_Chart.RebuildChartObject();
|
||||
}
|
||||
if (GUILayout.Button(Styles.btnSaveAsImage))
|
||||
{
|
||||
m_Chart.SaveAsImage();
|
||||
}
|
||||
if (m_CheckWarning)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -22,8 +21,11 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_FadeOutDelay");
|
||||
PropertyField(prop, "m_DataChangeEnable");
|
||||
PropertyField(prop, "m_DataChangeDuration");
|
||||
PropertyField(prop, "m_ActualDuration");
|
||||
PropertyField(prop, "m_AlongWithLinePath");
|
||||
PropertyField(prop, "m_UnscaledTime");
|
||||
// using(new EditorGUI.DisabledGroupScope(true))
|
||||
// {
|
||||
// PropertyField(prop, "m_ActualDuration");
|
||||
// }
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -18,9 +17,8 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_Origin");
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_ToColor");
|
||||
PropertyField(prop, "m_HighlightColor");
|
||||
PropertyField(prop, "m_HighlightToColor");
|
||||
PropertyField(prop, "m_Opacity");
|
||||
PropertyField(prop, "m_InnerFill");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
26
Editor/ChildComponents/CommentItemDrawer.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7de9b5e4c5d474fdd88ebb89f0924305
|
||||
guid: d485d6a729a1449cdb5032f380fba70f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,24 +1,20 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Emphasis), true)]
|
||||
public class EmphasisDrawer : BasePropertyDrawer
|
||||
[CustomPropertyDrawer(typeof(CommentMarkStyle), true)]
|
||||
public class CommentMarkStyleDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Emphasis"; } }
|
||||
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_Label");
|
||||
PropertyField(prop, "m_LabelLine");
|
||||
PropertyField(prop, "m_ItemStyle");
|
||||
PropertyField(prop, "m_LineStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e0b1690532674b24952a87e0aead6fa
|
||||
guid: d74ed458b24774b129611ed816b6b6cd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -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",
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -18,7 +17,7 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_FoldSeries");
|
||||
PropertyField(prop, "m_ShowDebugInfo");
|
||||
PropertyField(prop, "m_ShowAllChartObject");
|
||||
PropertyField(prop, "m_DebugInfoTextStyle");
|
||||
PropertyField(prop, "m_LabelStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -18,6 +17,7 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_Layer");
|
||||
PropertyField(prop, "m_Align");
|
||||
PropertyField(prop, "m_Sprite");
|
||||
PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
|
||||
27
Editor/ChildComponents/ImageStyleDrawer.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ImageStyle), true)]
|
||||
public class ImageStyleDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "ImageStyle"; } }
|
||||
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_Sprite");
|
||||
PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e994b64b93384ae4bfa9a7a85ba8914
|
||||
guid: 4649856b17dfd4f628eb975040fb791c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -24,6 +23,7 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_CenterColor");
|
||||
PropertyField(prop, "m_CenterGap");
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_BorderGap");
|
||||
PropertyField(prop, "m_BorderColor");
|
||||
PropertyField(prop, "m_BorderColor0");
|
||||
PropertyField(prop, "m_BorderToColor");
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -17,10 +16,13 @@ namespace XCharts.Editor
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_LineType");
|
||||
PropertyField(prop, "m_LineColor");
|
||||
PropertyField(prop, "m_LineAngle");
|
||||
PropertyField(prop, "m_LineWidth");
|
||||
PropertyField(prop, "m_LineGap");
|
||||
PropertyField(prop, "m_LineLength1");
|
||||
PropertyField(prop, "m_LineLength2");
|
||||
PropertyField(prop, "m_StartSymbol");
|
||||
PropertyField(prop, "m_EndSymbol");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -16,18 +15,26 @@ namespace XCharts.Editor
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Position");
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_AutoOffset");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
PropertyField(prop, "m_BackgroundWidth");
|
||||
PropertyField(prop, "m_BackgroundHeight");
|
||||
PropertyField(prop, "m_PaddingLeftRight");
|
||||
PropertyField(prop, "m_PaddingTopBottom");
|
||||
PropertyField(prop, "m_AutoOffset");
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_Rotate");
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
PropertyField(prop, "m_Icon");
|
||||
PropertyField(prop, "m_Background");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
PropertyField(prop, "m_TextPadding");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(EndLabelStyle), true)]
|
||||
public class EndLabelStyleDrawer : LabelStyleDrawer
|
||||
{
|
||||
public override string ClassName { get { return "End Label"; } }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -45,8 +44,23 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
PropertyField(prop, "m_ShowStartLine");
|
||||
PropertyField(prop, "m_ShowEndLine");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisMinorSplitLine), true)]
|
||||
public class AxisMinorSplitLineDrawer : BaseLineDrawer
|
||||
{
|
||||
public override string ClassName { get { return "MinorSplitLine"; } }
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
//PropertyField(prop, "m_Distance");
|
||||
//PropertyField(prop, "m_AutoColor");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisTick), true)]
|
||||
public class AxisTickDrawer : BaseLineDrawer
|
||||
{
|
||||
@@ -63,4 +77,16 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisMinorTick), true)]
|
||||
public class AxisMinorTickDrawer : BaseLineDrawer
|
||||
{
|
||||
public override string ClassName { get { return "MinorTick"; } }
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_SplitNumber");
|
||||
//PropertyField(prop, "m_AutoColor");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
52
Editor/ChildComponents/SerieSymbolDrawer.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieSymbol), true)]
|
||||
public class SerieSymbolDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Symbol"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
var type = (SymbolType) prop.FindPropertyRelative("m_Type").enumValueIndex;
|
||||
PropertyField(prop, "m_Type");
|
||||
if (type == SymbolType.Custom)
|
||||
{
|
||||
PropertyField(prop, "m_Image");
|
||||
PropertyField(prop, "m_ImageType");
|
||||
PropertyField(prop, "m_Width");
|
||||
// PropertyField(prop, "m_Height");
|
||||
// PropertyField(prop, "m_Offset");
|
||||
}
|
||||
PropertyField(prop, "m_Gap");
|
||||
PropertyField(prop, "m_SizeType");
|
||||
switch ((SymbolSizeType) prop.FindPropertyRelative("m_SizeType").enumValueIndex)
|
||||
{
|
||||
case SymbolSizeType.Custom:
|
||||
PropertyField(prop, "m_Size");
|
||||
break;
|
||||
case SymbolSizeType.FromData:
|
||||
PropertyField(prop, "m_DataIndex");
|
||||
PropertyField(prop, "m_DataScale");
|
||||
PropertyField(prop, "m_MinSize");
|
||||
PropertyField(prop, "m_MaxSize");
|
||||
break;
|
||||
case SymbolSizeType.Function:
|
||||
break;
|
||||
}
|
||||
PropertyField(prop, "m_StartIndex");
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_ForceShowLast");
|
||||
PropertyField(prop, "m_Repeat");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Editor/ChildComponents/SerieSymbolDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a164822bc0fd4e5291f00c5a4ee86f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -13,21 +12,23 @@ 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");
|
||||
PropertyField(prop, "m_MaxPainter");
|
||||
PropertyField(prop, "m_BasePainterMaterial");
|
||||
PropertyField(prop, "m_SeriePainterMaterial");
|
||||
PropertyField(prop, "m_UpperPainterMaterial");
|
||||
PropertyField(prop, "m_TopPainterMaterial");
|
||||
PropertyField(prop, "m_LineSmoothStyle");
|
||||
PropertyField(prop, "m_LineSmoothness");
|
||||
PropertyField(prop, "m_LineSegmentDistance");
|
||||
PropertyField(prop, "m_CicleSmoothness");
|
||||
PropertyField(prop, "m_AxisMaxSplitNumber");
|
||||
PropertyField(prop, "m_LegendIconLineWidth");
|
||||
PropertyListField(prop, "m_LegendIconCornerRadius", true);
|
||||
--EditorGUI.indentLevel;
|
||||
|
||||
55
Editor/ChildComponents/StateStyleDrawer.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(StateStyle), true)]
|
||||
public class StateStyleDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "StateStyle"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
OnCustomGUI(prop);
|
||||
PropertyField(prop, "m_Symbol");
|
||||
PropertyField(prop, "m_ItemStyle");
|
||||
PropertyField(prop, "m_Label");
|
||||
PropertyField(prop, "m_LabelLine");
|
||||
PropertyField(prop, "m_LineStyle");
|
||||
PropertyField(prop, "m_AreaStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnCustomGUI(SerializedProperty prop) { }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(EmphasisStyle), true)]
|
||||
public class EmphasisStyleDrawer : StateStyleDrawer
|
||||
{
|
||||
public override string ClassName { get { return "EmphasisStyle"; } }
|
||||
protected override void OnCustomGUI(SerializedProperty prop)
|
||||
{
|
||||
PropertyField(prop, "m_Scale");
|
||||
PropertyField(prop, "m_Focus");
|
||||
PropertyField(prop, "m_BlurScope");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(BlurStyle), true)]
|
||||
public class BlurStyleDrawer : StateStyleDrawer
|
||||
{
|
||||
public override string ClassName { get { return "BlurStyle"; } }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(SelectStyle), true)]
|
||||
public class SelectStyleDrawer : StateStyleDrawer
|
||||
{
|
||||
public override string ClassName { get { return "SelectStyle"; } }
|
||||
}
|
||||
}
|
||||
11
Editor/ChildComponents/StateStyleDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3aad8ee99115742729ec5a963274fae0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@@ -16,36 +15,19 @@ 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)
|
||||
{
|
||||
PropertyField(prop, "m_Image");
|
||||
PropertyField(prop, "m_ImageType");
|
||||
PropertyField(prop, "m_Width");
|
||||
// PropertyField(prop, "m_Height");
|
||||
// PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_Height");
|
||||
}
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_Size");
|
||||
PropertyField(prop, "m_Gap");
|
||||
PropertyField(prop, "m_SizeType");
|
||||
switch ((SymbolSizeType)prop.FindPropertyRelative("m_SizeType").enumValueIndex)
|
||||
{
|
||||
case SymbolSizeType.Custom:
|
||||
PropertyField(prop, "m_Size");
|
||||
PropertyField(prop, "m_SelectedSize");
|
||||
break;
|
||||
case SymbolSizeType.FromData:
|
||||
PropertyField(prop, "m_DataIndex");
|
||||
PropertyField(prop, "m_DataScale");
|
||||
PropertyField(prop, "m_SelectedDataScale");
|
||||
break;
|
||||
case SymbolSizeType.Function:
|
||||
break;
|
||||
}
|
||||
PropertyField(prop, "m_StartIndex");
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_ForceShowLast");
|
||||
PropertyField(prop, "m_Repeat");
|
||||
PropertyField(prop, "m_Offset");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
30
Editor/ChildComponents/TextPaddingDrawer.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Padding), true)]
|
||||
public class PaddingDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Padding"; } }
|
||||
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_Top");
|
||||
PropertyField(prop, "m_Right");
|
||||
PropertyField(prop, "m_Bottom");
|
||||
PropertyField(prop, "m_Left");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(TextPadding), true)]
|
||||
public class TextPaddingDrawer : PaddingDrawer
|
||||
{
|
||||
}
|
||||
}
|
||||
11
Editor/ChildComponents/TextPaddingDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46cc25f4c9fc846938a06cf3b8fc75bd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
#if dUI_TextMeshPro
|
||||
@@ -15,7 +14,7 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "", true))
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
#if dUI_TextMeshPro
|
||||
@@ -24,22 +23,19 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_Font");
|
||||
#endif
|
||||
PropertyField(prop, "m_Rotate");
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_ExtraWidth");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_AutoBackgroundColor");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
PropertyField(prop, "m_FontSize");
|
||||
PropertyField(prop, "m_LineSpacing");
|
||||
#if dUI_TextMeshPro
|
||||
PropertyField(prop, "m_TMPFontStyle");
|
||||
PropertyField(prop, "m_TMPSpriteAsset");
|
||||
PropertyField(prop, "m_TMPAlignment");
|
||||
#else
|
||||
PropertyField(prop, "m_FontStyle");
|
||||
PropertyField(prop, "m_Alignment");
|
||||
PropertyField(prop, "m_AutoWrap");
|
||||
PropertyField(prop, "m_AutoAlign");
|
||||
PropertyField(prop, "m_AutoWrap");
|
||||
#endif
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,12 @@
|
||||
using UnityEditor;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(TitleStyle), true)]
|
||||
public class TitleStyleDrawer : BasePropertyDrawer
|
||||
public class TitleStyleDrawer : LabelStyleDrawer
|
||||
{
|
||||
public override string ClassName { get { return "TitleStyle"; } }
|
||||
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_OffsetCenter");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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:
|
||||
@@ -71,7 +70,6 @@ namespace XCharts.Editor
|
||||
else
|
||||
{
|
||||
PropertyField("m_Interval");
|
||||
PropertyField("m_BoundaryGap");
|
||||
}
|
||||
DrawExtendeds();
|
||||
PropertyField("m_AxisLine");
|
||||
@@ -80,7 +78,12 @@ namespace XCharts.Editor
|
||||
PropertyField("m_AxisLabel");
|
||||
PropertyField("m_SplitLine");
|
||||
PropertyField("m_SplitArea");
|
||||
PropertyField("m_IconStyle");
|
||||
PropertyField("m_IndicatorLabel");
|
||||
if (type != Axis.AxisType.Category)
|
||||
{
|
||||
PropertyField("m_MinorTick");
|
||||
PropertyField("m_MinorSplitLine");
|
||||
}
|
||||
PropertyListField("m_Icons", true);
|
||||
if (type == Axis.AxisType.Category)
|
||||
{
|
||||
@@ -95,14 +98,10 @@ namespace XCharts.Editor
|
||||
}
|
||||
|
||||
[ComponentEditor(typeof(XAxis))]
|
||||
public class XAxisEditor : AxisEditor
|
||||
{
|
||||
}
|
||||
public class XAxisEditor : AxisEditor { }
|
||||
|
||||
[ComponentEditor(typeof(YAxis))]
|
||||
public class YAxisEditor : AxisEditor
|
||||
{
|
||||
}
|
||||
public class YAxisEditor : AxisEditor { }
|
||||
|
||||
[ComponentEditor(typeof(SingleAxis))]
|
||||
public class SingleAxisEditor : AxisEditor
|
||||
@@ -132,14 +131,10 @@ namespace XCharts.Editor
|
||||
}
|
||||
|
||||
[ComponentEditor(typeof(RadiusAxis))]
|
||||
public class RadiusAxisEditor : AxisEditor
|
||||
{
|
||||
}
|
||||
public class RadiusAxisEditor : AxisEditor { }
|
||||
|
||||
[ComponentEditor(typeof(ParallelAxis))]
|
||||
public class ParallelAxisEditor : AxisEditor
|
||||
{
|
||||
}
|
||||
public class ParallelAxisEditor : AxisEditor { }
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisLabel), true)]
|
||||
public class AxisLabelDrawer : BasePropertyDrawer
|
||||
@@ -153,17 +148,24 @@ namespace XCharts.Editor
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Inside");
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
|
||||
PropertyField(prop, "m_ShowAsPositiveNumber");
|
||||
PropertyField(prop, "m_OnZero");
|
||||
PropertyField(prop, "m_ShowStartLabel");
|
||||
PropertyField(prop, "m_ShowEndLabel");
|
||||
PropertyField(prop, "m_TextLimit");
|
||||
|
||||
PropertyField(prop, "m_Rotate");
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
PropertyField(prop, "m_Icon");
|
||||
PropertyField(prop, "m_Background");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
PropertyField(prop, "m_TextPadding");
|
||||
PropertyField(prop, "m_TextLimit");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
@@ -180,9 +182,8 @@ namespace XCharts.Editor
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Name");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_Location");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
PropertyField(prop, "m_OnZero");
|
||||
PropertyField(prop, "m_LabelStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
18
Editor/MainComponents/CommentEditor.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Editor/MainComponents/CommentEditor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2364066bf3174aa39b79020266ce72d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using XCharts.Runtime;
|
||||
|
||||
@@ -46,9 +45,9 @@ namespace XCharts.Editor
|
||||
PropertyField("m_Bottom");
|
||||
PropertyField("m_LineStyle");
|
||||
PropertyField("m_AreaStyle");
|
||||
PropertyField("m_LabelStyle");
|
||||
PropertyListField("m_XAxisIndexs", true);
|
||||
PropertyListField("m_YAxisIndexs", true);
|
||||
PropertyField("m_TextStyle");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using XCharts.Runtime;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using XCharts.Runtime;
|
||||
|
||||
@@ -15,12 +14,16 @@ 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_TextStyle");
|
||||
PropertyField("m_LabelStyle");
|
||||
PropertyField("m_Background");
|
||||
PropertyField("m_Padding");
|
||||
PropertyListField("m_Icons");
|
||||
PropertyListField("m_Colors");
|
||||
PropertyListField("m_Data");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
public class MainComponentEditor<T> : MainComponentBaseEditor
|
||||
where T : MainComponent
|
||||
{
|
||||
}
|
||||
where T : MainComponent
|
||||
{ }
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using XCharts.Runtime;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using XCharts.Runtime;
|
||||
|
||||
@@ -11,7 +10,7 @@ namespace XCharts.Editor
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyTwoFiled("m_Center");
|
||||
PropertyField("m_Radius");
|
||||
PropertyTwoFiled("m_Radius");
|
||||
PropertyField("m_BackgroundColor");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -16,6 +15,7 @@ namespace XCharts.Editor
|
||||
PropertyTwoFiled("m_Center");
|
||||
PropertyField("m_Radius");
|
||||
PropertyField("m_SplitNumber");
|
||||
PropertyField("m_StartAngle");
|
||||
PropertyField("m_CeilRate");
|
||||
PropertyField("m_IsAxisTooltip");
|
||||
PropertyField("m_OutRangeColor");
|
||||
@@ -25,7 +25,7 @@ namespace XCharts.Editor
|
||||
PropertyField("m_AxisName");
|
||||
PropertyField("m_SplitLine");
|
||||
PropertyField("m_SplitArea");
|
||||
PropertyField("m_IndicatorList");
|
||||
PropertyListField("m_IndicatorList");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
@@ -12,7 +10,15 @@ namespace XCharts.Editor
|
||||
[CustomEditor(typeof(Theme))]
|
||||
public class ThemeEditor : UnityEditor.Editor
|
||||
{
|
||||
static class Styles
|
||||
{
|
||||
internal static GUIContent btnReset = new GUIContent("Reset to Default", "Reset to default theme");
|
||||
internal static GUIContent btnSyncFontToSubTheme = new GUIContent("Sync Font to Sub Theme", "Sync main theme font to sub theme font");
|
||||
internal static GUIContent btnSyncFontFromSetting = new GUIContent("Sync Font from Setting", "Sync main theme font and sub theme font from XCSetting font");
|
||||
}
|
||||
|
||||
private Theme m_Theme;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
m_Theme = target as Theme;
|
||||
@@ -20,14 +26,38 @@ 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 (EditorUtility.DisplayDialog(Styles.btnReset.text, Styles.btnReset.tooltip, "Yes", "Cancel"))
|
||||
{
|
||||
m_Theme.ResetTheme();
|
||||
Debug.Log("XCharts: Reset Finish.");
|
||||
}
|
||||
}
|
||||
if (GUILayout.Button(Styles.btnSyncFontFromSetting))
|
||||
{
|
||||
if (EditorUtility.DisplayDialog(Styles.btnSyncFontFromSetting.text, Styles.btnSyncFontFromSetting.tooltip, "Yes", "Cancel"))
|
||||
{
|
||||
m_Theme.common.font = XCSettings.font;
|
||||
m_Theme.SyncFontToSubComponent();
|
||||
#if dUI_TextMeshPro
|
||||
m_Theme.common.tmpFont = XCSettings.tmpFont;
|
||||
m_Theme.SyncTMPFontToSubComponent();
|
||||
#endif
|
||||
Debug.Log("XCharts: Sync Finish.");
|
||||
}
|
||||
}
|
||||
if (GUILayout.Button(Styles.btnSyncFontToSubTheme))
|
||||
{
|
||||
if (EditorUtility.DisplayDialog(Styles.btnSyncFontToSubTheme.text, Styles.btnSyncFontToSubTheme.tooltip, "Yes", "Cancel"))
|
||||
{
|
||||
m_Theme.SyncFontToSubComponent();
|
||||
#if dUI_TextMeshPro
|
||||
m_Theme.SyncTMPFontToSubComponent();
|
||||
#endif
|
||||
Debug.Log("XCharts: Sync Finish.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using XCharts.Runtime;
|
||||
|
||||
@@ -14,8 +13,8 @@ namespace XCharts.Editor
|
||||
PropertyField("m_SubText");
|
||||
PropertyField("m_ItemGap");
|
||||
PropertyField("m_Location");
|
||||
PropertyField("m_TextStyle");
|
||||
PropertyField("m_SubTextStyle");
|
||||
PropertyField("m_LabelStyle");
|
||||
PropertyField("m_SubLabelStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEditor;
|
||||
using XCharts.Runtime;
|
||||
|
||||
@@ -12,37 +11,36 @@ namespace XCharts.Editor
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField("m_Type");
|
||||
PropertyField("m_Trigger");
|
||||
PropertyField("m_Position");
|
||||
PropertyField("m_FixedX");
|
||||
PropertyField("m_FixedY");
|
||||
PropertyField("m_Offset");
|
||||
PropertyField("m_ShowContent");
|
||||
PropertyField("m_AlwayShowContent");
|
||||
PropertyField("m_TitleFormatter");
|
||||
PropertyField("m_ItemFormatter");
|
||||
PropertyField("m_NumericFormatter");
|
||||
PropertyField("m_TitleHeight");
|
||||
PropertyField("m_ItemHeight");
|
||||
PropertyFiledMore(() =>
|
||||
{
|
||||
PropertyField("m_TitleHeight");
|
||||
PropertyField("m_ItemHeight");
|
||||
PropertyField("m_Marker");
|
||||
PropertyField("m_BorderWidth");
|
||||
PropertyField("m_BorderColor");
|
||||
PropertyField("m_PaddingLeftRight");
|
||||
PropertyField("m_PaddingTopBottom");
|
||||
PropertyField("m_BackgroundImage");
|
||||
PropertyField("m_BackgroundType");
|
||||
PropertyField("m_BackgroundColor");
|
||||
PropertyField("m_FixedWidth");
|
||||
PropertyField("m_FixedHeight");
|
||||
PropertyField("m_MinWidth");
|
||||
PropertyField("m_MinHeight");
|
||||
PropertyField("m_IgnoreDataDefaultContent");
|
||||
PropertyField("m_Offset");
|
||||
PropertyField("m_FixedXEnable");
|
||||
PropertyField("m_FixedX");
|
||||
PropertyField("m_FixedYEnable");
|
||||
PropertyField("m_FixedY");
|
||||
});
|
||||
PropertyField("m_LineStyle");
|
||||
PropertyField("m_LabelTextStyle");
|
||||
PropertyField("m_TitleTextStyle");
|
||||
PropertyListField("m_ColumnsTextStyle");
|
||||
PropertyField("m_TitleLabelStyle");
|
||||
PropertyListField("m_ContentLabelStyles");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
@@ -20,8 +19,10 @@ namespace XCharts.Editor
|
||||
PropertyField("m_Max");
|
||||
PropertyField("m_SplitNumber");
|
||||
PropertyField("m_Dimension");
|
||||
PropertyField("m_Show");
|
||||
if (baseProperty.FindPropertyRelative("m_Show").boolValue)
|
||||
PropertyField("m_WorkOnLine");
|
||||
PropertyField("m_WorkOnArea");
|
||||
PropertyField("m_ShowUI");
|
||||
if (baseProperty.FindPropertyRelative("m_ShowUI").boolValue)
|
||||
{
|
||||
PropertyField("m_SelectedMode");
|
||||
PropertyTwoFiled("m_Range");
|
||||
@@ -37,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");
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace XCharts.Editor
|
||||
{
|
||||
public override void OnCustomInspectorGUI()
|
||||
{
|
||||
PropertyField("m_ColorBy");
|
||||
PropertyField("m_Stack");
|
||||
if (serie.IsUseCoord<PolarCoord>())
|
||||
{
|
||||
@@ -18,15 +19,22 @@ namespace XCharts.Editor
|
||||
PropertyField("m_YAxisIndex");
|
||||
}
|
||||
PropertyField("m_BarType");
|
||||
PropertyField("m_BarPercentStack");
|
||||
PropertyField("m_BarWidth");
|
||||
PropertyField("m_BarGap");
|
||||
if (serie.barType == BarType.Zebra)
|
||||
if (serie.IsUseCoord<PolarCoord>())
|
||||
{
|
||||
PropertyField("m_BarZebraWidth");
|
||||
PropertyField("m_BarZebraGap");
|
||||
PropertyField("m_RoundCap");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
PropertyField("m_BarPercentStack");
|
||||
if (serie.barType == BarType.Zebra)
|
||||
{
|
||||
PropertyField("m_BarZebraWidth");
|
||||
PropertyField("m_BarZebraGap");
|
||||
}
|
||||
}
|
||||
PropertyField("m_Clip");
|
||||
PropertyFiledMore(() =>
|
||||
{
|
||||
PropertyFieldLimitMin("m_MinShow", 0);
|
||||
@@ -38,8 +46,8 @@ namespace XCharts.Editor
|
||||
PropertyField("m_ShowAsPositiveNumber");
|
||||
PropertyField("m_Large");
|
||||
PropertyField("m_LargeThreshold");
|
||||
PropertyField("m_Clip");
|
||||
PropertyField("m_PlaceHolder");
|
||||
PropertyField("m_MarkColor");
|
||||
});
|
||||
PropertyField("m_ItemStyle");
|
||||
PropertyField("m_Animation");
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace XCharts.Editor
|
||||
{
|
||||
public override void OnCustomInspectorGUI()
|
||||
{
|
||||
PropertyField("m_ColorBy");
|
||||
PropertyField("m_XAxisIndex");
|
||||
PropertyField("m_YAxisIndex");
|
||||
PropertyFieldLimitMin("m_MinShow", 0);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
@@ -8,9 +7,20 @@ namespace XCharts.Editor
|
||||
{
|
||||
public override void OnCustomInspectorGUI()
|
||||
{
|
||||
if (serie.IsUseCoord<PolarCoord>())
|
||||
{
|
||||
PropertyField("m_PolarIndex");
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField("m_XAxisIndex");
|
||||
PropertyField("m_YAxisIndex");
|
||||
}
|
||||
PropertyField("m_HeatmapType");
|
||||
PropertyField("m_Ignore");
|
||||
PropertyField("m_IgnoreValue");
|
||||
|
||||
PropertyField("m_Symbol");
|
||||
PropertyField("m_ItemStyle");
|
||||
PropertyField("m_Animation");
|
||||
}
|
||||
|
||||
@@ -18,6 +18,11 @@ namespace XCharts.Editor
|
||||
PropertyField("m_YAxisIndex");
|
||||
}
|
||||
PropertyField("m_LineType");
|
||||
if (serie.lineType == LineType.Smooth)
|
||||
{
|
||||
PropertyField("m_SmoothLimit");
|
||||
}
|
||||
//PropertyField("m_Clip");
|
||||
PropertyFiledMore(() =>
|
||||
{
|
||||
PropertyFieldLimitMin("m_MinShow", 0);
|
||||
@@ -32,7 +37,7 @@ namespace XCharts.Editor
|
||||
PropertyField("m_ShowAsPositiveNumber");
|
||||
PropertyField("m_Large");
|
||||
PropertyField("m_LargeThreshold");
|
||||
PropertyField("m_Clip");
|
||||
PropertyField("m_MarkColor");
|
||||
});
|
||||
PropertyField("m_Symbol");
|
||||
PropertyField("m_LineStyle");
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace XCharts.Editor
|
||||
{
|
||||
public override void OnCustomInspectorGUI()
|
||||
{
|
||||
PropertyField("m_ColorBy");
|
||||
PropertyField("m_ParallelIndex");
|
||||
PropertyField("m_LineType");
|
||||
PropertyField("m_LineStyle");
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -7,9 +7,11 @@ namespace XCharts.Editor
|
||||
{
|
||||
public override void OnCustomInspectorGUI()
|
||||
{
|
||||
PropertyField("m_ColorBy");
|
||||
PropertyField("m_RadarType");
|
||||
PropertyField("m_RadarIndex");
|
||||
|
||||
PropertyField("m_Smooth");
|
||||
|
||||
PropertyField("m_Symbol");
|
||||
PropertyField("m_LineStyle");
|
||||
PropertyField("m_ItemStyle");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@@ -17,7 +16,6 @@ namespace XCharts.Editor
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
//PropertyField("m_InsertDataToHead");
|
||||
PropertyField("m_SerieName");
|
||||
if (m_CoordOptionsNames != null && m_CoordOptionsNames.Count > 1)
|
||||
{
|
||||
@@ -29,6 +27,7 @@ namespace XCharts.Editor
|
||||
serie.coordSystem = m_CoordOptionsDic[typeName].Name;
|
||||
}
|
||||
}
|
||||
PropertyField("m_State");
|
||||
OnCustomInspectorGUI();
|
||||
OnExtraInspectorGUI();
|
||||
PropertyFieldData();
|
||||
@@ -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");
|
||||
@@ -74,8 +72,9 @@ namespace XCharts.Editor
|
||||
{
|
||||
while (listSize > m_Datas.arraySize) m_Datas.arraySize++;
|
||||
while (listSize < m_Datas.arraySize) m_Datas.arraySize--;
|
||||
serie.ResetDataIndex();
|
||||
}
|
||||
if (listSize > 30)// && !XCSettings.editorShowAllListData)
|
||||
if (listSize > 30) // && !XCSettings.editorShowAllListData)
|
||||
{
|
||||
int num = listSize > 10 ? 10 : listSize;
|
||||
for (int i = 0; i < num; i++)
|
||||
@@ -116,70 +115,72 @@ namespace XCharts.Editor
|
||||
m_DataElementFoldout[index] = false;
|
||||
}
|
||||
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");
|
||||
var serieData = m_Datas.GetArrayElementAtIndex(index);
|
||||
var dataIndex = serieData.FindPropertyRelative("m_Index").intValue;
|
||||
m_DataElementFoldout[index] = ChartEditorHelper.DrawHeader("SerieData " + dataIndex, 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");
|
||||
#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 - 0;
|
||||
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))
|
||||
@@ -191,114 +192,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");
|
||||
PropertyField(serieData.FindPropertyRelative("m_Name"));
|
||||
//PropertyField(serieData.FindPropertyRelative("m_State"));
|
||||
if (serie.GetType().IsDefined(typeof(SerieDataExtraFieldAttribute), false))
|
||||
{
|
||||
var attribute = serie.GetType().GetAttribute<SerieDataExtraFieldAttribute>();
|
||||
foreach (var field in attribute.fields)
|
||||
{
|
||||
PropertyField(serieData.FindPropertyRelative(field));
|
||||
}
|
||||
}
|
||||
|
||||
var m_IconStyle = serieData.FindPropertyRelative("m_IconStyles");
|
||||
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);
|
||||
|
||||
var componentNum = m_IconStyle.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 ItemStyle", () =>
|
||||
serieDataMenus.Clear();
|
||||
if (serie.GetType().IsDefined(typeof(SerieDataExtraComponentAttribute), false))
|
||||
{
|
||||
serie.GetSerieData(index).GetOrAddComponent<ItemStyle>();
|
||||
}, m_ItemStyle.arraySize == 0),
|
||||
new HeaderMenuInfo("Add IconStyle", () =>
|
||||
{
|
||||
serie.GetSerieData(index).GetOrAddComponent<IconStyle>();
|
||||
}, m_IconStyle.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<SymbolStyle>();
|
||||
}, 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 ItemStyle", () =>
|
||||
{
|
||||
serie.GetSerieData(index).RemoveComponent<ItemStyle>();
|
||||
}, m_ItemStyle.arraySize > 0),
|
||||
new HeaderMenuInfo("Remove IconStyle", () =>
|
||||
{
|
||||
serie.GetSerieData(index).RemoveComponent<IconStyle>();
|
||||
}, m_IconStyle.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<SymbolStyle>();
|
||||
}, 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_IconStyle.arraySize > 0)
|
||||
PropertyField(m_IconStyle.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--;
|
||||
}
|
||||
|
||||
@@ -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", () =>
|
||||
@@ -164,6 +162,13 @@ namespace XCharts.Editor
|
||||
RefreshEditors();
|
||||
}
|
||||
}));
|
||||
editor.menus.Add(new HeaderMenuInfo("Reset Data Index", () =>
|
||||
{
|
||||
if (chart.ResetDataIndex(id))
|
||||
{
|
||||
RefreshEditors();
|
||||
}
|
||||
}));
|
||||
foreach (var type in GetCovertToSerie(editor.serie.GetType()))
|
||||
{
|
||||
editor.menus.Add(new HeaderMenuInfo("Covert to " + type.Name, () =>
|
||||
@@ -176,7 +181,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 +192,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);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
@@ -12,6 +11,7 @@ namespace XCharts.Editor
|
||||
PropertyField("m_YAxisIndex");
|
||||
PropertyField("m_BarWidth");
|
||||
PropertyField("m_BarGap");
|
||||
PropertyField("m_Clip");
|
||||
PropertyField("m_ItemStyle");
|
||||
PropertyField("m_Animation");
|
||||
}
|
||||
|
||||