@visactor/vseed 0.1.32 → 0.1.33
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/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +82 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js +7 -5
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js +16 -5
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
- package/dist/esm/theme/common/annotaion.js +22 -14
- package/dist/esm/theme/common/annotaion.js.map +1 -1
- package/dist/esm/theme/common/axes.js +22 -6
- package/dist/esm/theme/common/axes.js.map +1 -1
- package/dist/esm/theme/common/crosshair.js +2 -2
- package/dist/esm/theme/common/crosshair.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +28 -0
- package/dist/esm/types/chartType/area/zArea.d.ts +2 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +2 -0
- package/dist/esm/types/chartType/bar/zBar.d.ts +2 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +2 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +2 -0
- package/dist/esm/types/chartType/column/zColumn.d.ts +2 -0
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +2 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +2 -0
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +2 -0
- package/dist/esm/types/chartType/line/zLine.d.ts +2 -0
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +2 -0
- package/dist/esm/types/properties/annotation/annotation.d.ts +2 -0
- package/dist/esm/types/properties/annotation/annotationArea.d.ts +5 -0
- package/dist/esm/types/properties/annotation/zAnnotationArea.d.ts +1 -0
- package/dist/esm/types/properties/annotation/zAnnotationArea.js +1 -0
- package/dist/esm/types/properties/annotation/zAnnotationArea.js.map +1 -1
- package/dist/esm/types/properties/config/annotation/annotation.d.ts +1 -1
- package/dist/esm/types/properties/config/annotation/zAnnotaion.d.ts +2 -0
- package/dist/esm/types/properties/config/annotation/zAnnotaion.js +1 -0
- package/dist/esm/types/properties/config/annotation/zAnnotaion.js.map +1 -1
- package/dist/esm/types/properties/config/config.d.ts +26 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +26 -0
- package/dist/esm/types/zVseed.d.ts +22 -0
- package/dist/umd/index.js +70 -32
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
|
@@ -3870,7 +3870,7 @@
|
|
|
3870
3870
|
right: 'insideRight'
|
|
3871
3871
|
};
|
|
3872
3872
|
const markArea = annotationAreaList.flatMap((annotationArea)=>{
|
|
3873
|
-
const { selector: selectorPoint, text = '', textPosition = 'top', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = 'center', textBaseline = 'top', textBackgroundVisible = theme?.textBackgroundVisible ?? true, textBackgroundColor = theme?.textBackgroundColor ?? '#191d24', textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#191d24', textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundPadding = theme?.textBackgroundPadding ?? 4, areaColor = theme?.areaColor ?? '#888888', areaColorOpacity = theme?.areaColorOpacity ?? 0.15, areaBorderColor = theme?.areaBorderColor ?? '#888888', areaBorderRadius = theme?.areaBorderRadius ?? 4, areaBorderWidth = theme?.areaBorderWidth ?? 1, outerPadding = theme?.outerPadding ?? 4 } = annotationArea;
|
|
3873
|
+
const { selector: selectorPoint, text = '', textPosition = 'top', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = 'center', textBaseline = 'top', textBackgroundVisible = theme?.textBackgroundVisible ?? true, textBackgroundColor = theme?.textBackgroundColor ?? '#191d24', textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#191d24', textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundPadding = theme?.textBackgroundPadding ?? 4, areaColor = theme?.areaColor ?? '#888888', areaColorOpacity = theme?.areaColorOpacity ?? 0.15, areaBorderColor = theme?.areaBorderColor ?? '#888888', areaBorderRadius = theme?.areaBorderRadius ?? 4, areaBorderWidth = theme?.areaBorderWidth ?? 1, areaLineDash = theme?.areaLineDash, outerPadding = theme?.outerPadding ?? 4 } = annotationArea;
|
|
3874
3874
|
const dataset = advancedVSeed.dataset.flat();
|
|
3875
3875
|
const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
|
|
3876
3876
|
const labelPosition = positionMap[textPosition || 'top'];
|
|
@@ -3940,7 +3940,7 @@
|
|
|
3940
3940
|
visible: true,
|
|
3941
3941
|
text: text,
|
|
3942
3942
|
style: {
|
|
3943
|
-
dy: isBottom ? 2 * -(textFontSize || 12) :
|
|
3943
|
+
dy: isBottom ? 2 * -(textFontSize || 12) : 0,
|
|
3944
3944
|
textAlign: textAlign,
|
|
3945
3945
|
textBaseline: textBaseline,
|
|
3946
3946
|
fill: textColor,
|
|
@@ -3953,11 +3953,12 @@
|
|
|
3953
3953
|
visible: textBackgroundVisible,
|
|
3954
3954
|
padding: textBackgroundPadding,
|
|
3955
3955
|
style: {
|
|
3956
|
-
dy: isBottom ? 2 * -(textFontSize || 12) :
|
|
3956
|
+
dy: isBottom ? 2 * -(textFontSize || 12) : 0,
|
|
3957
3957
|
cornerRadius: textBackgroundBorderRadius ?? 4,
|
|
3958
3958
|
fill: textBackgroundColor,
|
|
3959
3959
|
stroke: textBackgroundBorderColor,
|
|
3960
|
-
lineWidth: textBackgroundBorderWidth
|
|
3960
|
+
lineWidth: textBackgroundBorderWidth,
|
|
3961
|
+
fillOpacity: 1
|
|
3961
3962
|
}
|
|
3962
3963
|
}
|
|
3963
3964
|
},
|
|
@@ -3968,7 +3969,8 @@
|
|
|
3968
3969
|
fillOpacity: areaColorOpacity,
|
|
3969
3970
|
stroke: areaBorderColor,
|
|
3970
3971
|
lineWidth: areaBorderWidth,
|
|
3971
|
-
cornerRadius: areaBorderRadius
|
|
3972
|
+
cornerRadius: areaBorderRadius,
|
|
3973
|
+
lineDash: areaLineDash
|
|
3972
3974
|
}
|
|
3973
3975
|
}
|
|
3974
3976
|
};
|
|
@@ -4828,9 +4830,17 @@
|
|
|
4828
4830
|
left: 'insideLeft',
|
|
4829
4831
|
right: 'insideRight'
|
|
4830
4832
|
};
|
|
4833
|
+
const defaultOptions = isBarLikeChart(advancedVSeed) ? {
|
|
4834
|
+
textPosition: 'right',
|
|
4835
|
+
textAlign: 'right'
|
|
4836
|
+
} : {
|
|
4837
|
+
textPosition: 'top',
|
|
4838
|
+
textAlign: 'center'
|
|
4839
|
+
};
|
|
4831
4840
|
const markArea = annotationAreaList.flatMap((annotationArea)=>{
|
|
4832
|
-
const { selector: selectorPoint, text = '',
|
|
4833
|
-
const
|
|
4841
|
+
const { selector: selectorPoint, text = '', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = defaultOptions.textAlign, textBaseline = 'middle', textBackgroundVisible = theme?.textBackgroundVisible ?? true, textBackgroundColor = theme?.textBackgroundColor ?? '#191d24', textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#191d24', textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundPadding = theme?.textBackgroundPadding ?? 4, areaColor = theme?.areaColor ?? '#888888', areaColorOpacity = theme?.areaColorOpacity ?? 0.15, areaBorderColor = theme?.areaBorderColor ?? '#888888', areaBorderRadius = theme?.areaBorderRadius ?? 4, areaBorderWidth = theme?.areaBorderWidth ?? 1, areaLineDash = theme?.areaLineDash, outerPadding = theme?.outerPadding ?? 4 } = annotationArea;
|
|
4842
|
+
const textPosition = annotationArea.textPosition ?? defaultOptions.textPosition;
|
|
4843
|
+
const dy = textPosition.includes('bottom') ? -1 * textFontSize : 0;
|
|
4834
4844
|
const dataset = advancedVSeed.dataset.flat();
|
|
4835
4845
|
const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
|
|
4836
4846
|
return {
|
|
@@ -4907,7 +4917,7 @@
|
|
|
4907
4917
|
return [];
|
|
4908
4918
|
},
|
|
4909
4919
|
label: {
|
|
4910
|
-
position: positionMap[textPosition
|
|
4920
|
+
position: positionMap[textPosition],
|
|
4911
4921
|
visible: true,
|
|
4912
4922
|
text: text,
|
|
4913
4923
|
style: {
|
|
@@ -4928,7 +4938,8 @@
|
|
|
4928
4938
|
cornerRadius: textBackgroundBorderRadius ?? 4,
|
|
4929
4939
|
fill: textBackgroundColor,
|
|
4930
4940
|
stroke: textBackgroundBorderColor,
|
|
4931
|
-
lineWidth: textBackgroundBorderWidth
|
|
4941
|
+
lineWidth: textBackgroundBorderWidth,
|
|
4942
|
+
fillOpacity: 1
|
|
4932
4943
|
}
|
|
4933
4944
|
}
|
|
4934
4945
|
},
|
|
@@ -4939,7 +4950,8 @@
|
|
|
4939
4950
|
fillOpacity: areaColorOpacity,
|
|
4940
4951
|
stroke: areaBorderColor,
|
|
4941
4952
|
lineWidth: areaBorderWidth,
|
|
4942
|
-
cornerRadius: areaBorderRadius
|
|
4953
|
+
cornerRadius: areaBorderRadius,
|
|
4954
|
+
lineDash: areaLineDash
|
|
4943
4955
|
}
|
|
4944
4956
|
}
|
|
4945
4957
|
};
|
|
@@ -9167,8 +9179,8 @@
|
|
|
9167
9179
|
visible: true,
|
|
9168
9180
|
labelVisible: true,
|
|
9169
9181
|
labelColor: '#ffffff',
|
|
9170
|
-
labelBackgroundColor: '
|
|
9171
|
-
lineColor: '#
|
|
9182
|
+
labelBackgroundColor: '#21252C',
|
|
9183
|
+
lineColor: '#21252C'
|
|
9172
9184
|
});
|
|
9173
9185
|
const getLightCrosshairRect = ()=>({
|
|
9174
9186
|
visible: true,
|
|
@@ -9300,7 +9312,11 @@
|
|
|
9300
9312
|
grid: {
|
|
9301
9313
|
visible: true,
|
|
9302
9314
|
gridColor: '#36415926',
|
|
9303
|
-
gridWidth: 0.5
|
|
9315
|
+
gridWidth: 0.5,
|
|
9316
|
+
gridLineDash: [
|
|
9317
|
+
4,
|
|
9318
|
+
2
|
|
9319
|
+
]
|
|
9304
9320
|
},
|
|
9305
9321
|
tick: {
|
|
9306
9322
|
visible: false,
|
|
@@ -9342,7 +9358,11 @@
|
|
|
9342
9358
|
grid: {
|
|
9343
9359
|
visible: false,
|
|
9344
9360
|
gridColor: '#36415926',
|
|
9345
|
-
gridWidth: 0.5
|
|
9361
|
+
gridWidth: 0.5,
|
|
9362
|
+
gridLineDash: [
|
|
9363
|
+
4,
|
|
9364
|
+
2
|
|
9365
|
+
]
|
|
9346
9366
|
},
|
|
9347
9367
|
tick: {
|
|
9348
9368
|
visible: false,
|
|
@@ -9375,8 +9395,12 @@
|
|
|
9375
9395
|
},
|
|
9376
9396
|
grid: {
|
|
9377
9397
|
visible: true,
|
|
9378
|
-
gridColor: '#
|
|
9379
|
-
gridWidth: 0.5
|
|
9398
|
+
gridColor: '#303339',
|
|
9399
|
+
gridWidth: 0.5,
|
|
9400
|
+
gridLineDash: [
|
|
9401
|
+
4,
|
|
9402
|
+
2
|
|
9403
|
+
]
|
|
9380
9404
|
},
|
|
9381
9405
|
tick: {
|
|
9382
9406
|
visible: false,
|
|
@@ -9417,8 +9441,12 @@
|
|
|
9417
9441
|
},
|
|
9418
9442
|
grid: {
|
|
9419
9443
|
visible: false,
|
|
9420
|
-
gridColor: '#
|
|
9421
|
-
gridWidth: 0.5
|
|
9444
|
+
gridColor: '#303339',
|
|
9445
|
+
gridWidth: 0.5,
|
|
9446
|
+
gridLineDash: [
|
|
9447
|
+
4,
|
|
9448
|
+
2
|
|
9449
|
+
]
|
|
9422
9450
|
},
|
|
9423
9451
|
tick: {
|
|
9424
9452
|
visible: false,
|
|
@@ -9466,16 +9494,20 @@
|
|
|
9466
9494
|
textFontSize: 12,
|
|
9467
9495
|
textFontWeight: 400,
|
|
9468
9496
|
textBackgroundVisible: true,
|
|
9469
|
-
textBackgroundColor: '#
|
|
9470
|
-
textBackgroundBorderColor: '#
|
|
9497
|
+
textBackgroundColor: '#BCC1CB',
|
|
9498
|
+
textBackgroundBorderColor: '#BCC1CB',
|
|
9471
9499
|
textBackgroundBorderWidth: 1,
|
|
9472
|
-
textBackgroundBorderRadius:
|
|
9500
|
+
textBackgroundBorderRadius: 0,
|
|
9473
9501
|
textBackgroundPadding: 4,
|
|
9474
|
-
areaColor: '#
|
|
9475
|
-
areaColorOpacity: 0.
|
|
9476
|
-
areaBorderColor: '#
|
|
9477
|
-
areaBorderWidth:
|
|
9478
|
-
areaBorderRadius:
|
|
9502
|
+
areaColor: '#BCC1CB',
|
|
9503
|
+
areaColorOpacity: 0.12,
|
|
9504
|
+
areaBorderColor: '#BCC1CB',
|
|
9505
|
+
areaBorderWidth: 0,
|
|
9506
|
+
areaBorderRadius: 0,
|
|
9507
|
+
areaLineDash: [
|
|
9508
|
+
2,
|
|
9509
|
+
2
|
|
9510
|
+
],
|
|
9479
9511
|
outerPadding: 4
|
|
9480
9512
|
});
|
|
9481
9513
|
const getLightAnnotation = ()=>({
|
|
@@ -9512,20 +9544,24 @@
|
|
|
9512
9544
|
});
|
|
9513
9545
|
const getDarkAnnotationVerticalLine = ()=>getDarkAnnotationHorizontalLine();
|
|
9514
9546
|
const getDarkAnnotationArea = ()=>({
|
|
9515
|
-
textColor: '#
|
|
9547
|
+
textColor: '#E2E3E6',
|
|
9516
9548
|
textFontSize: 12,
|
|
9517
9549
|
textFontWeight: 400,
|
|
9518
9550
|
textBackgroundVisible: true,
|
|
9519
|
-
textBackgroundColor: '#
|
|
9520
|
-
textBackgroundBorderColor: '#
|
|
9551
|
+
textBackgroundColor: '#55595F',
|
|
9552
|
+
textBackgroundBorderColor: '#55595F',
|
|
9521
9553
|
textBackgroundBorderWidth: 1,
|
|
9522
|
-
textBackgroundBorderRadius:
|
|
9554
|
+
textBackgroundBorderRadius: 0,
|
|
9523
9555
|
textBackgroundPadding: 4,
|
|
9524
9556
|
areaColor: '#E2E3E6',
|
|
9525
9557
|
areaColorOpacity: 0.15,
|
|
9526
9558
|
areaBorderColor: '#E2E3E6',
|
|
9527
|
-
areaBorderWidth:
|
|
9528
|
-
areaBorderRadius:
|
|
9559
|
+
areaBorderWidth: 0,
|
|
9560
|
+
areaBorderRadius: 0,
|
|
9561
|
+
areaLineDash: [
|
|
9562
|
+
2,
|
|
9563
|
+
2
|
|
9564
|
+
],
|
|
9529
9565
|
outerPadding: 4
|
|
9530
9566
|
});
|
|
9531
9567
|
const getDarkAnnotation = ()=>({
|
|
@@ -14004,6 +14040,7 @@
|
|
|
14004
14040
|
areaBorderColor: schemas_string().default('#888888').nullish(),
|
|
14005
14041
|
areaBorderWidth: schemas_number().default(1).nullish(),
|
|
14006
14042
|
areaBorderRadius: schemas_number().default(4).nullish(),
|
|
14043
|
+
areaLineDash: schemas_array(schemas_number()).nullish(),
|
|
14007
14044
|
outerPadding: schemas_number().default(4).nullish()
|
|
14008
14045
|
});
|
|
14009
14046
|
const zAnnotationPointConfig = zAnnotationPoint.omit({
|
|
@@ -14048,6 +14085,7 @@
|
|
|
14048
14085
|
areaBorderColor: true,
|
|
14049
14086
|
areaBorderWidth: true,
|
|
14050
14087
|
areaBorderRadius: true,
|
|
14088
|
+
areaLineDash: true,
|
|
14051
14089
|
outerPadding: true
|
|
14052
14090
|
}).partial();
|
|
14053
14091
|
const zAnnotaionConfig = schemas_object({
|