@visactor/vseed 0.0.26 → 0.0.28
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/builder/builder/builder.d.ts +51 -0
- package/dist/index.cjs +129 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +129 -64
- package/dist/index.js.map +1 -1
- package/dist/pipeline/spec/chart/pipes/dataset/index.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipes/dataset/progressive.d.ts +2 -0
- package/dist/types/advancedVSeed.d.ts +12 -0
- package/dist/types/chartType/area/area.d.ts +237 -6
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +237 -6
- package/dist/types/chartType/areaRange/areaRange.d.ts +237 -6
- package/dist/types/chartType/bar/bar.d.ts +78 -2
- package/dist/types/chartType/barParallel/barParallel.d.ts +78 -2
- package/dist/types/chartType/barPercent/barPercent.d.ts +78 -2
- package/dist/types/chartType/column/column.d.ts +78 -2
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +78 -2
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +78 -2
- package/dist/types/chartType/line/line.d.ts +163 -4
- package/dist/types/chartType/scatter/scatter.d.ts +82 -2
- package/dist/types/properties/config/config.d.ts +12 -0
- package/dist/types/properties/theme/customTheme.d.ts +12 -0
- package/dist/types/vseed.d.ts +1505 -117
- package/dist/umd/index.js +132 -389
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -2
package/dist/index.cjs
CHANGED
@@ -2395,6 +2395,20 @@ const datasetPivot = (spec, context)=>{
|
|
2395
2395
|
records: records
|
2396
2396
|
};
|
2397
2397
|
};
|
2398
|
+
const progressive = (spec, context)=>{
|
2399
|
+
const result = {
|
2400
|
+
...spec
|
2401
|
+
};
|
2402
|
+
const { advancedVSeed } = context;
|
2403
|
+
const { dataset } = advancedVSeed;
|
2404
|
+
const size = dataset.length;
|
2405
|
+
if (size < 5000) return result;
|
2406
|
+
result.large = true;
|
2407
|
+
result.largeThreshold = 5000;
|
2408
|
+
result.progressiveStep = 400;
|
2409
|
+
result.progressiveThreshold = 8000;
|
2410
|
+
return result;
|
2411
|
+
};
|
2398
2412
|
const initColumn = (spec, context)=>{
|
2399
2413
|
const result = {
|
2400
2414
|
...spec
|
@@ -2618,7 +2632,7 @@ const initPie = (spec, context)=>{
|
|
2618
2632
|
const { advancedVSeed } = context;
|
2619
2633
|
const { encoding, dataset } = advancedVSeed;
|
2620
2634
|
if (!encoding[0].angle || !encoding[0].radius || !encoding[0].group) return result;
|
2621
|
-
const showStroke = dataset.length
|
2635
|
+
const showStroke = dataset.length <= 30;
|
2622
2636
|
result.type = 'pie';
|
2623
2637
|
result.outerRadius = 0.8;
|
2624
2638
|
result.innerRadius = 0;
|
@@ -2654,7 +2668,7 @@ const initDonut = (spec, context)=>{
|
|
2654
2668
|
const { advancedVSeed } = context;
|
2655
2669
|
const { encoding, dataset } = advancedVSeed;
|
2656
2670
|
if (!encoding[0].angle || !encoding[0].radius || !encoding[0].group) return result;
|
2657
|
-
const showStroke = dataset.length
|
2671
|
+
const showStroke = dataset.length <= 30;
|
2658
2672
|
result.type = 'pie';
|
2659
2673
|
result.outerRadius = 0.8;
|
2660
2674
|
result.innerRadius = 0.8 * result.outerRadius;
|
@@ -3377,7 +3391,7 @@ const tooltip_tooltip = (spec, context)=>{
|
|
3377
3391
|
...spec
|
3378
3392
|
};
|
3379
3393
|
const { advancedVSeed } = context;
|
3380
|
-
const { measures, datasetReshapeInfo, chartType } = advancedVSeed;
|
3394
|
+
const { measures, datasetReshapeInfo, chartType, locale } = advancedVSeed;
|
3381
3395
|
const baseConfig = advancedVSeed.config[chartType];
|
3382
3396
|
const { tooltip = {
|
3383
3397
|
enable: true
|
@@ -3406,7 +3420,7 @@ const tooltip_tooltip = (spec, context)=>{
|
|
3406
3420
|
const formatter = createFormatter(format);
|
3407
3421
|
return formatter(value);
|
3408
3422
|
}
|
3409
|
-
if (autoFormat) return autoFormatter(value);
|
3423
|
+
if (autoFormat) return autoFormatter(value, locale);
|
3410
3424
|
return String(value);
|
3411
3425
|
}
|
3412
3426
|
}
|
@@ -3428,7 +3442,7 @@ const tooltip_tooltip = (spec, context)=>{
|
|
3428
3442
|
const formatter = createFormatter(format);
|
3429
3443
|
return formatter(value);
|
3430
3444
|
}
|
3431
|
-
if (autoFormat) return autoFormatter(value);
|
3445
|
+
if (autoFormat) return autoFormatter(value, locale);
|
3432
3446
|
return String(value);
|
3433
3447
|
}
|
3434
3448
|
}
|
@@ -4119,14 +4133,15 @@ const isDimensionSelector = (selector)=>'object' == typeof selector && null !==
|
|
4119
4133
|
].includes(selector.op));
|
4120
4134
|
const barStyle_barStyle = (spec, context)=>{
|
4121
4135
|
const { advancedVSeed } = context;
|
4122
|
-
const { markStyle } = advancedVSeed;
|
4136
|
+
const { markStyle, dataset } = advancedVSeed;
|
4123
4137
|
const { barStyle } = markStyle;
|
4138
|
+
const showStroke = dataset.length <= 100;
|
4124
4139
|
const result = {
|
4125
4140
|
...spec,
|
4126
4141
|
bar: {
|
4127
4142
|
style: {
|
4128
4143
|
stroke: '#fff',
|
4129
|
-
lineWidth: 1
|
4144
|
+
lineWidth: showStroke ? 1 : 0
|
4130
4145
|
},
|
4131
4146
|
state: {
|
4132
4147
|
hover: {
|
@@ -4162,10 +4177,13 @@ const barStyle_barStyle = (spec, context)=>{
|
|
4162
4177
|
style: {
|
4163
4178
|
fill: barColor,
|
4164
4179
|
fillOpacity: barColorOpacity,
|
4165
|
-
|
4166
|
-
|
4167
|
-
|
4168
|
-
|
4180
|
+
cornerRadius: barRadius,
|
4181
|
+
innerBorder: {
|
4182
|
+
stroke: barBorderColor,
|
4183
|
+
lineWidth: barBorderWidth,
|
4184
|
+
distance: (barBorderWidth || 0) / 2,
|
4185
|
+
lineDash: lineDash
|
4186
|
+
}
|
4169
4187
|
}
|
4170
4188
|
}
|
4171
4189
|
};
|
@@ -4214,9 +4232,12 @@ const pointStyle_pointStyle = (spec, context)=>{
|
|
4214
4232
|
size: pointSize,
|
4215
4233
|
fill: pointColor,
|
4216
4234
|
fillOpacity: pointColorOpacity,
|
4217
|
-
|
4218
|
-
|
4219
|
-
|
4235
|
+
innerBorder: {
|
4236
|
+
stroke: pointBorderColor,
|
4237
|
+
lineWidth: pointBorderWidth,
|
4238
|
+
distance: (pointBorderWidth || 0) / 2,
|
4239
|
+
lineDash: lineDash
|
4240
|
+
}
|
4220
4241
|
}
|
4221
4242
|
}
|
4222
4243
|
};
|
@@ -5034,6 +5055,7 @@ const line_line = [
|
|
5034
5055
|
color_color,
|
5035
5056
|
background_backgroundColor,
|
5036
5057
|
datasetXY,
|
5058
|
+
progressive,
|
5037
5059
|
xBand,
|
5038
5060
|
yLinear,
|
5039
5061
|
label_label,
|
@@ -5058,6 +5080,7 @@ const pivotLine = [
|
|
5058
5080
|
color_color,
|
5059
5081
|
background_backgroundColor,
|
5060
5082
|
datasetXY,
|
5083
|
+
progressive,
|
5061
5084
|
xBand,
|
5062
5085
|
yLinear,
|
5063
5086
|
label_label,
|
@@ -5085,6 +5108,7 @@ const column = [
|
|
5085
5108
|
color_color,
|
5086
5109
|
background_backgroundColor,
|
5087
5110
|
datasetXY,
|
5111
|
+
progressive,
|
5088
5112
|
xBand,
|
5089
5113
|
yLinear,
|
5090
5114
|
label_label,
|
@@ -5109,6 +5133,7 @@ const pivotColumn = [
|
|
5109
5133
|
color_color,
|
5110
5134
|
background_backgroundColor,
|
5111
5135
|
datasetXY,
|
5136
|
+
progressive,
|
5112
5137
|
xBand,
|
5113
5138
|
yLinear,
|
5114
5139
|
label_label,
|
@@ -5133,6 +5158,7 @@ const columnParallel = [
|
|
5133
5158
|
color_color,
|
5134
5159
|
background_backgroundColor,
|
5135
5160
|
datasetXY,
|
5161
|
+
progressive,
|
5136
5162
|
xBand,
|
5137
5163
|
yLinear,
|
5138
5164
|
label_label,
|
@@ -5156,6 +5182,7 @@ const pivotColumnParallel = [
|
|
5156
5182
|
color_color,
|
5157
5183
|
background_backgroundColor,
|
5158
5184
|
datasetXY,
|
5185
|
+
progressive,
|
5159
5186
|
xBand,
|
5160
5187
|
yLinear,
|
5161
5188
|
label_label,
|
@@ -5182,6 +5209,7 @@ const columnPercent = [
|
|
5182
5209
|
background_backgroundColor,
|
5183
5210
|
percent,
|
5184
5211
|
datasetXY,
|
5212
|
+
progressive,
|
5185
5213
|
xBand,
|
5186
5214
|
yLinear,
|
5187
5215
|
label_label,
|
@@ -5207,6 +5235,7 @@ const pivotColumnPercent = [
|
|
5207
5235
|
percent,
|
5208
5236
|
background_backgroundColor,
|
5209
5237
|
datasetXY,
|
5238
|
+
progressive,
|
5210
5239
|
xBand,
|
5211
5240
|
yLinear,
|
5212
5241
|
label_label,
|
@@ -5231,6 +5260,7 @@ const bar = [
|
|
5231
5260
|
color_color,
|
5232
5261
|
background_backgroundColor,
|
5233
5262
|
datasetYX,
|
5263
|
+
progressive,
|
5234
5264
|
xLinear,
|
5235
5265
|
yBand,
|
5236
5266
|
label_label,
|
@@ -5254,6 +5284,7 @@ const pivotBar = [
|
|
5254
5284
|
color_color,
|
5255
5285
|
background_backgroundColor,
|
5256
5286
|
datasetYX,
|
5287
|
+
progressive,
|
5257
5288
|
xLinear,
|
5258
5289
|
yBand,
|
5259
5290
|
label_label,
|
@@ -5279,6 +5310,7 @@ const barParallel = [
|
|
5279
5310
|
color_color,
|
5280
5311
|
background_backgroundColor,
|
5281
5312
|
datasetYX,
|
5313
|
+
progressive,
|
5282
5314
|
xLinear,
|
5283
5315
|
yBand,
|
5284
5316
|
label_label,
|
@@ -5327,6 +5359,7 @@ const barPercent = [
|
|
5327
5359
|
background_backgroundColor,
|
5328
5360
|
percent,
|
5329
5361
|
datasetYX,
|
5362
|
+
progressive,
|
5330
5363
|
xLinear,
|
5331
5364
|
yBand,
|
5332
5365
|
label_label,
|
@@ -5375,6 +5408,7 @@ const area_area = [
|
|
5375
5408
|
color_color,
|
5376
5409
|
background_backgroundColor,
|
5377
5410
|
datasetXY,
|
5411
|
+
progressive,
|
5378
5412
|
xBand,
|
5379
5413
|
yLinear,
|
5380
5414
|
label_label,
|
@@ -5401,6 +5435,7 @@ const pivotArea = [
|
|
5401
5435
|
background_backgroundColor,
|
5402
5436
|
stackInverse,
|
5403
5437
|
datasetXY,
|
5438
|
+
progressive,
|
5404
5439
|
xBand,
|
5405
5440
|
yLinear,
|
5406
5441
|
label_label,
|
@@ -5429,6 +5464,7 @@ const areaPercent = [
|
|
5429
5464
|
background_backgroundColor,
|
5430
5465
|
percent,
|
5431
5466
|
datasetXY,
|
5467
|
+
progressive,
|
5432
5468
|
xBand,
|
5433
5469
|
yLinear,
|
5434
5470
|
label_label,
|
@@ -5455,6 +5491,7 @@ const pivotAreaPercent = [
|
|
5455
5491
|
background_backgroundColor,
|
5456
5492
|
percent,
|
5457
5493
|
datasetXY,
|
5494
|
+
progressive,
|
5458
5495
|
xBand,
|
5459
5496
|
yLinear,
|
5460
5497
|
label_label,
|
@@ -5491,6 +5528,7 @@ const areaRange = [
|
|
5491
5528
|
pointStateDimensionHover
|
5492
5529
|
]),
|
5493
5530
|
datasetXY,
|
5531
|
+
progressive,
|
5494
5532
|
background_backgroundColor,
|
5495
5533
|
xBand,
|
5496
5534
|
yLinear,
|
@@ -5523,6 +5561,7 @@ const pivotAreaRange = [
|
|
5523
5561
|
]),
|
5524
5562
|
background_backgroundColor,
|
5525
5563
|
datasetXY,
|
5564
|
+
progressive,
|
5526
5565
|
xBand,
|
5527
5566
|
yLinear,
|
5528
5567
|
label_label,
|
@@ -5543,6 +5582,7 @@ const scatter = [
|
|
5543
5582
|
color_color,
|
5544
5583
|
background_backgroundColor,
|
5545
5584
|
datasetXY,
|
5585
|
+
progressive,
|
5546
5586
|
xLinear,
|
5547
5587
|
yLinear,
|
5548
5588
|
label_label,
|
@@ -5567,6 +5607,7 @@ const pivotScatter = [
|
|
5567
5607
|
color_color,
|
5568
5608
|
background_backgroundColor,
|
5569
5609
|
datasetXY,
|
5610
|
+
progressive,
|
5570
5611
|
xLinear,
|
5571
5612
|
yLinear,
|
5572
5613
|
label_label,
|
@@ -5592,6 +5633,7 @@ const pie = [
|
|
5592
5633
|
color_color,
|
5593
5634
|
background_backgroundColor,
|
5594
5635
|
datasetXY,
|
5636
|
+
progressive,
|
5595
5637
|
label_label,
|
5596
5638
|
tooltip_tooltip,
|
5597
5639
|
discreteLegend,
|
@@ -5610,6 +5652,7 @@ const pivotPie = [
|
|
5610
5652
|
color_color,
|
5611
5653
|
background_backgroundColor,
|
5612
5654
|
datasetXY,
|
5655
|
+
progressive,
|
5613
5656
|
label_label,
|
5614
5657
|
tooltip_tooltip,
|
5615
5658
|
annotationPoint_annotationPoint,
|
@@ -5629,6 +5672,7 @@ const donut = [
|
|
5629
5672
|
color_color,
|
5630
5673
|
background_backgroundColor,
|
5631
5674
|
datasetXY,
|
5675
|
+
progressive,
|
5632
5676
|
label_label,
|
5633
5677
|
tooltip_tooltip,
|
5634
5678
|
discreteLegend,
|
@@ -5647,6 +5691,7 @@ const pivotDonut = [
|
|
5647
5691
|
color_color,
|
5648
5692
|
background_backgroundColor,
|
5649
5693
|
datasetXY,
|
5694
|
+
progressive,
|
5650
5695
|
label_label,
|
5651
5696
|
tooltip_tooltip,
|
5652
5697
|
annotationPoint_annotationPoint,
|
@@ -5668,6 +5713,7 @@ const rose = [
|
|
5668
5713
|
color_color,
|
5669
5714
|
background_backgroundColor,
|
5670
5715
|
datasetXY,
|
5716
|
+
progressive,
|
5671
5717
|
radiusAxis,
|
5672
5718
|
angleAxis,
|
5673
5719
|
label_label,
|
@@ -5687,6 +5733,7 @@ const pivotRose = [
|
|
5687
5733
|
color_color,
|
5688
5734
|
background_backgroundColor,
|
5689
5735
|
datasetXY,
|
5736
|
+
progressive,
|
5690
5737
|
radiusAxis,
|
5691
5738
|
angleAxis,
|
5692
5739
|
label_label,
|
@@ -5706,6 +5753,7 @@ const roseParallel = [
|
|
5706
5753
|
color_color,
|
5707
5754
|
background_backgroundColor,
|
5708
5755
|
datasetXY,
|
5756
|
+
progressive,
|
5709
5757
|
radiusAxis,
|
5710
5758
|
angleAxis,
|
5711
5759
|
label_label,
|
@@ -5728,6 +5776,7 @@ const pivotRoseParallel = [
|
|
5728
5776
|
color_color,
|
5729
5777
|
background_backgroundColor,
|
5730
5778
|
datasetXY,
|
5779
|
+
progressive,
|
5731
5780
|
radiusAxis,
|
5732
5781
|
angleAxis,
|
5733
5782
|
label_label,
|
@@ -5750,6 +5799,7 @@ const radar = [
|
|
5750
5799
|
color_color,
|
5751
5800
|
background_backgroundColor,
|
5752
5801
|
datasetXY,
|
5802
|
+
progressive,
|
5753
5803
|
radarAngleAxis,
|
5754
5804
|
radarRadiusAxis,
|
5755
5805
|
label_label,
|
@@ -5771,6 +5821,7 @@ const pivotRadar = [
|
|
5771
5821
|
color_color,
|
5772
5822
|
background_backgroundColor,
|
5773
5823
|
datasetXY,
|
5824
|
+
progressive,
|
5774
5825
|
radarAngleAxis,
|
5775
5826
|
radarRadiusAxis,
|
5776
5827
|
label_label,
|
@@ -6087,23 +6138,20 @@ const pivotIndicators_pivotIndicators = (spec, context)=>{
|
|
6087
6138
|
}))
|
6088
6139
|
};
|
6089
6140
|
};
|
6090
|
-
const external_d3_color_namespaceObject = require("d3-color");
|
6091
6141
|
const bodyStyle = (spec, context)=>{
|
6092
6142
|
const result = {
|
6093
6143
|
...spec
|
6094
6144
|
};
|
6095
6145
|
const { advancedVSeed } = context;
|
6096
6146
|
const { customTheme, chartType } = advancedVSeed;
|
6097
|
-
const
|
6098
|
-
if (!result.theme || !
|
6099
|
-
const borderColor =
|
6100
|
-
const backgroundColor =
|
6101
|
-
const fontColor =
|
6102
|
-
const fontSize =
|
6103
|
-
const hoverCellBgColor =
|
6104
|
-
const hoverInlineColor =
|
6105
|
-
opacity: 0.2
|
6106
|
-
}).toString();
|
6147
|
+
const themeConfig = customTheme?.config?.[chartType];
|
6148
|
+
if (!result.theme || !themeConfig) return result;
|
6149
|
+
const borderColor = themeConfig.borderColor || 'rgb(224, 224, 224)';
|
6150
|
+
const backgroundColor = themeConfig.bodyBackgroundColor || '#fff';
|
6151
|
+
const fontColor = themeConfig.bodyFontColor || '#1B1F23';
|
6152
|
+
const fontSize = themeConfig.bodyFontSize || 12;
|
6153
|
+
const hoverCellBgColor = themeConfig.hoverBodyBackgroundColor || '#bedaff';
|
6154
|
+
const hoverInlineColor = themeConfig.hoverBodyInlineBackgroundColor || '#bedaff';
|
6107
6155
|
result.theme.bodyStyle = {
|
6108
6156
|
borderColor: borderColor,
|
6109
6157
|
borderLineWidth: 1,
|
@@ -6142,7 +6190,7 @@ const headerStyle = (spec, context)=>{
|
|
6142
6190
|
const fontColor = themConfig.headerFontColor || '#1B1F23';
|
6143
6191
|
const fontSize = themConfig.headerFontSize || 12;
|
6144
6192
|
const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
|
6145
|
-
const hoverInlineColor = themConfig.
|
6193
|
+
const hoverInlineColor = themConfig.hoverHeaderInlineBackgroundColor || '#bedaff';
|
6146
6194
|
result.theme.headerStyle = {
|
6147
6195
|
borderColor: borderColor,
|
6148
6196
|
borderLineWidth: 1,
|
@@ -6154,9 +6202,7 @@ const headerStyle = (spec, context)=>{
|
|
6154
6202
|
],
|
6155
6203
|
textAlign: 'center',
|
6156
6204
|
hover: {
|
6157
|
-
cellBgColor:
|
6158
|
-
opacity: 1
|
6159
|
-
}).brighter(0.5).toString(),
|
6205
|
+
cellBgColor: hoverCellBgColor,
|
6160
6206
|
inlineRowBgColor: hoverInlineColor,
|
6161
6207
|
inlineColumnBgColor: hoverInlineColor
|
6162
6208
|
},
|
@@ -6192,7 +6238,7 @@ const rowHeaderStyle = (spec, context)=>{
|
|
6192
6238
|
const fontColor = themConfig.headerFontColor || '#1B1F23';
|
6193
6239
|
const fontSize = themConfig.headerFontSize || 12;
|
6194
6240
|
const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
|
6195
|
-
const hoverInlineColor = themConfig.
|
6241
|
+
const hoverInlineColor = themConfig.hoverBodyInlineBackgroundColor || '#bedaff';
|
6196
6242
|
result.theme.rowHeaderStyle = {
|
6197
6243
|
borderColor: borderColor,
|
6198
6244
|
borderLineWidth: 1,
|
@@ -6204,9 +6250,7 @@ const rowHeaderStyle = (spec, context)=>{
|
|
6204
6250
|
],
|
6205
6251
|
textAlign: 'left',
|
6206
6252
|
hover: {
|
6207
|
-
cellBgColor:
|
6208
|
-
opacity: 1
|
6209
|
-
}).brighter(0.5).toString(),
|
6253
|
+
cellBgColor: hoverCellBgColor,
|
6210
6254
|
inlineRowBgColor: hoverInlineColor,
|
6211
6255
|
inlineColumnBgColor: hoverInlineColor
|
6212
6256
|
},
|
@@ -6241,8 +6285,8 @@ const cornerHeaderStyle = (spec, context)=>{
|
|
6241
6285
|
const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
|
6242
6286
|
const fontColor = themConfig.headerFontColor || '#1B1F23';
|
6243
6287
|
const fontSize = themConfig.headerFontSize || 12;
|
6244
|
-
const
|
6245
|
-
const
|
6288
|
+
const hoverInlineColor = themConfig.hoverHeaderInlineBackgroundColor;
|
6289
|
+
const hoverCellColor = themConfig.hoverHeaderBackgroundColor;
|
6246
6290
|
result.theme.cornerHeaderStyle = {
|
6247
6291
|
borderColor: [
|
6248
6292
|
borderColor,
|
@@ -6257,9 +6301,7 @@ const cornerHeaderStyle = (spec, context)=>{
|
|
6257
6301
|
],
|
6258
6302
|
textAlign: 'left',
|
6259
6303
|
hover: {
|
6260
|
-
cellBgColor:
|
6261
|
-
opacity: 1
|
6262
|
-
}).brighter(0.5).toString(),
|
6304
|
+
cellBgColor: hoverCellColor,
|
6263
6305
|
inlineRowBgColor: hoverInlineColor,
|
6264
6306
|
inlineColumnBgColor: hoverInlineColor
|
6265
6307
|
},
|
@@ -6307,12 +6349,11 @@ const selectionStyle = (spec, context)=>{
|
|
6307
6349
|
const themConfig = customTheme?.config?.[chartType];
|
6308
6350
|
if (!result.theme || !themConfig) return result;
|
6309
6351
|
const borderColor = themConfig.selectedBorderColor || 'rgb(224, 224, 224)';
|
6352
|
+
const backgroundColor = themConfig.selectedBackgroundColor || 'rgb(224, 224, 224, 0.5)';
|
6310
6353
|
result.theme.selectionStyle = {
|
6311
6354
|
cellBorderColor: borderColor,
|
6312
6355
|
cellBorderLineWidth: 2,
|
6313
|
-
cellBgColor:
|
6314
|
-
opacity: 0.15
|
6315
|
-
}).toString()
|
6356
|
+
cellBgColor: backgroundColor
|
6316
6357
|
};
|
6317
6358
|
return result;
|
6318
6359
|
};
|
@@ -6338,6 +6379,7 @@ const pivotTableSpecPipeline = [
|
|
6338
6379
|
selectionStyle
|
6339
6380
|
];
|
6340
6381
|
const buildAdvanced = (builder)=>{
|
6382
|
+
const start = 'undefined' != typeof performance ? performance.now() : Date.now();
|
6341
6383
|
const { chartType } = builder.vseed;
|
6342
6384
|
if (!chartType) throw new Error('chartType is nil in buildAdvanced');
|
6343
6385
|
const pipeline = builder.getAdvancedPipeline(chartType);
|
@@ -6351,9 +6393,13 @@ const buildAdvanced = (builder)=>{
|
|
6351
6393
|
} catch (e) {
|
6352
6394
|
console.error(e);
|
6353
6395
|
throw new Error("buildAdvanced error, see error info in console");
|
6396
|
+
} finally{
|
6397
|
+
const end = 'undefined' != typeof performance ? performance.now() : Date.now();
|
6398
|
+
builder.performance['buildAdvanced'] = `${(end - start).toFixed(4)}ms`;
|
6354
6399
|
}
|
6355
6400
|
};
|
6356
6401
|
const buildSpec = (builder, advancedVSeed)=>{
|
6402
|
+
const start = 'undefined' != typeof performance ? performance.now() : Date.now();
|
6357
6403
|
const { chartType } = builder.vseed;
|
6358
6404
|
if (!chartType) throw new Error('chartType is nil in buildSpec');
|
6359
6405
|
const pipeline = builder.getSpecPipeline(chartType);
|
@@ -6367,6 +6413,9 @@ const buildSpec = (builder, advancedVSeed)=>{
|
|
6367
6413
|
} catch (e) {
|
6368
6414
|
console.error(e);
|
6369
6415
|
throw new Error("buildSpec error, see error info in console");
|
6416
|
+
} finally{
|
6417
|
+
const end = 'undefined' != typeof performance ? performance.now() : Date.now();
|
6418
|
+
builder.performance['buildSpec'] = `${(end - start).toFixed(4)}ms`;
|
6370
6419
|
}
|
6371
6420
|
};
|
6372
6421
|
const build = (builder)=>{
|
@@ -6402,6 +6451,7 @@ class Builder {
|
|
6402
6451
|
_vseed;
|
6403
6452
|
_advancedVSeed = null;
|
6404
6453
|
_spec = null;
|
6454
|
+
_performance = {};
|
6405
6455
|
constructor(vseed){
|
6406
6456
|
this._vseed = vseed;
|
6407
6457
|
this._vseed.locale = vseed.locale || intl.getLocale();
|
@@ -6443,6 +6493,12 @@ class Builder {
|
|
6443
6493
|
set spec(value) {
|
6444
6494
|
this._spec = value;
|
6445
6495
|
}
|
6496
|
+
get performance() {
|
6497
|
+
return this._performance;
|
6498
|
+
}
|
6499
|
+
set performance(value) {
|
6500
|
+
this._performance = value;
|
6501
|
+
}
|
6446
6502
|
static _advancedPipelineMap = {};
|
6447
6503
|
static _specPipelineMap = {};
|
6448
6504
|
static _customAdvancedPipe = {};
|
@@ -6677,8 +6733,11 @@ const lightTheme = ()=>{
|
|
6677
6733
|
headerFontColor: '#21252c',
|
6678
6734
|
headerBackgroundColor: '#f6f7f9',
|
6679
6735
|
hoverBodyBackgroundColor: '#bedaff',
|
6680
|
-
|
6681
|
-
|
6736
|
+
hoverBodyInlineBackgroundColor: '#bedaff33',
|
6737
|
+
hoverHeaderBackgroundColor: '#D9DDE4',
|
6738
|
+
hoverHeaderInlineBackgroundColor: '#D9DDE455',
|
6739
|
+
selectedBorderColor: '#4080ffee',
|
6740
|
+
selectedBackgroundColor: '#4080ff10'
|
6682
6741
|
};
|
6683
6742
|
return {
|
6684
6743
|
config: {
|
@@ -6996,8 +7055,11 @@ const darkTheme = ()=>{
|
|
6996
7055
|
headerFontColor: '#fdfdfd',
|
6997
7056
|
headerBackgroundColor: '#36393e',
|
6998
7057
|
hoverBodyBackgroundColor: '#4284ff66',
|
6999
|
-
|
7000
|
-
|
7058
|
+
hoverBodyInlineBackgroundColor: '#4284ff10',
|
7059
|
+
hoverHeaderBackgroundColor: '#6f7984cc',
|
7060
|
+
hoverHeaderInlineBackgroundColor: '#4b4f54',
|
7061
|
+
selectedBorderColor: '#3073F2',
|
7062
|
+
selectedBackgroundColor: '#3073F210'
|
7001
7063
|
};
|
7002
7064
|
return {
|
7003
7065
|
config: {
|
@@ -7519,11 +7581,14 @@ const zTableConfig = external_zod_namespaceObject.z.object({
|
|
7519
7581
|
bodyFontColor: external_zod_namespaceObject.z.string().optional(),
|
7520
7582
|
bodyBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
7521
7583
|
hoverBodyBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
7584
|
+
hoverBodyInlineBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
7522
7585
|
headerFontSize: external_zod_namespaceObject.z.number().optional(),
|
7523
7586
|
headerFontColor: external_zod_namespaceObject.z.string().optional(),
|
7524
7587
|
headerBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
7525
7588
|
hoverHeaderBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
7526
|
-
|
7589
|
+
hoverHeaderInlineBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
7590
|
+
selectedBorderColor: external_zod_namespaceObject.z.string().optional(),
|
7591
|
+
selectedBackgroundColor: external_zod_namespaceObject.z.string().optional()
|
7527
7592
|
});
|
7528
7593
|
const zPivotTableConfig = zTableConfig;
|
7529
7594
|
const zLineConfig = external_zod_namespaceObject.z.object({
|
@@ -8044,8 +8109,8 @@ const zLine = external_zod_namespaceObject.z.object({
|
|
8044
8109
|
sortAxis: zSortAxis.optional(),
|
8045
8110
|
sortLegend: zSortLegend.optional(),
|
8046
8111
|
theme: zTheme.optional(),
|
8047
|
-
pointStyle: zPointStyle.optional(),
|
8048
|
-
lineStyle: zLineStyle.optional(),
|
8112
|
+
pointStyle: external_zod_namespaceObject.z.array(zPointStyle).or(zPointStyle).optional(),
|
8113
|
+
lineStyle: external_zod_namespaceObject.z.array(zLineStyle).or(zLineStyle).optional(),
|
8049
8114
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8050
8115
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8051
8116
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8067,7 +8132,7 @@ const zColumn = external_zod_namespaceObject.z.object({
|
|
8067
8132
|
crosshairRect: zCrosshairRect.optional(),
|
8068
8133
|
stackCornerRadius: zStackCornerRadius.optional(),
|
8069
8134
|
theme: zTheme.optional(),
|
8070
|
-
barStyle: zBarStyle.optional(),
|
8135
|
+
barStyle: external_zod_namespaceObject.z.array(zBarStyle).or(zBarStyle).optional(),
|
8071
8136
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8072
8137
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8073
8138
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8089,7 +8154,7 @@ const zColumnParallel = external_zod_namespaceObject.z.object({
|
|
8089
8154
|
crosshairRect: zCrosshairRect.optional(),
|
8090
8155
|
stackCornerRadius: zStackCornerRadius.optional(),
|
8091
8156
|
theme: zTheme.optional(),
|
8092
|
-
barStyle: zBarStyle.optional(),
|
8157
|
+
barStyle: external_zod_namespaceObject.z.array(zBarStyle).or(zBarStyle).optional(),
|
8093
8158
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8094
8159
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8095
8160
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8111,7 +8176,7 @@ const zColumnPercent = external_zod_namespaceObject.z.object({
|
|
8111
8176
|
crosshairRect: zCrosshairRect.optional(),
|
8112
8177
|
stackCornerRadius: zStackCornerRadius.optional(),
|
8113
8178
|
theme: zTheme.optional(),
|
8114
|
-
barStyle: zBarStyle.optional(),
|
8179
|
+
barStyle: external_zod_namespaceObject.z.array(zBarStyle).or(zBarStyle).optional(),
|
8115
8180
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8116
8181
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8117
8182
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8133,7 +8198,7 @@ const zBar = external_zod_namespaceObject.z.object({
|
|
8133
8198
|
crosshairRect: zCrosshairRect.optional(),
|
8134
8199
|
stackCornerRadius: zStackCornerRadius.optional(),
|
8135
8200
|
theme: zTheme.optional(),
|
8136
|
-
barStyle: zBarStyle.optional(),
|
8201
|
+
barStyle: external_zod_namespaceObject.z.array(zBarStyle).or(zBarStyle).optional(),
|
8137
8202
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8138
8203
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8139
8204
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8155,7 +8220,7 @@ const zBarParallel = external_zod_namespaceObject.z.object({
|
|
8155
8220
|
crosshairRect: zCrosshairRect.optional(),
|
8156
8221
|
stackCornerRadius: zStackCornerRadius.optional(),
|
8157
8222
|
theme: zTheme.optional(),
|
8158
|
-
barStyle: zBarStyle.optional(),
|
8223
|
+
barStyle: external_zod_namespaceObject.z.array(zBarStyle).or(zBarStyle).optional(),
|
8159
8224
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8160
8225
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8161
8226
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8177,7 +8242,7 @@ const zBarPercent = external_zod_namespaceObject.z.object({
|
|
8177
8242
|
crosshairRect: zCrosshairRect.optional(),
|
8178
8243
|
stackCornerRadius: zStackCornerRadius.optional(),
|
8179
8244
|
theme: zTheme.optional(),
|
8180
|
-
barStyle: zBarStyle.optional(),
|
8245
|
+
barStyle: external_zod_namespaceObject.z.array(zBarStyle).or(zBarStyle).optional(),
|
8181
8246
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8182
8247
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8183
8248
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8198,9 +8263,9 @@ const zArea = external_zod_namespaceObject.z.object({
|
|
8198
8263
|
yAxis: zYLinearAxis.optional(),
|
8199
8264
|
crosshairLine: zCrosshairLine.optional(),
|
8200
8265
|
theme: zTheme.optional(),
|
8201
|
-
pointStyle: zPointStyle.optional(),
|
8202
|
-
lineStyle: zLineStyle.optional(),
|
8203
|
-
areaStyle: zAreaStyle.optional(),
|
8266
|
+
pointStyle: external_zod_namespaceObject.z.array(zPointStyle).or(zPointStyle).optional(),
|
8267
|
+
lineStyle: external_zod_namespaceObject.z.array(zLineStyle).or(zLineStyle).optional(),
|
8268
|
+
areaStyle: external_zod_namespaceObject.z.array(zAreaStyle).or(zAreaStyle).optional(),
|
8204
8269
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8205
8270
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8206
8271
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8221,9 +8286,9 @@ const zAreaPercent = external_zod_namespaceObject.z.object({
|
|
8221
8286
|
yAxis: zYLinearAxis.optional(),
|
8222
8287
|
crosshairLine: zCrosshairLine.optional(),
|
8223
8288
|
theme: zTheme.optional(),
|
8224
|
-
pointStyle: zPointStyle.optional(),
|
8225
|
-
lineStyle: zLineStyle.optional(),
|
8226
|
-
areaStyle: zAreaStyle.optional(),
|
8289
|
+
pointStyle: external_zod_namespaceObject.z.array(zPointStyle).or(zPointStyle).optional(),
|
8290
|
+
lineStyle: external_zod_namespaceObject.z.array(zLineStyle).or(zLineStyle).optional(),
|
8291
|
+
areaStyle: external_zod_namespaceObject.z.array(zAreaStyle).or(zAreaStyle).optional(),
|
8227
8292
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8228
8293
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8229
8294
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8241,9 +8306,9 @@ const zAreaRange = external_zod_namespaceObject.z.object({
|
|
8241
8306
|
yAxis: zYLinearAxis.optional(),
|
8242
8307
|
crosshairLine: zCrosshairLine.optional(),
|
8243
8308
|
theme: zTheme.optional(),
|
8244
|
-
pointStyle: zPointStyle.optional(),
|
8245
|
-
lineStyle: zLineStyle.optional(),
|
8246
|
-
areaStyle: zAreaStyle.optional(),
|
8309
|
+
pointStyle: external_zod_namespaceObject.z.array(zPointStyle).or(zPointStyle).optional(),
|
8310
|
+
lineStyle: external_zod_namespaceObject.z.array(zLineStyle).or(zLineStyle).optional(),
|
8311
|
+
areaStyle: external_zod_namespaceObject.z.array(zAreaStyle).or(zAreaStyle).optional(),
|
8247
8312
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8248
8313
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8249
8314
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
@@ -8264,7 +8329,7 @@ const zScatter = external_zod_namespaceObject.z.object({
|
|
8264
8329
|
yAxis: zYLinearAxis.optional(),
|
8265
8330
|
crosshairLine: zCrosshairLine.optional(),
|
8266
8331
|
theme: zTheme.optional(),
|
8267
|
-
pointStyle: zPointStyle.optional(),
|
8332
|
+
pointStyle: external_zod_namespaceObject.z.array(zPointStyle).or(zPointStyle).optional(),
|
8268
8333
|
annotationPoint: external_zod_namespaceObject.z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
8269
8334
|
annotationVerticalLine: external_zod_namespaceObject.z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
8270
8335
|
annotationHorizontalLine: external_zod_namespaceObject.z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|