dcim-topology2d 2.2.3 → 3.0.2

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.
Files changed (222) hide show
  1. package/activity-diagram/src/final/final.d.ts +1 -1
  2. package/activity-diagram/src/final/final.rect.d.ts +1 -1
  3. package/activity-diagram/src/final/final.rect.js +1 -1
  4. package/activity-diagram/src/fork/fork.anchor.d.ts +1 -1
  5. package/activity-diagram/src/fork/fork.anchor.js +1 -1
  6. package/activity-diagram/src/fork/fork.d.ts +1 -1
  7. package/activity-diagram/src/fork/fork.rect.d.ts +1 -1
  8. package/activity-diagram/src/fork/fork.rect.js +1 -1
  9. package/activity-diagram/src/register.js +1 -1
  10. package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +1 -1
  11. package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +1 -1
  12. package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +1 -1
  13. package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +1 -1
  14. package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +1 -1
  15. package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +1 -1
  16. package/chart-diagram/index.d.ts +1 -3
  17. package/chart-diagram/index.js +1 -2
  18. package/chart-diagram/src/echarts/index.d.ts +2 -1
  19. package/chart-diagram/src/echarts/index.js +78 -86
  20. package/chart-diagram/src/register.js +8 -9
  21. package/class-diagram/src/class/class.d.ts +1 -1
  22. package/class-diagram/src/class/class.rect.d.ts +1 -1
  23. package/class-diagram/src/class/class.rect.js +1 -1
  24. package/class-diagram/src/register.js +1 -1
  25. package/core/index.d.ts +0 -2
  26. package/core/index.js +18 -2
  27. package/core/src/activeLayer.d.ts +10 -2
  28. package/core/src/activeLayer.js +62 -57
  29. package/core/src/animateLayer.d.ts +7 -3
  30. package/core/src/animateLayer.js +12 -10
  31. package/core/src/calling.d.ts +4 -1
  32. package/core/src/calling.js +68 -69
  33. package/core/src/canvas.d.ts +6 -1
  34. package/core/src/canvas.js +21 -22
  35. package/core/src/common.d.ts +7 -7
  36. package/core/src/common.js +698 -397
  37. package/core/src/core.d.ts +4 -5
  38. package/core/src/core.js +385 -536
  39. package/core/src/divLayer.d.ts +36 -2
  40. package/core/src/divLayer.js +305 -33
  41. package/core/src/healps/changeData.d.ts +2 -1
  42. package/core/src/healps/changeData.js +100 -89
  43. package/core/src/hoverLayer.d.ts +9 -2
  44. package/core/src/hoverLayer.js +34 -31
  45. package/core/src/middles/default.d.ts +3 -1
  46. package/core/src/middles/default.js +51 -65
  47. package/core/src/middles/index.d.ts +2 -1
  48. package/core/src/middles/index.js +2 -4
  49. package/core/src/middles/nodes/arbitrarygraph.js +9 -11
  50. package/core/src/middles/nodes/pentagon.rect.js +1 -1
  51. package/core/src/middles/nodes/rectangle.js +15 -54
  52. package/core/src/middles/nodes/rectangle.rect.js +1 -1
  53. package/core/src/models/data.d.ts +26 -0
  54. package/core/src/models/data.js +77 -0
  55. package/core/src/models/data.js.map +1 -0
  56. package/core/src/models/index.d.ts +1 -0
  57. package/core/src/models/index.js +1 -0
  58. package/core/src/models/line.js +7 -7
  59. package/core/src/models/node.d.ts +0 -10
  60. package/core/src/models/node.js +101 -155
  61. package/core/src/models/pen.js +68 -37
  62. package/core/src/models/rect.js +2 -2
  63. package/core/src/mqtt.d.ts +14 -0
  64. package/core/src/mqtt.js +82 -0
  65. package/core/src/mqtt.js.map +1 -0
  66. package/core/src/offscreen.d.ts +4 -1
  67. package/core/src/offscreen.js +24 -26
  68. package/core/src/options.d.ts +1 -3
  69. package/core/src/options.js +0 -2
  70. package/core/src/poll.js +39 -0
  71. package/core/src/preview.d.ts +13 -2
  72. package/core/src/preview.js +54 -181
  73. package/core/src/renderLayer.d.ts +9 -11
  74. package/core/src/renderLayer.js +61 -60
  75. package/core/src/socket.d.ts +10 -0
  76. package/core/src/socket.js +51 -0
  77. package/core/src/socket.js.map +1 -0
  78. package/core/src/utils/canvas.js +1 -1
  79. package/core/src/utils/construction.d.ts +3 -36
  80. package/core/src/utils/construction.js +1 -29
  81. package/core/src/utils/conversion.d.ts +0 -15
  82. package/core/src/utils/conversion.js +0 -319
  83. package/core/src/utils/dom.d.ts +8 -0
  84. package/core/src/utils/dom.js +67 -0
  85. package/core/src/utils/dom.js.map +1 -0
  86. package/core/src/utils/index.d.ts +1 -2
  87. package/core/src/utils/index.js +1 -2
  88. package/core/src/utils/onmousevent.d.ts +0 -3
  89. package/core/src/utils/onmousevent.js +10 -42
  90. package/flow-diagram/src/comment/comment.anchor.d.ts +1 -1
  91. package/flow-diagram/src/comment/comment.anchor.js +1 -1
  92. package/flow-diagram/src/comment/comment.d.ts +1 -1
  93. package/flow-diagram/src/data/data.anchor.d.ts +1 -1
  94. package/flow-diagram/src/data/data.anchor.js +1 -1
  95. package/flow-diagram/src/data/data.d.ts +1 -1
  96. package/flow-diagram/src/data/data.rect.d.ts +1 -1
  97. package/flow-diagram/src/data/data.rect.js +1 -1
  98. package/flow-diagram/src/db/db.d.ts +1 -1
  99. package/flow-diagram/src/db/db.rect.d.ts +1 -1
  100. package/flow-diagram/src/db/db.rect.js +1 -1
  101. package/flow-diagram/src/display/display.anchor.d.ts +1 -1
  102. package/flow-diagram/src/display/display.anchor.js +1 -1
  103. package/flow-diagram/src/display/display.d.ts +1 -1
  104. package/flow-diagram/src/display/display.rect.d.ts +1 -1
  105. package/flow-diagram/src/display/display.rect.js +1 -1
  106. package/flow-diagram/src/document/document.anchor.d.ts +1 -1
  107. package/flow-diagram/src/document/document.anchor.js +1 -1
  108. package/flow-diagram/src/document/document.d.ts +1 -1
  109. package/flow-diagram/src/document/document.rect.d.ts +1 -1
  110. package/flow-diagram/src/document/document.rect.js +1 -1
  111. package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +1 -1
  112. package/flow-diagram/src/externStorage/externStorage.anchor.js +1 -1
  113. package/flow-diagram/src/externStorage/externStorage.d.ts +1 -1
  114. package/flow-diagram/src/externStorage/externStorage.rect.d.ts +1 -1
  115. package/flow-diagram/src/externStorage/externStorage.rect.js +1 -1
  116. package/flow-diagram/src/internalStorage/internalStorage.d.ts +1 -1
  117. package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +1 -1
  118. package/flow-diagram/src/internalStorage/internalStorage.rect.js +1 -1
  119. package/flow-diagram/src/manually/manually.anchor.d.ts +1 -1
  120. package/flow-diagram/src/manually/manually.anchor.js +1 -1
  121. package/flow-diagram/src/manually/manually.d.ts +1 -1
  122. package/flow-diagram/src/manually/manually.rect.d.ts +1 -1
  123. package/flow-diagram/src/manually/manually.rect.js +1 -1
  124. package/flow-diagram/src/parallel/parallel.anchor.d.ts +1 -1
  125. package/flow-diagram/src/parallel/parallel.anchor.js +1 -1
  126. package/flow-diagram/src/parallel/parallel.d.ts +1 -1
  127. package/flow-diagram/src/queue/queue.d.ts +1 -1
  128. package/flow-diagram/src/queue/queue.rect.d.ts +1 -1
  129. package/flow-diagram/src/queue/queue.rect.js +1 -1
  130. package/flow-diagram/src/register.js +1 -1
  131. package/flow-diagram/src/subprocess/subprocess.d.ts +1 -1
  132. package/flow-diagram/src/subprocess/subprocess.rect.d.ts +1 -1
  133. package/flow-diagram/src/subprocess/subprocess.rect.js +1 -1
  134. package/layout/src/align.d.ts +1 -1
  135. package/layout/src/align.js +1 -1
  136. package/layout/src/layout.d.ts +1 -1
  137. package/layout/src/layout.js +1 -1
  138. package/myShape-diagram/{index.js → myShape.js} +1 -4
  139. package/package.json +1 -1
  140. package/sequence-diagram/src/focus/focus.anchor.d.ts +1 -1
  141. package/sequence-diagram/src/focus/focus.anchor.js +1 -1
  142. package/sequence-diagram/src/focus/focus.d.ts +1 -1
  143. package/sequence-diagram/src/focus/focus.rect.d.ts +1 -1
  144. package/sequence-diagram/src/focus/focus.rect.js +1 -1
  145. package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +1 -1
  146. package/sequence-diagram/src/lifeline/lifeline.anchor.js +1 -1
  147. package/sequence-diagram/src/lifeline/lifeline.d.ts +1 -1
  148. package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +1 -1
  149. package/sequence-diagram/src/lifeline/lifeline.rect.js +1 -1
  150. package/sequence-diagram/src/register.js +1 -1
  151. package/chart-diagram/src/utils/changeOptions.d.ts +0 -8
  152. package/chart-diagram/src/utils/changeOptions.js +0 -273
  153. package/chart-diagram/src/utils/conversion.d.ts +0 -19
  154. package/chart-diagram/src/utils/conversion.js +0 -601
  155. package/chart-diagram/src/utils/drawGraphic.d.ts +0 -3
  156. package/chart-diagram/src/utils/drawGraphic.js +0 -97
  157. package/chart-diagram/src/utils/formatter.d.ts +0 -1
  158. package/chart-diagram/src/utils/formatter.js +0 -206
  159. package/chart-diagram/src/utils/index.d.ts +0 -5
  160. package/chart-diagram/src/utils/index.js +0 -5
  161. package/chart-diagram/src/utils/render.d.ts +0 -8
  162. package/chart-diagram/src/utils/render.js +0 -223
  163. package/chart-diagram/src/utils/surfaceParametricConversion.d.ts +0 -3
  164. package/chart-diagram/src/utils/surfaceParametricConversion.js +0 -252
  165. package/core/src/element/common.d.ts +0 -6
  166. package/core/src/element/common.js +0 -62
  167. package/core/src/element/datePicker.d.ts +0 -3
  168. package/core/src/element/datePicker.js +0 -44
  169. package/core/src/element/iframe.d.ts +0 -3
  170. package/core/src/element/iframe.js +0 -12
  171. package/core/src/element/index.d.ts +0 -5
  172. package/core/src/element/index.js +0 -6
  173. package/core/src/element/select.d.ts +0 -11
  174. package/core/src/element/select.js +0 -273
  175. package/core/src/element/tab.d.ts +0 -1
  176. package/core/src/element/tab.js +0 -20
  177. package/core/src/element/time.d.ts +0 -3
  178. package/core/src/element/time.js +0 -44
  179. package/core/src/middles/arrows/index.d.ts +0 -4
  180. package/core/src/middles/arrows/index.js +0 -5
  181. package/core/src/middles/lines/index.d.ts +0 -4
  182. package/core/src/middles/lines/index.js +0 -5
  183. package/core/src/middles/nodes/formDatePicker.d.ts +0 -2
  184. package/core/src/middles/nodes/formDatePicker.js +0 -108
  185. package/core/src/middles/nodes/formoverflow.js +0 -62
  186. package/core/src/middles/nodes/formselect.d.ts +0 -2
  187. package/core/src/middles/nodes/formselect.js +0 -111
  188. package/core/src/middles/nodes/iframe.d.ts +0 -2
  189. package/core/src/middles/nodes/iframe.js +0 -29
  190. package/core/src/middles/nodes/index.d.ts +0 -52
  191. package/core/src/middles/nodes/index.js +0 -54
  192. package/core/src/middles/nodes/progress.d.ts +0 -2
  193. package/core/src/middles/nodes/progress.js +0 -63
  194. package/core/src/middles/nodes/progress.js.map +0 -1
  195. package/core/src/middles/nodes/switchs.d.ts +0 -2
  196. package/core/src/middles/nodes/switchs.js +0 -46
  197. package/core/src/middles/nodes/time.d.ts +0 -2
  198. package/core/src/middles/nodes/time.js +0 -98
  199. package/core/src/store/common.d.ts +0 -9
  200. package/core/src/store/common.js +0 -5
  201. package/core/src/store/data.d.ts +0 -205
  202. package/core/src/store/data.js +0 -198
  203. package/core/src/store/index.d.ts +0 -2
  204. package/core/src/store/index.js +0 -2
  205. package/core/src/utils/assignment.d.ts +0 -7
  206. package/core/src/utils/assignment.js +0 -229
  207. package/core/src/utils/params.d.ts +0 -3
  208. package/core/src/utils/params.js +0 -136
  209. package/static/echartsDefaultData.js +0 -178
  210. package/static/element.js +0 -14
  211. package/static/form.js +0 -11
  212. package/static/index.js +0 -3
  213. package/store/actions.js +0 -2
  214. package/store/clear.js +0 -14
  215. package/store/default.js +0 -22
  216. package/store/index.js +0 -3
  217. package/style/common.css +0 -15
  218. package/style/datePicker.css +0 -44
  219. package/style/editor.css +0 -16
  220. package/style/index.css +0 -5
  221. package/style/select.css +0 -143
  222. /package/myShape-diagram/{index.d.ts → myShape.ts} +0 -0
