mrxy-yk 1.1.14 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,7 +14,24 @@ export declare class EcBasicOption {
|
|
|
14
14
|
setSeries(series: EcSeriesBasicOption[]): this;
|
|
15
15
|
valueOf(): EChartsOption;
|
|
16
16
|
ec: EChartsType;
|
|
17
|
+
/**
|
|
18
|
+
* 同ECharts实例setOption
|
|
19
|
+
* @param option { EChartsOption }
|
|
20
|
+
*/
|
|
17
21
|
setOption(option: EChartsOption): void;
|
|
22
|
+
/**
|
|
23
|
+
* 同ECharts实例clear
|
|
24
|
+
*/
|
|
25
|
+
clear(): void;
|
|
26
|
+
/**
|
|
27
|
+
* 清空系列
|
|
28
|
+
*/
|
|
29
|
+
clearSeries(): void;
|
|
30
|
+
/**
|
|
31
|
+
* 更新配置项
|
|
32
|
+
* @param option { EcOptionBasicOption }
|
|
33
|
+
*/
|
|
34
|
+
updateOption(option?: EcOptionBasicOption): this;
|
|
18
35
|
}
|
|
19
36
|
/**
|
|
20
37
|
* ECharts系列对象
|
|
@@ -36,9 +36,7 @@ class EcBasicOption {
|
|
|
36
36
|
left: 15
|
|
37
37
|
};
|
|
38
38
|
constructor(option) {
|
|
39
|
-
|
|
40
|
-
assignEcOptionBasicOption(this.currentOption, option);
|
|
41
|
-
}
|
|
39
|
+
this.updateOption(option);
|
|
42
40
|
}
|
|
43
41
|
/**
|
|
44
42
|
* 设置系列
|
|
@@ -73,12 +71,40 @@ class EcBasicOption {
|
|
|
73
71
|
}
|
|
74
72
|
// 存储ECharts实例,和EchartsCanvas组件配合时自动获取
|
|
75
73
|
ec = null;
|
|
76
|
-
|
|
74
|
+
/**
|
|
75
|
+
* 同ECharts实例setOption
|
|
76
|
+
* @param option { EChartsOption }
|
|
77
|
+
*/
|
|
77
78
|
setOption(option) {
|
|
78
79
|
if (this.ec) {
|
|
79
80
|
this.ec.setOption(option);
|
|
80
81
|
}
|
|
81
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* 同ECharts实例clear
|
|
85
|
+
*/
|
|
86
|
+
clear() {
|
|
87
|
+
if (this.ec) {
|
|
88
|
+
this.ec.clear();
|
|
89
|
+
}
|
|
90
|
+
this.clearSeries();
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* 清空系列
|
|
94
|
+
*/
|
|
95
|
+
clearSeries() {
|
|
96
|
+
this.currentOption.series = [];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* 更新配置项
|
|
100
|
+
* @param option { EcOptionBasicOption }
|
|
101
|
+
*/
|
|
102
|
+
updateOption(option) {
|
|
103
|
+
if (option) {
|
|
104
|
+
assignEcOptionBasicOption(this.currentOption, option);
|
|
105
|
+
}
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
82
108
|
}
|
|
83
109
|
class EcBasicSeries {
|
|
84
110
|
// 存储配置
|
package/package.json
CHANGED