@easyv/config 1.0.46 → 1.0.47
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.
- package/lib/series.js +46 -2
- package/package.json +1 -1
- package/src/series.js +112 -59
package/lib/series.js
CHANGED
|
@@ -259,7 +259,12 @@ var defaultIcon = {
|
|
|
259
259
|
radius: 6
|
|
260
260
|
},
|
|
261
261
|
color: '#1283E3',
|
|
262
|
-
radius: 4
|
|
262
|
+
radius: 4,
|
|
263
|
+
image: 'components/static-image/superChart/fang.png',
|
|
264
|
+
size: {
|
|
265
|
+
width: 10,
|
|
266
|
+
height: 10
|
|
267
|
+
}
|
|
263
268
|
};
|
|
264
269
|
|
|
265
270
|
var commonLine = function commonLine() {
|
|
@@ -399,7 +404,15 @@ var icon = function icon() {
|
|
|
399
404
|
_ref4$color = _ref4.color,
|
|
400
405
|
color = _ref4$color === void 0 ? defaultIcon.color : _ref4$color,
|
|
401
406
|
_ref4$radius = _ref4.radius,
|
|
402
|
-
radius = _ref4$radius === void 0 ? defaultIcon.radius : _ref4$radius
|
|
407
|
+
radius = _ref4$radius === void 0 ? defaultIcon.radius : _ref4$radius,
|
|
408
|
+
_ref4$image = _ref4.image,
|
|
409
|
+
image = _ref4$image === void 0 ? defaultIcon.image : _ref4$image,
|
|
410
|
+
_ref4$size = _ref4.size;
|
|
411
|
+
_ref4$size = _ref4$size === void 0 ? defaultIcon.size : _ref4$size;
|
|
412
|
+
var _ref4$size$width = _ref4$size.width,
|
|
413
|
+
imageWidth = _ref4$size$width === void 0 ? defaultIcon.size.width : _ref4$size$width,
|
|
414
|
+
_ref4$size$height = _ref4$size.height,
|
|
415
|
+
imageHeight = _ref4$size$height === void 0 ? defaultIcon.size.height : _ref4$size$height;
|
|
403
416
|
return {
|
|
404
417
|
name: 'icon',
|
|
405
418
|
displayName: '数据标记',
|
|
@@ -421,8 +434,39 @@ var icon = function icon() {
|
|
|
421
434
|
}, {
|
|
422
435
|
name: '双圆',
|
|
423
436
|
value: 'double'
|
|
437
|
+
}, {
|
|
438
|
+
name: '自定义',
|
|
439
|
+
value: 'custom'
|
|
424
440
|
}]
|
|
425
441
|
}
|
|
442
|
+
}, {
|
|
443
|
+
rule: [['show', '$eq', true], ['mode', '$eq', 'custom']],
|
|
444
|
+
name: 'image',
|
|
445
|
+
displayName: '图片',
|
|
446
|
+
value: image,
|
|
447
|
+
type: 'uploadImage'
|
|
448
|
+
}, {
|
|
449
|
+
rule: [['show', '$eq', true], ['mode', '$eq', 'custom']],
|
|
450
|
+
name: 'size',
|
|
451
|
+
displayName: '尺寸',
|
|
452
|
+
value: [{
|
|
453
|
+
name: 'width',
|
|
454
|
+
displayName: '宽度',
|
|
455
|
+
value: imageWidth,
|
|
456
|
+
config: {
|
|
457
|
+
span: 12,
|
|
458
|
+
suffix: 'W'
|
|
459
|
+
}
|
|
460
|
+
}, {
|
|
461
|
+
name: 'height',
|
|
462
|
+
displayName: '高度',
|
|
463
|
+
value: imageHeight,
|
|
464
|
+
config: {
|
|
465
|
+
span: 12,
|
|
466
|
+
suffix: 'H'
|
|
467
|
+
}
|
|
468
|
+
}],
|
|
469
|
+
type: 'group'
|
|
426
470
|
}, {
|
|
427
471
|
rule: [['show', '$eq', true], ['mode', '$eq', 'double']],
|
|
428
472
|
name: 'inner',
|
package/package.json
CHANGED
package/src/series.js
CHANGED
|
@@ -213,6 +213,11 @@ const defaultIcon = {
|
|
|
213
213
|
outer: { color: 'rgba(24,144,255,0.4)', radius: 6 },
|
|
214
214
|
color: '#1283E3',
|
|
215
215
|
radius: 4,
|
|
216
|
+
image: 'components/static-image/superChart/fang.png',
|
|
217
|
+
size: {
|
|
218
|
+
width: 10,
|
|
219
|
+
height: 10
|
|
220
|
+
}
|
|
216
221
|
};
|
|
217
222
|
|
|
218
223
|
const commonLine = (
|
|
@@ -225,64 +230,64 @@ const commonLine = (
|
|
|
225
230
|
connectNulls = defaultLineSeries.line.connectNulls,
|
|
226
231
|
} = defaultLineSeries.line
|
|
227
232
|
) => [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
233
|
+
{
|
|
234
|
+
name: 'type',
|
|
235
|
+
displayName: '类型',
|
|
236
|
+
value: type,
|
|
237
|
+
type: 'select',
|
|
238
|
+
config: {
|
|
239
|
+
options: [
|
|
240
|
+
{
|
|
241
|
+
name: '实线',
|
|
242
|
+
value: 'solid',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: '虚线',
|
|
246
|
+
value: 'dash',
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
},
|
|
244
250
|
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
type: 'color',
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
name: 'lineWidth',
|
|
254
|
-
displayName: '粗细',
|
|
255
|
-
value: lineWidth,
|
|
256
|
-
type: 'input',
|
|
257
|
-
config: {
|
|
258
|
-
suffix: 'px',
|
|
251
|
+
{
|
|
252
|
+
name: 'color',
|
|
253
|
+
displayName: '颜色',
|
|
254
|
+
value: color,
|
|
255
|
+
type: 'color',
|
|
259
256
|
},
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
rule: [['curve', '$eq', true]],
|
|
269
|
-
name: 'tension',
|
|
270
|
-
displayName: '曲线张力',
|
|
271
|
-
value: tension,
|
|
272
|
-
type: 'range',
|
|
273
|
-
config: {
|
|
274
|
-
min: 0,
|
|
275
|
-
max: 1,
|
|
276
|
-
step: 0.1,
|
|
257
|
+
{
|
|
258
|
+
name: 'lineWidth',
|
|
259
|
+
displayName: '粗细',
|
|
260
|
+
value: lineWidth,
|
|
261
|
+
type: 'input',
|
|
262
|
+
config: {
|
|
263
|
+
suffix: 'px',
|
|
264
|
+
},
|
|
277
265
|
},
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
]
|
|
266
|
+
{
|
|
267
|
+
name: 'curve',
|
|
268
|
+
displayName: '曲线',
|
|
269
|
+
value: curve,
|
|
270
|
+
type: 'boolean',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
rule: [['curve', '$eq', true]],
|
|
274
|
+
name: 'tension',
|
|
275
|
+
displayName: '曲线张力',
|
|
276
|
+
value: tension,
|
|
277
|
+
type: 'range',
|
|
278
|
+
config: {
|
|
279
|
+
min: 0,
|
|
280
|
+
max: 1,
|
|
281
|
+
step: 0.1,
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: 'connectNulls',
|
|
286
|
+
displayName: 'null值连接',
|
|
287
|
+
value: connectNulls,
|
|
288
|
+
type: 'boolean',
|
|
289
|
+
},
|
|
290
|
+
];
|
|
286
291
|
|
|
287
292
|
const lighter = (
|
|
288
293
|
{
|
|
@@ -346,6 +351,11 @@ const icon = ({
|
|
|
346
351
|
} = defaultIcon.outer,
|
|
347
352
|
color = defaultIcon.color,
|
|
348
353
|
radius = defaultIcon.radius,
|
|
354
|
+
image = defaultIcon.image,
|
|
355
|
+
size: {
|
|
356
|
+
width: imageWidth = defaultIcon.size.width,
|
|
357
|
+
height: imageHeight = defaultIcon.size.height
|
|
358
|
+
} = defaultIcon.size
|
|
349
359
|
} = defaultIcon) => ({
|
|
350
360
|
name: 'icon',
|
|
351
361
|
displayName: '数据标记',
|
|
@@ -372,9 +382,52 @@ const icon = ({
|
|
|
372
382
|
name: '双圆',
|
|
373
383
|
value: 'double',
|
|
374
384
|
},
|
|
385
|
+
{
|
|
386
|
+
name: '自定义',
|
|
387
|
+
value: 'custom',
|
|
388
|
+
},
|
|
375
389
|
],
|
|
376
390
|
},
|
|
377
391
|
},
|
|
392
|
+
{
|
|
393
|
+
rule: [
|
|
394
|
+
['show', '$eq', true],
|
|
395
|
+
['mode', '$eq', 'custom'],
|
|
396
|
+
],
|
|
397
|
+
name: 'image',
|
|
398
|
+
displayName: '图片',
|
|
399
|
+
value: image,
|
|
400
|
+
type: 'uploadImage',
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
rule: [
|
|
404
|
+
['show', '$eq', true],
|
|
405
|
+
['mode', '$eq', 'custom'],
|
|
406
|
+
],
|
|
407
|
+
name: 'size',
|
|
408
|
+
displayName: '尺寸',
|
|
409
|
+
value: [
|
|
410
|
+
{
|
|
411
|
+
name: 'width',
|
|
412
|
+
displayName: '宽度',
|
|
413
|
+
value: imageWidth,
|
|
414
|
+
config: {
|
|
415
|
+
span: 12,
|
|
416
|
+
suffix: 'W',
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: 'height',
|
|
421
|
+
displayName: '高度',
|
|
422
|
+
value: imageHeight,
|
|
423
|
+
config: {
|
|
424
|
+
span: 12,
|
|
425
|
+
suffix: 'H',
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
],
|
|
429
|
+
type: 'group',
|
|
430
|
+
},
|
|
378
431
|
{
|
|
379
432
|
rule: [
|
|
380
433
|
['show', '$eq', true],
|
|
@@ -589,17 +642,17 @@ export const pieSeries = (
|
|
|
589
642
|
mapping({ fieldName, displayName }),
|
|
590
643
|
{
|
|
591
644
|
name: 'color',
|
|
592
|
-
displayName: currentColor !=undefined?'默认颜色':'颜色',
|
|
645
|
+
displayName: currentColor != undefined ? '默认颜色' : '颜色',
|
|
593
646
|
type: 'multicolor',
|
|
594
647
|
value: multiColor(color),
|
|
595
648
|
},
|
|
596
|
-
currentColor !=undefined && {
|
|
649
|
+
currentColor != undefined && {
|
|
597
650
|
name: 'currentColor',
|
|
598
651
|
displayName: '当前颜色',
|
|
599
|
-
type:"multicolor",
|
|
652
|
+
type: "multicolor",
|
|
600
653
|
value: multiColor(currentColor)
|
|
601
654
|
}
|
|
602
|
-
].filter((item)
|
|
655
|
+
].filter((item) => !!item),
|
|
603
656
|
type: 'object',
|
|
604
657
|
});
|
|
605
658
|
|