@@ -1,273 +0,0 @@
1
- // 初始化图例数据和图例配置数据
2
- import {
3
- echartsXAxisDefaultStyleData,
4
- echartsYAxisDefaultStyleData,
5
- echartsLineSeriesStyleData,
6
- echartsColorData
7
- } from '../../../static';
8
- import {getPie3D} from './surfaceParametricConversion';
9
-
10
- // 配置环形图中间区域文字样式
11
- export function setRingChartText(textData) {
12
- const {
13
- vFontSize, vFontWeight, vColor,
14
- vTop, unitTop, unitFontSize, unitFontWeight,
15
- unitColor} = textData;
16
- if(!unitTop) textData.unitTop = 0;
17
- return {
18
- v: {
19
- fontSize: vFontSize,
20
- fontWeight: vFontWeight,
21
- color: vColor,
22
- padding: [vTop, 0, 0, 0]
23
- },
24
- unit: {
25
- fontSize: unitFontSize,
26
- fontWeight: unitFontWeight,
27
- color: unitColor,
28
- padding: [unitTop, 0, 0, 0]
29
- }
30
- };
31
- }
32
- // 配置环形‘设备告警统计图’节点展示
33
- export function setRingPreSeriesOptions(option, appearance) {
34
- const rich = setRingChartText(appearance.text);
35
- Object.assign(option.title.textStyle.rich, rich);
36
- option.title.y = `${appearance.text.y}%`;
37
- option.series[0].radius[1] = `${appearance.inner.borderWidth}%`;
38
- option.series[0].data[0].itemStyle.color = appearance.inner.borderColor;
39
- option.series[0].data[1].itemStyle.color = appearance.inner.borderBgColor;
40
- option.series[1].radius[1] = `${appearance.outer.borderWidth}%`;
41
- option.series[1].data[0].itemStyle.color = appearance.outer.borderColor;
42
- }
43
- // 配置环形‘内存、硬盘、CPU指标占比统计’节点展示
44
- export function setRingProSeriesOptions(option, appearance) {
45
- const seriesFirstChildNode = option.series[0];
46
- const rich = setRingChartText(appearance.text);
47
- Object.assign(seriesFirstChildNode.data[0].label.normal.rich, rich);
48
- seriesFirstChildNode.data[0].label.normal.formatter = function(params){
49
- return `{v|${params.value}}{unit|%}`;
50
- }
51
- seriesFirstChildNode.data[0].value = appearance.proportion;
52
- seriesFirstChildNode.radius = appearance.outer.radius;
53
- seriesFirstChildNode.data[0].itemStyle = {
54
- normal: {
55
- color: appearance.outer.borderColor,
56
- shadowColor: appearance.outer.borderColor,
57
- shadowBlur: 0
58
- }
59
- };
60
- seriesFirstChildNode.data[1].value = 100 - appearance.proportion;
61
- seriesFirstChildNode.data[1].itemStyle.normal.color = appearance.outer.borderBgColor;
62
- const seriesLastChildNode = option.series[1];
63
- seriesLastChildNode.radius = appearance.inner.radius;
64
- seriesLastChildNode.itemStyle.normal.color.colorStops[0].color = appearance.inner.borderColor;
65
- }
66
-
67
- // 3D饼图 | 环形图 属性配置
68
- export function set3DPieOptions(option, appearance, labelLineData, realData) {
69
- let type = appearance.type.includes('pie') ? 'pie' : 'ring';
70
- const {
71
- legendData,
72
- series,
73
- node,
74
- total,
75
- boxHeight
76
- } = getPie3D(appearance.grid.internalDiameterRatio, type, appearance, labelLineData, realData);
77
- option.grid3D.boxHeight = boxHeight;
78
- option.legend.data = legendData;
79
- option.series = series;
80
- return {
81
- node,
82
- total
83
- };
84
- }
85
-
86
- // 图表X轴数据
87
- export function setChartXAxisData(xAxis, appearance) {
88
- for (let i = 0; i < xAxis.length; i++) {
89
- const item = xAxis[i];
90
- if (!item.axisLabel) {
91
- item.axisLabel = JSON.parse(JSON.stringify(echartsXAxisDefaultStyleData['x1AxisLabel']));
92
- }
93
- const axisLabelStr = `x${i + 1}AxisLabel`;
94
- if (!appearance[axisLabelStr]) {
95
- appearance[axisLabelStr] = JSON.parse(JSON.stringify(echartsXAxisDefaultStyleData[axisLabelStr]));
96
- Object.assign(appearance[axisLabelStr], item.axisLabel);
97
- } else {
98
- item.axisLabel.color = appearance[axisLabelStr].color || '';
99
- item.axisLabel.fontSize = appearance[axisLabelStr].fontSize || 12;
100
- }
101
- }
102
- //return xAxis;
103
- }
104
-
105
- /**
106
- * 图表Y轴数据
107
- * @param yAxis Y轴配置数据
108
- * @param appearance 图表自定义配置
109
- */
110
- export function setChartYAxisData(yAxis, appearance) {
111
- if (typeof appearance.ySplitLineShow !== 'boolean') {
112
- appearance.ySplitLineShow = yAxis[0].splitLine.show;
113
- }
114
- if (!appearance.ysplitLineLineStyle && yAxis[0].splitLine.show) {
115
- appearance.ysplitLineLineStyle = JSON.parse(JSON.stringify(echartsYAxisDefaultStyleData['ysplitLineLineStyle']));
116
- }
117
- if(appearance.total && appearance.total.length && appearance.totalLabelSynchroYData) {
118
- const newYAxisData = [];
119
- for (let i = 0; i < appearance.total.length; i++) {
120
- const item = appearance.total[i];
121
- if(item.value) newYAxisData.push(item.label);
122
- }
123
- yAxis[0].data = newYAxisData;
124
- }
125
- for (let i = 0; i < yAxis.length; i++) {
126
- const item = yAxis[i];
127
- if(!item.axisLabel) item.axisLabel = {};
128
- if (!item.axisLabel.textStyle) {
129
- item.axisLabel.textStyle = JSON.parse(JSON.stringify(echartsYAxisDefaultStyleData['y1axisLabelTextStyle']));
130
- }
131
- if(!item.splitLine) item.splitLine = {};
132
- if (!item.splitLine.lineStyle) {
133
- item.splitLine.lineStyle = JSON.parse(JSON.stringify(echartsYAxisDefaultStyleData['ysplitLineLineStyle']));
134
- }
135
- const axisLabelTextStyleStr = `y${i + 1}axisLabelTextStyle`;
136
- if (!appearance[axisLabelTextStyleStr]) {
137
- appearance[axisLabelTextStyleStr] = JSON.parse(JSON.stringify(echartsYAxisDefaultStyleData[axisLabelTextStyleStr]));
138
- Object.assign(appearance[axisLabelTextStyleStr], item.axisLabel.textStyle);
139
- } else {
140
- const axisLabelTextStyNode = appearance[axisLabelTextStyleStr];
141
- item.axisLabel.textStyle.color = axisLabelTextStyNode.color || '';
142
- item.axisLabel.textStyle.fontSize = axisLabelTextStyNode.fontSize || '12';
143
- item.axisLabel.textStyle.padding = axisLabelTextStyNode.padding || [20, 20, 20, 20];
144
- }
145
- if (appearance.ysplitLineLineStyle) {
146
- item.splitLine.show = appearance.ySplitLineShow;
147
- const axisLabelTextStyNode = appearance.ysplitLineLineStyle;
148
- item.splitLine.lineStyle.type = axisLabelTextStyNode.type || 'solid';
149
- item.splitLine.lineStyle.color = axisLabelTextStyNode.color || '';
150
- }
151
- const minMaxStr = `y${i + 1}MinMaxData`;
152
- if (!appearance[minMaxStr] && item.max) {
153
- appearance[minMaxStr] = JSON.parse(JSON.stringify(echartsYAxisDefaultStyleData[minMaxStr]));
154
- const minMaxParams = {
155
- max: item.max,
156
- min: item.min,
157
- interval: item.interval
158
- };
159
- Object.assign(appearance[minMaxStr], minMaxParams);
160
- } else {
161
- const minMaxNode = appearance[minMaxStr];
162
- if (minMaxNode) {
163
- item.max = minMaxNode.max;
164
- item.min = minMaxNode.min;
165
- item.interval = minMaxNode.interval;
166
- }
167
- }
168
- const nameStr = `y${i + 1}NameData`;
169
- if (!appearance[nameStr] && item.name) {
170
- appearance[nameStr] = JSON.parse(JSON.stringify(echartsYAxisDefaultStyleData[nameStr]));
171
- const nameParams = {
172
- name: item.name,
173
- nameTextStyle: {
174
- color: item.nameTextStyle.color,
175
- padding: item.nameTextStyle.padding,
176
- },
177
- nameGap: item.nameGap
178
- };
179
- Object.assign(appearance[nameStr], nameParams);
180
- } else {
181
- const nameNode = appearance[nameStr];
182
- if (nameNode) {
183
- item.name = nameNode.name;
184
- item.nameTextStyle.color = nameNode.nameTextStyle.color;
185
- item.nameTextStyle.padding = nameNode.nameTextStyle.padding;
186
- item.nameGap = nameNode.nameGap;
187
- }
188
- }
189
- }
190
- //return yAxis;
191
- }
192
-
193
- // 图表图例数据
194
- export function setChartLegendData(legend, appearance) {
195
- // 设置默认图例文字配置,如果想改变初始化文字属性,在 appearance中配置即可
196
- if (!legend.textStyle) legend.textStyle = {
197
- color: '#fff',
198
- height: 8
199
- };
200
- legend.textStyle.rich = {
201
- a: {
202
- fontSize: 12,
203
- verticalAlign: 'bottom',
204
- }
205
- };
206
- const {
207
- icon,
208
- itemWidth,
209
- itemHeight,
210
- itemGap,
211
- top,
212
- right,
213
- bottom,
214
- left,
215
- padding,
216
- color,
217
- height,
218
- fontSize
219
- } = appearance.legend;
220
- legend.icon = icon || '';
221
- legend.itemWidth = itemWidth || 12;
222
- legend.itemHeight = itemHeight || 12;
223
- legend.itemGap = itemGap || 8;
224
- legend.top = top || 'auto';
225
- legend.right = right || 'auto';
226
- legend.bottom = bottom || 'auto';
227
- legend.left = left || 'auto';
228
- legend.padding = padding || [5, 5, 5, 5];
229
- legend.textStyle.color = color || '';
230
- legend.textStyle.height = height || 8;
231
- legend.textStyle.rich.a = fontSize || 12;
232
- //return legend;
233
- }
234
-
235
- // 图表曲线数据配置
236
- export function setLineSeriesStyleData(series, appearance) {
237
- let seriesOptions = [];
238
- for (let i = 0; i < series.length; i++) {
239
- const defaultSeriesStyle = JSON.parse(JSON.stringify(echartsLineSeriesStyleData));
240
- const item = series[i];
241
- let appearanceSeries = appearance.seriesOptions && appearance.seriesOptions[i];
242
- if(!appearanceSeries) {
243
- appearanceSeries = defaultSeriesStyle;
244
- appearanceSeries.name = item.name;
245
- appearanceSeries.itemLineStyle.color = i === 0 ? defaultSeriesStyle.itemLineStyle.color : echartsColorData[i];
246
- seriesOptions.push(defaultSeriesStyle);
247
- }else {
248
- seriesOptions.push(appearanceSeries);
249
- }
250
- item.symbol = appearanceSeries.symbol;
251
- item.smooth = appearanceSeries.smooth;
252
- item.symbolSize = appearanceSeries.symbolSize || 18;
253
- item.itemStyle = {
254
- normal: {
255
- color: appearanceSeries.itemLineStyle.color,
256
- lineStyle: appearanceSeries.itemLineStyle
257
- }
258
- };
259
- if (appearanceSeries.area) {
260
- item.areaStyle = {
261
- color: appearanceSeries.areaColor && {...appearanceSeries.areaColor} || {...defaultSeriesStyle.areaColor}
262
- };
263
- appearanceSeries.linear ?
264
- item.areaStyle.color.colorStops = [...appearanceSeries.areaColorStops] :
265
- item.areaStyle = Object.assign({}, item.areaStyle, {color: appearanceSeries.areaBgColor || 'rgba(49, 144, 255, 0.21)'});
266
- } else {
267
- if (item.areaStyle) delete item['areaStyle'];
268
- }
269
- }
270
-
271
- appearance.seriesOptions = seriesOptions;
272
- //return series;
273
- }
@@ -1,19 +0,0 @@
1
- interface echartsOptions {
2
- color: '',
3
- xAxis: [],
4
- yAxis: [],
5
- series: [],
6
- tooltip: null
7
- }
8
- export declare function getXYAxisLabelVal(index: number, intervalNum: number, value: any): string;
9
- export declare function initBindCorrelationSetting(node: any): string;
10
- export declare function setMapScatterOptions(option: echartsOptions, node: any): void;
11
- export declare function setMapLineBarOptions(option: echartsOptions, node: any): void;
12
- export declare function setMapGaugeOptions(option: echartsOptions, node: any): void;
13
- export declare function setMapRingOptions(option: echartsOptions, node: any): void;
14
- export declare function setMap3dBarOptions(option: echartsOptions, node: any): void;
15
- export declare function setMapTopOptions(option: echartsOptions, node: any): void;
16
- export declare function setMapGlobalOptions(option: echartsOptions, node: any): void;
17
- export declare function setMapDataOptions(option: echartsOptions, node: any): void;
18
- export declare function setMapAutoMoveOptions(option: echartsOptions, chartNode: string,node: any, callback: any): void;
19
- export declare function setMapStopAutoMoveOptions(chartNode: string): void;