mrxy-yk 1.3.0 → 1.3.1

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.
@@ -35,12 +35,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
35
35
  }
36
36
  });
37
37
  function getChartTheme() {
38
- let chartTheme = props.theme || "default";
38
+ let chartTheme = props.theme;
39
39
  if (props.theme === "auto") {
40
40
  const classList = [...document.documentElement.classList.values()];
41
- if (classList.includes("dark")) {
42
- chartTheme = "dark";
43
- }
41
+ chartTheme = classList.includes("dark") ? "dark" : "default";
44
42
  }
45
43
  if (chartTheme === "default") initDefaultTheme();
46
44
  if (chartTheme === "dark") initDarkTheme();
@@ -0,0 +1,411 @@
1
+ import { EChartsThemeConfig } from "../../../config/index.js";
2
+ import { ObjectUtil } from "../../prototype/lib/ObjectUtil.js";
3
+ function getThemeConfig() {
4
+ const colorPalette = [
5
+ "#5470c6",
6
+ "#91cc75",
7
+ "#fac858",
8
+ "#ee6666",
9
+ "#73c0de",
10
+ "#3ba272",
11
+ "#fc8452",
12
+ "#9a60b4",
13
+ "#ea7ccc"
14
+ ];
15
+ const theme = {
16
+ color: colorPalette,
17
+ backgroundColor: "rgba(0, 0, 0, 0)",
18
+ textStyle: {},
19
+ title: {
20
+ textStyle: {
21
+ color: "#464646"
22
+ },
23
+ subtextStyle: {
24
+ color: "#6E7079"
25
+ }
26
+ },
27
+ line: {
28
+ itemStyle: {
29
+ borderWidth: 1
30
+ },
31
+ lineStyle: {
32
+ width: 2
33
+ },
34
+ symbolSize: 4,
35
+ symbol: "emptyCircle",
36
+ smooth: false
37
+ },
38
+ radar: {
39
+ itemStyle: {
40
+ borderWidth: 1
41
+ },
42
+ lineStyle: {
43
+ width: 2
44
+ },
45
+ symbolSize: 4,
46
+ symbol: "emptyCircle",
47
+ smooth: false
48
+ },
49
+ bar: {
50
+ itemStyle: {
51
+ barBorderWidth: 0,
52
+ barBorderColor: "#ccc"
53
+ }
54
+ },
55
+ pie: {
56
+ itemStyle: {
57
+ borderWidth: 0,
58
+ borderColor: "#ccc"
59
+ }
60
+ },
61
+ scatter: {
62
+ itemStyle: {
63
+ borderWidth: 0,
64
+ borderColor: "#ccc"
65
+ }
66
+ },
67
+ boxplot: {
68
+ itemStyle: {
69
+ borderWidth: 0,
70
+ borderColor: "#ccc"
71
+ }
72
+ },
73
+ parallel: {
74
+ itemStyle: {
75
+ borderWidth: 0,
76
+ borderColor: "#ccc"
77
+ }
78
+ },
79
+ sankey: {
80
+ itemStyle: {
81
+ borderWidth: 0,
82
+ borderColor: "#ccc"
83
+ }
84
+ },
85
+ funnel: {
86
+ itemStyle: {
87
+ borderWidth: 0,
88
+ borderColor: "#ccc"
89
+ }
90
+ },
91
+ gauge: {
92
+ itemStyle: {
93
+ borderWidth: 0,
94
+ borderColor: "#ccc"
95
+ }
96
+ },
97
+ candlestick: {
98
+ itemStyle: {
99
+ color: "#eb5454",
100
+ color0: "#47b262",
101
+ borderColor: "#eb5454",
102
+ borderColor0: "#47b262",
103
+ borderWidth: 1
104
+ }
105
+ },
106
+ graph: {
107
+ itemStyle: {
108
+ borderWidth: 0,
109
+ borderColor: "#ccc"
110
+ },
111
+ lineStyle: {
112
+ width: 1,
113
+ color: "#aaa"
114
+ },
115
+ symbolSize: 4,
116
+ symbol: "emptyCircle",
117
+ smooth: false,
118
+ color: [
119
+ "#5470c6",
120
+ "#91cc75",
121
+ "#fac858",
122
+ "#ee6666",
123
+ "#73c0de",
124
+ "#3ba272",
125
+ "#fc8452",
126
+ "#9a60b4",
127
+ "#ea7ccc"
128
+ ],
129
+ label: {
130
+ color: "#eee"
131
+ }
132
+ },
133
+ map: {
134
+ itemStyle: {
135
+ areaColor: "#eee",
136
+ borderColor: "#444",
137
+ borderWidth: 0.5
138
+ },
139
+ label: {
140
+ color: "#000"
141
+ },
142
+ emphasis: {
143
+ itemStyle: {
144
+ areaColor: "rgba(255,215,0,0.8)",
145
+ borderColor: "#444",
146
+ borderWidth: 1
147
+ },
148
+ label: {
149
+ color: "rgb(100,0,0)"
150
+ }
151
+ }
152
+ },
153
+ geo: {
154
+ itemStyle: {
155
+ areaColor: "#eee",
156
+ borderColor: "#444",
157
+ borderWidth: 0.5
158
+ },
159
+ label: {
160
+ color: "#000"
161
+ },
162
+ emphasis: {
163
+ itemStyle: {
164
+ areaColor: "rgba(255,215,0,0.8)",
165
+ borderColor: "#444",
166
+ borderWidth: 1
167
+ },
168
+ label: {
169
+ color: "rgb(100,0,0)"
170
+ }
171
+ }
172
+ },
173
+ categoryAxis: {
174
+ axisLine: {
175
+ show: true,
176
+ lineStyle: {
177
+ color: "#6E7079"
178
+ }
179
+ },
180
+ axisTick: {
181
+ show: true,
182
+ lineStyle: {
183
+ color: "#6E7079"
184
+ }
185
+ },
186
+ axisLabel: {
187
+ show: true,
188
+ color: "#6E7079"
189
+ },
190
+ splitLine: {
191
+ show: false,
192
+ lineStyle: {
193
+ color: [
194
+ "#E0E6F1"
195
+ ]
196
+ }
197
+ },
198
+ splitArea: {
199
+ show: false,
200
+ areaStyle: {
201
+ color: [
202
+ "rgba(250,250,250,0.2)",
203
+ "rgba(210,219,238,0.2)"
204
+ ]
205
+ }
206
+ }
207
+ },
208
+ valueAxis: {
209
+ axisLine: {
210
+ show: false,
211
+ lineStyle: {
212
+ color: "#6E7079"
213
+ }
214
+ },
215
+ axisTick: {
216
+ show: false,
217
+ lineStyle: {
218
+ color: "#6E7079"
219
+ }
220
+ },
221
+ axisLabel: {
222
+ show: true,
223
+ color: "#6E7079"
224
+ },
225
+ splitLine: {
226
+ show: true,
227
+ lineStyle: {
228
+ color: [
229
+ "#E0E6F1"
230
+ ],
231
+ type: "dashed"
232
+ }
233
+ },
234
+ splitArea: {
235
+ show: false,
236
+ areaStyle: {
237
+ color: [
238
+ "rgba(250,250,250,0.2)",
239
+ "rgba(210,219,238,0.2)"
240
+ ]
241
+ }
242
+ }
243
+ },
244
+ logAxis: {
245
+ axisLine: {
246
+ show: false,
247
+ lineStyle: {
248
+ color: "#6E7079"
249
+ }
250
+ },
251
+ axisTick: {
252
+ show: false,
253
+ lineStyle: {
254
+ color: "#6E7079"
255
+ }
256
+ },
257
+ axisLabel: {
258
+ show: true,
259
+ color: "#6E7079"
260
+ },
261
+ splitLine: {
262
+ show: true,
263
+ lineStyle: {
264
+ color: [
265
+ "#E0E6F1"
266
+ ]
267
+ }
268
+ },
269
+ splitArea: {
270
+ show: false,
271
+ areaStyle: {
272
+ color: [
273
+ "rgba(250,250,250,0.2)",
274
+ "rgba(210,219,238,0.2)"
275
+ ]
276
+ }
277
+ }
278
+ },
279
+ timeAxis: {
280
+ axisLine: {
281
+ show: true,
282
+ lineStyle: {
283
+ color: "#6E7079"
284
+ }
285
+ },
286
+ axisTick: {
287
+ show: true,
288
+ lineStyle: {
289
+ color: "#6E7079"
290
+ }
291
+ },
292
+ axisLabel: {
293
+ show: true,
294
+ color: "#6E7079"
295
+ },
296
+ splitLine: {
297
+ show: false,
298
+ lineStyle: {
299
+ color: [
300
+ "#E0E6F1"
301
+ ]
302
+ }
303
+ },
304
+ splitArea: {
305
+ show: false,
306
+ areaStyle: {
307
+ color: [
308
+ "rgba(250,250,250,0.2)",
309
+ "rgba(210,219,238,0.2)"
310
+ ]
311
+ }
312
+ }
313
+ },
314
+ toolbox: {
315
+ iconStyle: {
316
+ borderColor: "#999"
317
+ },
318
+ emphasis: {
319
+ iconStyle: {
320
+ borderColor: "#666"
321
+ }
322
+ }
323
+ },
324
+ legend: {
325
+ textStyle: {
326
+ color: "#333"
327
+ },
328
+ left: "center",
329
+ right: "auto",
330
+ top: 0,
331
+ bottom: 10
332
+ },
333
+ tooltip: {
334
+ axisPointer: {
335
+ lineStyle: {
336
+ color: "#ccc",
337
+ width: 1
338
+ },
339
+ crossStyle: {
340
+ color: "#ccc",
341
+ width: 1
342
+ }
343
+ }
344
+ },
345
+ timeline: {
346
+ lineStyle: {
347
+ color: "#DAE1F5",
348
+ width: 2
349
+ },
350
+ itemStyle: {
351
+ color: "#A4B1D7",
352
+ borderWidth: 1
353
+ },
354
+ controlStyle: {
355
+ color: "#A4B1D7",
356
+ borderColor: "#A4B1D7",
357
+ borderWidth: 1
358
+ },
359
+ checkpointStyle: {
360
+ color: "#316bf3",
361
+ borderColor: "#fff"
362
+ },
363
+ label: {
364
+ color: "#A4B1D7"
365
+ },
366
+ emphasis: {
367
+ itemStyle: {
368
+ color: "#FFF"
369
+ },
370
+ controlStyle: {
371
+ color: "#A4B1D7",
372
+ borderColor: "#A4B1D7",
373
+ borderWidth: 1
374
+ },
375
+ label: {
376
+ color: "#A4B1D7"
377
+ }
378
+ }
379
+ },
380
+ visualMap: {
381
+ color: [
382
+ "#bf444c",
383
+ "#d88273",
384
+ "#f6efa6"
385
+ ]
386
+ },
387
+ markPoint: {
388
+ label: {
389
+ color: "#eee"
390
+ },
391
+ emphasis: {
392
+ label: {
393
+ color: "#eee"
394
+ }
395
+ }
396
+ },
397
+ grid: {
398
+ left: "10%",
399
+ right: "10%",
400
+ top: 60,
401
+ bottom: 70
402
+ }
403
+ };
404
+ if (EChartsThemeConfig.default) {
405
+ ObjectUtil.assignDeep(theme, EChartsThemeConfig.default);
406
+ }
407
+ return theme;
408
+ }
409
+ export {
410
+ getThemeConfig as default
411
+ };
@@ -1,9 +1,10 @@
1
1
  import { echarts } from "../index.js";
2
- import getThemeConfig from "./dark.js";
2
+ import getThemeConfig$1 from "./dark.js";
3
+ import getThemeConfig from "./default.js";
3
4
  let isDarkThemeInit = false;
4
5
  function initDarkTheme() {
5
6
  if (isDarkThemeInit) return;
6
- echarts.registerTheme("dark", getThemeConfig());
7
+ echarts.registerTheme("dark", getThemeConfig$1());
7
8
  isDarkThemeInit = true;
8
9
  }
9
10
  let isDefaultThemeInit = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrxy-yk",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "A collection of Vue 3 components and utilities",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "mrxy-yk",
4
- "version": "1.3.0",
4
+ "version": "1.3.1",
5
5
  "js-types-syntax": "typescript",
6
6
  "contributions": {
7
7
  "html": {