@visactor/vseed 0.1.26 → 0.1.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.
Files changed (102) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/builder.d.ts +124 -16
  4. package/dist/esm/dataSelector/selector.js +2 -4
  5. package/dist/esm/dataSelector/selector.js.map +1 -1
  6. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js +0 -1
  7. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js.map +1 -1
  8. package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js +6 -4
  9. package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js.map +1 -1
  10. package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js +6 -4
  11. package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js.map +1 -1
  12. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.d.ts +0 -2
  13. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js +1 -19
  14. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
  15. package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js +6 -4
  16. package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js.map +1 -1
  17. package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +1 -1
  18. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +11 -6
  19. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  20. package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js +2 -2
  21. package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js.map +1 -1
  22. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js +1 -1
  23. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js.map +1 -1
  24. package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js +1 -1
  25. package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js.map +1 -1
  26. package/dist/esm/theme/common/axes.d.ts +5 -0
  27. package/dist/esm/theme/common/axes.js +156 -0
  28. package/dist/esm/theme/common/axes.js.map +1 -0
  29. package/dist/esm/theme/common/color.d.ts +12 -0
  30. package/dist/esm/theme/common/color.js +43 -0
  31. package/dist/esm/theme/common/color.js.map +1 -0
  32. package/dist/esm/theme/common/crosshair.d.ts +28 -0
  33. package/dist/esm/theme/common/crosshair.js +31 -0
  34. package/dist/esm/theme/common/crosshair.js.map +1 -0
  35. package/dist/esm/theme/common/index.d.ts +7 -0
  36. package/dist/esm/theme/common/index.js +7 -0
  37. package/dist/esm/theme/common/label.d.ts +8 -0
  38. package/dist/esm/theme/common/label.js +11 -0
  39. package/dist/esm/theme/common/label.js.map +1 -0
  40. package/dist/esm/theme/common/legend.d.ts +2 -0
  41. package/dist/esm/theme/common/legend.js +13 -0
  42. package/dist/esm/theme/common/legend.js.map +1 -0
  43. package/dist/esm/theme/common/table.d.ts +3 -0
  44. package/dist/esm/theme/common/table.js +34 -0
  45. package/dist/esm/theme/common/table.js.map +1 -0
  46. package/dist/esm/theme/common/tooltip.d.ts +2 -0
  47. package/dist/esm/theme/common/tooltip.js +6 -0
  48. package/dist/esm/theme/common/tooltip.js.map +1 -0
  49. package/dist/esm/theme/{dark.d.ts → dark/dark.d.ts} +1 -1
  50. package/dist/esm/theme/{dark.js → dark/dark.js} +30 -153
  51. package/dist/esm/theme/dark/dark.js.map +1 -0
  52. package/dist/esm/theme/dark/index.d.ts +1 -0
  53. package/dist/esm/theme/dark/index.js +2 -0
  54. package/dist/esm/theme/index.js +2 -2
  55. package/dist/esm/theme/light/index.d.ts +1 -0
  56. package/dist/esm/theme/light/index.js +2 -0
  57. package/dist/esm/theme/{light.d.ts → light/light.d.ts} +1 -1
  58. package/dist/esm/theme/{light.js → light/light.js} +30 -155
  59. package/dist/esm/theme/light/light.js.map +1 -0
  60. package/dist/esm/types/advancedVSeed.d.ts +44 -8
  61. package/dist/esm/types/chartType/area/zArea.d.ts +9 -8
  62. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +9 -8
  63. package/dist/esm/types/chartType/bar/zBar.d.ts +9 -8
  64. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +9 -8
  65. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +9 -8
  66. package/dist/esm/types/chartType/column/zColumn.d.ts +9 -8
  67. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +9 -8
  68. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +9 -8
  69. package/dist/esm/types/chartType/donut/zDonut.d.ts +1 -0
  70. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +9 -8
  71. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +1 -0
  72. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +1 -0
  73. package/dist/esm/types/chartType/line/zLine.d.ts +9 -8
  74. package/dist/esm/types/chartType/pie/zPie.d.ts +1 -0
  75. package/dist/esm/types/chartType/radar/zRadar.d.ts +1 -0
  76. package/dist/esm/types/chartType/rose/zRose.d.ts +1 -0
  77. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +1 -0
  78. package/dist/esm/types/chartType/scatter/zScatter.d.ts +9 -8
  79. package/dist/esm/types/dataSelector/selector.d.ts +2 -2
  80. package/dist/esm/types/dataSelector/selector.js.map +1 -1
  81. package/dist/esm/types/properties/annotation/annotation.d.ts +8 -8
  82. package/dist/esm/types/properties/annotation/annotationArea.d.ts +1 -1
  83. package/dist/esm/types/properties/annotation/annotationPoint.d.ts +1 -1
  84. package/dist/esm/types/properties/annotation/zAnnotationArea.d.ts +2 -2
  85. package/dist/esm/types/properties/annotation/zAnnotationArea.js +1 -1
  86. package/dist/esm/types/properties/annotation/zAnnotationArea.js.map +1 -1
  87. package/dist/esm/types/properties/annotation/zAnnotationPoint.d.ts +2 -2
  88. package/dist/esm/types/properties/annotation/zAnnotationPoint.js +1 -1
  89. package/dist/esm/types/properties/annotation/zAnnotationPoint.js.map +1 -1
  90. package/dist/esm/types/properties/config/config.d.ts +36 -0
  91. package/dist/esm/types/properties/config/label/label.d.ts +8 -0
  92. package/dist/esm/types/properties/config/label/zLabel.d.ts +1 -0
  93. package/dist/esm/types/properties/config/label/zLabel.js +1 -0
  94. package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
  95. package/dist/esm/types/properties/config/label/zPieLabel.d.ts +1 -0
  96. package/dist/esm/types/properties/theme/customTheme.d.ts +36 -0
  97. package/dist/esm/types/zVseed.d.ts +106 -88
  98. package/dist/umd/index.js +309 -285
  99. package/dist/umd/index.js.map +1 -1
  100. package/package.json +1 -1
  101. package/dist/esm/theme/dark.js.map +0 -1
  102. package/dist/esm/theme/light.js.map +0 -1
package/dist/umd/index.js CHANGED
@@ -2162,7 +2162,6 @@
2162
2162
  return ordinalPipe(spec, context);
2163
2163
  };
2164
2164
  const isLinearColor = (advancedVSeed, vseed)=>{
2165
- console.log(vseed);
2166
2165
  const { encoding } = advancedVSeed;
2167
2166
  const measures = vseed.measures || advancedVSeed.measures;
2168
2167
  const measureIdList = findAllMeasures(measures).map((measure)=>measure.id);
@@ -3081,6 +3080,8 @@
3081
3080
  ];
3082
3081
  switch(op){
3083
3082
  case '=':
3083
+ if (String(datum[selector.field]) === String(selectorValueArr[0])) return true;
3084
+ break;
3084
3085
  case '==':
3085
3086
  if (datum[selector.field] === selectorValueArr[0]) return true;
3086
3087
  break;
@@ -3102,8 +3103,6 @@
3102
3103
  case 'between':
3103
3104
  if (Array.isArray(selector.value) && datum[selector.field] >= selectorValueArr[0] && datum[selector.field] <= selectorValueArr[1]) return true;
3104
3105
  break;
3105
- default:
3106
- break;
3107
3106
  }
3108
3107
  } else if (isDimensionSelector(selector)) {
3109
3108
  const op = selector.operator || selector.op;
@@ -3117,8 +3116,6 @@
3117
3116
  case 'not in':
3118
3117
  if (!selectorValueArr.includes(datum[selector.field])) return true;
3119
3118
  break;
3120
- default:
3121
- break;
3122
3119
  }
3123
3120
  } else if (isPartialDatumSelector(selector)) {
3124
3121
  if (Object.keys(selector).every((key)=>datum[key] === selector[key])) return true;
@@ -3354,7 +3351,7 @@
3354
3351
  const baseConfig = advancedVSeed.config[chartType];
3355
3352
  const foldInfo = datasetReshapeInfo[0].foldInfo;
3356
3353
  const { label } = baseConfig;
3357
- result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding, [
3354
+ result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.dimensions, advancedVSeed.measures, encoding, [
3358
3355
  foldInfo
3359
3356
  ]);
3360
3357
  return result;
@@ -3376,10 +3373,11 @@
3376
3373
  const percentValue = num / sum;
3377
3374
  return formatter(percentValue);
3378
3375
  };
3379
- const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedMeasures, encoding, foldInfoList)=>{
3380
- const { enable, wrap, showValue, showValuePercent, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
3381
- const labelDims = T((vseedDimensions || []).filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
3382
- const labelMeas = T((vseedMeasures || []).filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
3376
+ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedDimensions, advancedVSeedMeasures, encoding, foldInfoList)=>{
3377
+ const { enable, wrap, showValue, showValuePercent, showDimension, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
3378
+ const hasDimLabelEncoding = vseedDimensions.some((item)=>encoding.label?.includes(item.id));
3379
+ const labelDims = T(hasDimLabelEncoding ? vseedDimensions.filter((item)=>encoding.label?.includes(item.id)) : showDimension ? advancedVSeedDimensions.filter((d)=>d.id !== MeasureName) : [], (item)=>item.id);
3380
+ const labelMeas = T(vseedMeasures.filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
3383
3381
  const percentFormat = chunk_5S4PYKVY_t(numFormat, {
3384
3382
  type: 'percent'
3385
3383
  });
@@ -3388,7 +3386,10 @@
3388
3386
  visible: enable,
3389
3387
  formatMethod: (_, datum)=>{
3390
3388
  const result = [];
3391
- const dimLabels = labelDims.map((item)=>item.alias || item.id);
3389
+ const dimLabels = labelDims.map((item)=>{
3390
+ const id = item.id;
3391
+ return datum[id];
3392
+ });
3392
3393
  const meaLabels = labelMeas.map((item)=>generateMeasureValue(datum[item.id], item, autoFormat, numFormat));
3393
3394
  result.push(...dimLabels);
3394
3395
  foldInfoList.forEach((foldInfo)=>{
@@ -4175,7 +4176,7 @@
4175
4176
  indicators: indicators
4176
4177
  };
4177
4178
  };
4178
- const pivotIndicators_pivotIndicatorsAsRow = (spec)=>{
4179
+ const pivotIndicatorsAsRow = (spec)=>{
4179
4180
  const result = {
4180
4181
  ...spec
4181
4182
  };
@@ -4184,7 +4185,7 @@
4184
4185
  indicatorsAsCol: false
4185
4186
  };
4186
4187
  };
4187
- const pivotIndicators_pivotIndicatorsAsCol = (spec)=>{
4188
+ const pivotIndicatorsAsCol = (spec)=>{
4188
4189
  const result = {
4189
4190
  ...spec
4190
4191
  };
@@ -4466,7 +4467,7 @@
4466
4467
  const pivotLine = [
4467
4468
  initPivot,
4468
4469
  pivotGridStyle,
4469
- pivotIndicators_pivotIndicatorsAsRow,
4470
+ pivotIndicatorsAsRow,
4470
4471
  datasetPivot,
4471
4472
  pivotIndicators_pivotIndicators([
4472
4473
  initLine,
@@ -4920,7 +4921,7 @@
4920
4921
  const pivotColumn = [
4921
4922
  initPivot,
4922
4923
  pivotGridStyle,
4923
- pivotIndicators_pivotIndicatorsAsRow,
4924
+ pivotIndicatorsAsRow,
4924
4925
  datasetPivot,
4925
4926
  pivotIndicators_pivotIndicators([
4926
4927
  initColumn,
@@ -5032,12 +5033,13 @@
5032
5033
  const sameDimensionsMode = chunk_HGKLN5KY_k(encoding.x, encoding.color);
5033
5034
  result.type = 'bar';
5034
5035
  result.direction = 'vertical';
5035
- result.xField = sameDimensionsMode ? [
5036
+ result.xField = [
5036
5037
  unfoldInfo.encodingX
5037
- ] : [
5038
- unfoldInfo.encodingX,
5039
- unfoldInfo.encodingDetail
5040
5038
  ];
5039
+ if (!sameDimensionsMode) {
5040
+ result.xField.push(unfoldInfo.encodingDetail);
5041
+ if (encoding.detail?.[0] === MeasureName && encoding.y?.length === 1) result.xField.pop();
5042
+ }
5041
5043
  result.yField = foldInfo.measureValue;
5042
5044
  result.seriesField = unfoldInfo.encodingColorId;
5043
5045
  result.padding = 0;
@@ -5071,7 +5073,7 @@
5071
5073
  const pivotColumnParallel = [
5072
5074
  initPivot,
5073
5075
  pivotGridStyle,
5074
- pivotIndicators_pivotIndicatorsAsRow,
5076
+ pivotIndicatorsAsRow,
5075
5077
  datasetPivot,
5076
5078
  pivotIndicators_pivotIndicators([
5077
5079
  initColumnParallel,
@@ -5163,7 +5165,7 @@
5163
5165
  const pivotColumnPercent = [
5164
5166
  initPivot,
5165
5167
  pivotGridStyle,
5166
- pivotIndicators_pivotIndicatorsAsRow,
5168
+ pivotIndicatorsAsRow,
5167
5169
  datasetPivot,
5168
5170
  pivotIndicators_pivotIndicators([
5169
5171
  initColumn,
@@ -5601,7 +5603,7 @@
5601
5603
  const pivotBar = [
5602
5604
  initPivot,
5603
5605
  pivotGridStyle,
5604
- pivotIndicators_pivotIndicatorsAsCol,
5606
+ pivotIndicatorsAsCol,
5605
5607
  datasetPivot,
5606
5608
  pivotIndicators_pivotIndicators([
5607
5609
  initBar,
@@ -5673,12 +5675,13 @@
5673
5675
  const sameDimensionsMode = chunk_HGKLN5KY_k(encoding.y, encoding.color);
5674
5676
  result.type = 'bar';
5675
5677
  result.direction = 'horizontal';
5676
- result.yField = sameDimensionsMode ? [
5678
+ result.yField = [
5677
5679
  unfoldInfo.encodingY
5678
- ] : [
5679
- unfoldInfo.encodingY,
5680
- unfoldInfo.encodingDetail
5681
5680
  ];
5681
+ if (!sameDimensionsMode) {
5682
+ result.yField.push(unfoldInfo.encodingDetail);
5683
+ if (encoding.detail?.[0] === MeasureName && encoding.x?.length === 1) result.yField.pop();
5684
+ }
5682
5685
  result.xField = foldInfo.measureValue;
5683
5686
  result.seriesField = unfoldInfo.encodingColorId;
5684
5687
  result.padding = 0;
@@ -5712,7 +5715,7 @@
5712
5715
  const pivotBarParallel = [
5713
5716
  initPivot,
5714
5717
  pivotGridStyle,
5715
- pivotIndicators_pivotIndicatorsAsCol,
5718
+ pivotIndicatorsAsCol,
5716
5719
  datasetPivot,
5717
5720
  pivotIndicators_pivotIndicators([
5718
5721
  initBarParallel,
@@ -5795,7 +5798,7 @@
5795
5798
  const pivotBarPercent = [
5796
5799
  initPivot,
5797
5800
  pivotGridStyle,
5798
- pivotIndicators_pivotIndicatorsAsCol,
5801
+ pivotIndicatorsAsCol,
5799
5802
  datasetPivot,
5800
5803
  pivotIndicators_pivotIndicators([
5801
5804
  initBar,
@@ -5986,7 +5989,7 @@
5986
5989
  const pivotArea = [
5987
5990
  initPivot,
5988
5991
  pivotGridStyle,
5989
- pivotIndicators_pivotIndicatorsAsRow,
5992
+ pivotIndicatorsAsRow,
5990
5993
  datasetPivot,
5991
5994
  pivotIndicators_pivotIndicators([
5992
5995
  initArea,
@@ -6076,7 +6079,7 @@
6076
6079
  const pivotAreaPercent = [
6077
6080
  initPivot,
6078
6081
  pivotGridStyle,
6079
- pivotIndicators_pivotIndicatorsAsRow,
6082
+ pivotIndicatorsAsRow,
6080
6083
  datasetPivot,
6081
6084
  pivotIndicators_pivotIndicators([
6082
6085
  initArea,
@@ -6523,7 +6526,7 @@
6523
6526
  const baseConfig = advancedVSeed.config[chartType];
6524
6527
  const foldInfoList = datasetReshapeInfo[0].foldInfoList;
6525
6528
  const { label } = baseConfig;
6526
- result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding, foldInfoList);
6529
+ result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.dimensions, advancedVSeed.measures, encoding, foldInfoList);
6527
6530
  return result;
6528
6531
  };
6529
6532
  const tooltipScatter = (spec, context)=>{
@@ -6681,7 +6684,7 @@
6681
6684
  const pivotScatter = [
6682
6685
  initPivot,
6683
6686
  pivotGridStyle,
6684
- pivotIndicators_pivotIndicatorsAsRow,
6687
+ pivotIndicatorsAsRow,
6685
6688
  datasetPivot,
6686
6689
  pivotIndicators_pivotIndicators([
6687
6690
  initScatter,
@@ -7339,7 +7342,7 @@
7339
7342
  const { chartType } = advancedVSeed;
7340
7343
  const baseConfig = advancedVSeed.config[chartType];
7341
7344
  const foldInfoList = datasetReshapeInfo[0].foldInfoList;
7342
- result.label = buildLabel(baseConfig.label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding, [
7345
+ result.label = buildLabel(baseConfig.label, vseed.measures, vseed.dimensions, advancedVSeed.dimensions, advancedVSeed.measures, encoding, [
7343
7346
  foldInfoList[0]
7344
7347
  ]);
7345
7348
  result.label.zIndex = 1002;
@@ -7354,7 +7357,7 @@
7354
7357
  const { chartType } = advancedVSeed;
7355
7358
  const baseConfig = advancedVSeed.config[chartType];
7356
7359
  const foldInfoList = datasetReshapeInfo[0].foldInfoList;
7357
- result.label = buildLabel(baseConfig.label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding, [
7360
+ result.label = buildLabel(baseConfig.label, vseed.measures, vseed.dimensions, advancedVSeed.dimensions, advancedVSeed.measures, encoding, [
7358
7361
  foldInfoList[1]
7359
7362
  ]);
7360
7363
  result.label.zIndex = 1002;
@@ -7671,7 +7674,7 @@
7671
7674
  const pivotDualAxis = [
7672
7675
  initPivot,
7673
7676
  pivotGridStyle,
7674
- pivotIndicators_pivotIndicatorsAsRow,
7677
+ pivotIndicatorsAsRow,
7675
7678
  datasetPivot,
7676
7679
  pivotIndicators_pivotIndicators([
7677
7680
  series([
@@ -7882,7 +7885,7 @@
7882
7885
  const baseConfig = advancedVSeed.config[chartType];
7883
7886
  const foldInfo = datasetReshapeInfo[0].foldInfo;
7884
7887
  const { label } = baseConfig;
7885
- result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding, [
7888
+ result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.dimensions, advancedVSeed.measures, encoding, [
7886
7889
  foldInfo
7887
7890
  ]);
7888
7891
  if (label.labelLayout) result.label.layout = {
@@ -7912,7 +7915,7 @@
7912
7915
  const pivotPie = [
7913
7916
  initPivot,
7914
7917
  pivotGridStyle,
7915
- pivotIndicators_pivotIndicatorsAsRow,
7918
+ pivotIndicatorsAsRow,
7916
7919
  pivotHideIndicatorName,
7917
7920
  datasetPivot,
7918
7921
  pivotIndicators_pivotIndicators([
@@ -8006,7 +8009,7 @@
8006
8009
  const pivotDonut = [
8007
8010
  initPivot,
8008
8011
  pivotGridStyle,
8009
- pivotIndicators_pivotIndicatorsAsRow,
8012
+ pivotIndicatorsAsRow,
8010
8013
  pivotHideIndicatorName,
8011
8014
  datasetPivot,
8012
8015
  pivotIndicators_pivotIndicators([
@@ -8226,7 +8229,7 @@
8226
8229
  const pivotRose = [
8227
8230
  initPivot,
8228
8231
  pivotGridStyle,
8229
- pivotIndicators_pivotIndicatorsAsRow,
8232
+ pivotIndicatorsAsRow,
8230
8233
  pivotHideIndicatorName,
8231
8234
  datasetPivot,
8232
8235
  pivotIndicators_pivotIndicators([
@@ -8291,12 +8294,13 @@
8291
8294
  const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
8292
8295
  const sameDimensionsMode = chunk_HGKLN5KY_k(encoding.angle, encoding.color);
8293
8296
  result.type = 'rose';
8294
- result.angleField = sameDimensionsMode ? [
8297
+ result.angleField = [
8295
8298
  unfoldInfo.encodingAngle
8296
- ] : [
8297
- unfoldInfo.encodingAngle,
8298
- unfoldInfo.encodingDetail
8299
8299
  ];
8300
+ if (!sameDimensionsMode) {
8301
+ result.angleField.push(unfoldInfo.encodingDetail);
8302
+ if (encoding.detail?.[0] === MeasureName && encoding.radius?.length === 1) result.angleField.pop();
8303
+ }
8300
8304
  result.valueField = foldInfo.measureValue;
8301
8305
  result.seriesField = unfoldInfo.encodingColorId;
8302
8306
  result.padding = 0;
@@ -8345,7 +8349,7 @@
8345
8349
  const pivotRoseParallel = [
8346
8350
  initPivot,
8347
8351
  pivotGridStyle,
8348
- pivotIndicators_pivotIndicatorsAsRow,
8352
+ pivotIndicatorsAsRow,
8349
8353
  pivotHideIndicatorName,
8350
8354
  datasetPivot,
8351
8355
  pivotIndicators_pivotIndicators([
@@ -8562,7 +8566,7 @@
8562
8566
  const pivotRadar = [
8563
8567
  initPivot,
8564
8568
  pivotGridStyle,
8565
- pivotIndicators_pivotIndicatorsAsRow,
8569
+ pivotIndicatorsAsRow,
8566
8570
  pivotHideIndicatorName,
8567
8571
  datasetPivot,
8568
8572
  pivotIndicators_pivotIndicators([
@@ -8763,7 +8767,7 @@
8763
8767
  const pivotFunnel = [
8764
8768
  initPivot,
8765
8769
  pivotGridStyle,
8766
- pivotIndicators_pivotIndicatorsAsRow,
8770
+ pivotIndicatorsAsRow,
8767
8771
  pivotHideIndicatorName,
8768
8772
  datasetPivot,
8769
8773
  pivotIndicators_pivotIndicators([
@@ -9066,7 +9070,7 @@
9066
9070
  const pivotHeatmap = [
9067
9071
  initPivot,
9068
9072
  pivotGridStyle,
9069
- pivotIndicators_pivotIndicatorsAsRow,
9073
+ pivotIndicatorsAsRow,
9070
9074
  datasetPivot,
9071
9075
  pivotIndicators_pivotIndicators([
9072
9076
  initHeatmap,
@@ -9092,8 +9096,127 @@
9092
9096
  Builder._advancedPipelineMap.heatmap = heatmapAdvancedPipeline;
9093
9097
  Builder._specPipelineMap.heatmap = heatmapSpecPipeline;
9094
9098
  };
9095
- const lightTheme = ()=>{
9096
- const linearAxis = {
9099
+ const getDarkCrosshairLine = ()=>({
9100
+ visible: true,
9101
+ labelVisible: true,
9102
+ labelColor: '#4B4F54',
9103
+ labelBackgroundColor: '#ffffff',
9104
+ lineColor: '#E2E3E6'
9105
+ });
9106
+ const getDarkCrosshairRect = ()=>({
9107
+ visible: true,
9108
+ labelVisible: true,
9109
+ labelColor: '#4B4F54',
9110
+ labelBackgroundColor: '#ffffff',
9111
+ rectColor: '#E2E3E6'
9112
+ });
9113
+ const getLightCrosshairLine = ()=>({
9114
+ visible: true,
9115
+ labelVisible: true,
9116
+ labelColor: '#ffffff',
9117
+ labelBackgroundColor: '#364159',
9118
+ lineColor: '#3641594d'
9119
+ });
9120
+ const getLightCrosshairRect = ()=>({
9121
+ visible: true,
9122
+ labelVisible: true,
9123
+ labelColor: '#ffffff',
9124
+ labelBackgroundColor: '#364159',
9125
+ rectColor: '#3641594d'
9126
+ });
9127
+ const getLightColorScheme = ()=>[
9128
+ '#8D72F6',
9129
+ '#5766EC',
9130
+ '#66A3FE',
9131
+ '#51D5E6',
9132
+ '#4EC0B3',
9133
+ '#F9DF90',
9134
+ '#F9AD71',
9135
+ '#ED8888',
9136
+ '#E9A0C3',
9137
+ '#D77DD3'
9138
+ ];
9139
+ const getDarkColorScheme = ()=>[
9140
+ '#2E62F1',
9141
+ '#4DC36A',
9142
+ '#FF8406',
9143
+ '#FFCC00',
9144
+ '#4F44CF',
9145
+ '#5AC8FA',
9146
+ '#003A8C',
9147
+ '#B08AE2',
9148
+ '#FF6341',
9149
+ '#98DD62'
9150
+ ];
9151
+ const getLightLinearColorScheme = ()=>[
9152
+ '#C2CEFF',
9153
+ '#5766EC'
9154
+ ];
9155
+ const getDarkLinearColorScheme = ()=>[
9156
+ '#A0CEFF',
9157
+ '#2E62F1'
9158
+ ];
9159
+ const getLightColor = ()=>({
9160
+ linearColorScheme: getLightLinearColorScheme(),
9161
+ colorScheme: getLightColorScheme()
9162
+ });
9163
+ const getDarkColor = ()=>({
9164
+ linearColorScheme: getDarkLinearColorScheme(),
9165
+ colorScheme: getDarkColorScheme()
9166
+ });
9167
+ const getDefaultLabel = ()=>({
9168
+ enable: true,
9169
+ wrap: true,
9170
+ showValue: true,
9171
+ showValuePercent: false,
9172
+ labelColorSmartInvert: false,
9173
+ labelOverlap: true
9174
+ });
9175
+ const getDefaultLegend = ()=>({
9176
+ enable: true,
9177
+ border: true,
9178
+ maxSize: 1,
9179
+ shapeType: 'rectRound',
9180
+ position: 'rt',
9181
+ labelColor: '#646A73',
9182
+ labelFontSize: 12,
9183
+ labelFontWeight: 400
9184
+ });
9185
+ const getLightTableConfig = ()=>({
9186
+ borderColor: '#e3e5eb',
9187
+ bodyFontSize: 12,
9188
+ bodyFontColor: '#141414',
9189
+ bodyBackgroundColor: 'transparent',
9190
+ headerFontSize: 12,
9191
+ headerFontColor: '#21252c',
9192
+ headerBackgroundColor: '#f6f7f9',
9193
+ hoverBodyBackgroundColor: '#bedaff',
9194
+ hoverBodyInlineBackgroundColor: '#bedaff33',
9195
+ hoverHeaderBackgroundColor: '#D9DDE4',
9196
+ hoverHeaderInlineBackgroundColor: '#D9DDE455',
9197
+ selectedBorderColor: '#4080ff',
9198
+ selectedBackgroundColor: '#bedaff33',
9199
+ backgroundColor: 'transparent'
9200
+ });
9201
+ const getDarkTableConfig = ()=>({
9202
+ borderColor: '#4b4e53',
9203
+ bodyFontSize: 12,
9204
+ bodyFontColor: '#fdfdfd',
9205
+ bodyBackgroundColor: 'transparent',
9206
+ headerFontSize: 12,
9207
+ headerFontColor: '#fdfdfd',
9208
+ headerBackgroundColor: '#36393e',
9209
+ hoverBodyBackgroundColor: '#4284ff66',
9210
+ hoverBodyInlineBackgroundColor: '#4284ff10',
9211
+ hoverHeaderBackgroundColor: '#6f7984cc',
9212
+ hoverHeaderInlineBackgroundColor: '#4b4f54',
9213
+ selectedBorderColor: '#3073f2',
9214
+ selectedBackgroundColor: '#4284ff33'
9215
+ });
9216
+ const getDefaultTooltip = ()=>({
9217
+ enable: true
9218
+ });
9219
+ const getLightLinearAxis = ()=>({
9097
9220
  nice: true,
9098
9221
  zero: true,
9099
9222
  inverse: false,
@@ -9127,8 +9250,8 @@
9127
9250
  lineColor: '#3641594d',
9128
9251
  lineWidth: 1
9129
9252
  }
9130
- };
9131
- const bandAxis = {
9253
+ });
9254
+ const getLightBandAxis = ()=>({
9132
9255
  labelAutoHide: true,
9133
9256
  labelAutoHideGap: 4,
9134
9257
  labelAutoLimit: true,
@@ -9169,7 +9292,86 @@
9169
9292
  lineColor: '#3641594d',
9170
9293
  lineWidth: 1
9171
9294
  }
9172
- };
9295
+ });
9296
+ const getDarkLinearAxis = ()=>({
9297
+ nice: true,
9298
+ zero: true,
9299
+ label: {
9300
+ visible: true,
9301
+ labelAngle: 0,
9302
+ labelColor: '#E2E3E6',
9303
+ labelFontSize: 12,
9304
+ labelFontWeight: 400
9305
+ },
9306
+ title: {
9307
+ visible: false,
9308
+ titleText: '',
9309
+ titleColor: '#FDFDFD',
9310
+ titleFontSize: 12,
9311
+ titleFontWeight: 400
9312
+ },
9313
+ grid: {
9314
+ visible: true,
9315
+ gridColor: '#404349',
9316
+ gridWidth: 0.5
9317
+ },
9318
+ tick: {
9319
+ visible: false,
9320
+ tickInside: false,
9321
+ tickSize: 4,
9322
+ tickColor: '#4B4F54'
9323
+ },
9324
+ line: {
9325
+ visible: false,
9326
+ lineColor: '#4B4F54',
9327
+ lineWidth: 1
9328
+ }
9329
+ });
9330
+ const getDarkBandAxis = ()=>({
9331
+ labelAutoHide: true,
9332
+ labelAutoHideGap: 4,
9333
+ labelAutoLimit: true,
9334
+ labelAutoLimitLength: 80,
9335
+ labelAutoRotate: false,
9336
+ labelAutoRotateAngleRange: [
9337
+ 0,
9338
+ -45,
9339
+ -90
9340
+ ],
9341
+ label: {
9342
+ visible: true,
9343
+ labelAngle: 0,
9344
+ labelColor: '#E2E3E6',
9345
+ labelFontSize: 12,
9346
+ labelFontWeight: 400
9347
+ },
9348
+ title: {
9349
+ visible: false,
9350
+ titleText: '',
9351
+ titleColor: '#FDFDFD',
9352
+ titleFontSize: 12,
9353
+ titleFontWeight: 400
9354
+ },
9355
+ grid: {
9356
+ visible: false,
9357
+ gridColor: '#404349',
9358
+ gridWidth: 0.5
9359
+ },
9360
+ tick: {
9361
+ visible: false,
9362
+ tickInside: false,
9363
+ tickSize: 4,
9364
+ tickColor: '#4B4F54'
9365
+ },
9366
+ line: {
9367
+ visible: true,
9368
+ lineColor: '#4B4F54',
9369
+ lineWidth: 1
9370
+ }
9371
+ });
9372
+ const lightTheme = ()=>{
9373
+ const linearAxis = getLightLinearAxis();
9374
+ const bandAxis = getLightBandAxis();
9173
9375
  const barBandAxis = {
9174
9376
  ...bandAxis,
9175
9377
  labelAutoHide: false,
@@ -9183,78 +9385,16 @@
9183
9385
  -90
9184
9386
  ]
9185
9387
  };
9186
- const crosshairLine = {
9187
- visible: true,
9188
- labelVisible: true,
9189
- lineColor: '#3641594d',
9190
- labelColor: '#ffffff',
9191
- labelBackgroundColor: '#364159'
9192
- };
9193
- const crosshairRect = {
9194
- visible: true,
9195
- labelVisible: true,
9196
- rectColor: '#3641594d',
9197
- labelColor: '#ffffff',
9198
- labelBackgroundColor: '#364159'
9199
- };
9388
+ const crosshairLine = getLightCrosshairLine();
9389
+ const crosshairRect = getLightCrosshairRect();
9200
9390
  const baseConfig = {
9201
9391
  backgroundColor: 'transparent',
9202
- color: {
9203
- linearColorScheme: [
9204
- '#C2CEFF',
9205
- '#5766EC'
9206
- ],
9207
- colorScheme: [
9208
- '#8D72F6',
9209
- '#5766EC',
9210
- '#66A3FE',
9211
- '#51D5E6',
9212
- '#4EC0B3',
9213
- '#F9DF90',
9214
- '#F9AD71',
9215
- '#ED8888',
9216
- '#E9A0C3',
9217
- '#D77DD3'
9218
- ]
9219
- },
9220
- label: {
9221
- enable: true,
9222
- wrap: true,
9223
- showValue: true,
9224
- showValuePercent: false,
9225
- labelColorSmartInvert: false,
9226
- labelOverlap: true
9227
- },
9228
- tooltip: {
9229
- enable: true
9230
- },
9231
- legend: {
9232
- enable: true,
9233
- border: true,
9234
- maxSize: 1,
9235
- shapeType: 'rectRound',
9236
- position: 'rt',
9237
- labelColor: '#646A73',
9238
- labelFontSize: 12,
9239
- labelFontWeight: 400
9240
- }
9241
- };
9242
- const tableConfig = {
9243
- borderColor: '#e3e5eb',
9244
- bodyFontSize: 12,
9245
- bodyFontColor: '#141414',
9246
- bodyBackgroundColor: 'transparent',
9247
- headerFontSize: 12,
9248
- headerFontColor: '#21252c',
9249
- headerBackgroundColor: '#f6f7f9',
9250
- hoverBodyBackgroundColor: '#bedaff',
9251
- hoverBodyInlineBackgroundColor: '#bedaff33',
9252
- hoverHeaderBackgroundColor: '#D9DDE4',
9253
- hoverHeaderInlineBackgroundColor: '#D9DDE455',
9254
- selectedBorderColor: '#4080ff',
9255
- selectedBackgroundColor: '#bedaff33',
9256
- backgroundColor: 'transparent'
9392
+ color: getLightColor(),
9393
+ label: getDefaultLabel(),
9394
+ legend: getDefaultLegend(),
9395
+ tooltip: getDefaultTooltip()
9257
9396
  };
9397
+ const tableConfig = getLightTableConfig();
9258
9398
  return {
9259
9399
  config: {
9260
9400
  table: tableConfig,
@@ -9357,6 +9497,11 @@
9357
9497
  },
9358
9498
  scatter: {
9359
9499
  ...baseConfig,
9500
+ crosshairLine,
9501
+ sizeRange: [
9502
+ 8,
9503
+ 24
9504
+ ],
9360
9505
  xAxis: {
9361
9506
  ...linearAxis,
9362
9507
  line: {
@@ -9371,11 +9516,11 @@
9371
9516
  visible: true
9372
9517
  }
9373
9518
  },
9374
- crosshairLine,
9375
- sizeRange: [
9376
- 8,
9377
- 24
9378
- ]
9519
+ label: {
9520
+ ...baseConfig.label,
9521
+ showValue: false,
9522
+ showValuePercent: false
9523
+ }
9379
9524
  },
9380
9525
  dualAxis: {
9381
9526
  ...baseConfig,
@@ -9398,7 +9543,8 @@
9398
9543
  label: {
9399
9544
  ...baseConfig.label,
9400
9545
  showValuePercent: true,
9401
- labelLayout: 'labelLine'
9546
+ labelLayout: 'labelLine',
9547
+ showDimension: true
9402
9548
  }
9403
9549
  },
9404
9550
  donut: {
@@ -9406,7 +9552,8 @@
9406
9552
  label: {
9407
9553
  ...baseConfig.label,
9408
9554
  showValuePercent: true,
9409
- labelLayout: 'labelLine'
9555
+ labelLayout: 'labelLine',
9556
+ showDimension: true
9410
9557
  }
9411
9558
  },
9412
9559
  radar: {
@@ -9416,14 +9563,16 @@
9416
9563
  ...baseConfig,
9417
9564
  label: {
9418
9565
  ...baseConfig.label,
9419
- showValuePercent: true
9566
+ showValuePercent: true,
9567
+ showDimension: true
9420
9568
  }
9421
9569
  },
9422
9570
  roseParallel: {
9423
9571
  ...baseConfig,
9424
9572
  label: {
9425
9573
  ...baseConfig.label,
9426
- showValuePercent: true
9574
+ showValuePercent: true,
9575
+ showDimension: true
9427
9576
  }
9428
9577
  },
9429
9578
  funnel: {
@@ -9440,82 +9589,8 @@
9440
9589
  };
9441
9590
  };
9442
9591
  const darkTheme = ()=>{
9443
- const linearAxis = {
9444
- nice: true,
9445
- zero: true,
9446
- label: {
9447
- visible: true,
9448
- labelAngle: 0,
9449
- labelColor: '#E2E3E6',
9450
- labelFontSize: 12,
9451
- labelFontWeight: 400
9452
- },
9453
- title: {
9454
- visible: false,
9455
- titleText: '',
9456
- titleColor: '#FDFDFD',
9457
- titleFontSize: 12,
9458
- titleFontWeight: 400
9459
- },
9460
- grid: {
9461
- visible: true,
9462
- gridColor: '#404349',
9463
- gridWidth: 0.5
9464
- },
9465
- tick: {
9466
- visible: false,
9467
- tickInside: false,
9468
- tickSize: 4,
9469
- tickColor: '#4B4F54'
9470
- },
9471
- line: {
9472
- visible: false,
9473
- lineColor: '#4B4F54',
9474
- lineWidth: 1
9475
- }
9476
- };
9477
- const bandAxis = {
9478
- labelAutoHide: true,
9479
- labelAutoHideGap: 4,
9480
- labelAutoLimit: true,
9481
- labelAutoLimitLength: 80,
9482
- labelAutoRotate: false,
9483
- labelAutoRotateAngleRange: [
9484
- 0,
9485
- -45,
9486
- -90
9487
- ],
9488
- label: {
9489
- visible: true,
9490
- labelAngle: 0,
9491
- labelColor: '#E2E3E6',
9492
- labelFontSize: 12,
9493
- labelFontWeight: 400
9494
- },
9495
- title: {
9496
- visible: false,
9497
- titleText: '',
9498
- titleColor: '#FDFDFD',
9499
- titleFontSize: 12,
9500
- titleFontWeight: 400
9501
- },
9502
- grid: {
9503
- visible: false,
9504
- gridColor: '#404349',
9505
- gridWidth: 0.5
9506
- },
9507
- tick: {
9508
- visible: false,
9509
- tickInside: false,
9510
- tickSize: 4,
9511
- tickColor: '#4B4F54'
9512
- },
9513
- line: {
9514
- visible: true,
9515
- lineColor: '#4B4F54',
9516
- lineWidth: 1
9517
- }
9518
- };
9592
+ const linearAxis = getDarkLinearAxis();
9593
+ const bandAxis = getDarkBandAxis();
9519
9594
  const barBandAxis = {
9520
9595
  ...bandAxis,
9521
9596
  labelAutoHide: false,
@@ -9529,77 +9604,16 @@
9529
9604
  -90
9530
9605
  ]
9531
9606
  };
9532
- const crosshairLine = {
9533
- visible: true,
9534
- labelVisible: true,
9535
- lineColor: '#E2E3E6',
9536
- labelColor: '#4B4F54',
9537
- labelBackgroundColor: '#ffffff'
9538
- };
9539
- const crosshairRect = {
9540
- visible: true,
9541
- labelVisible: true,
9542
- lineColor: '#E2E3E6',
9543
- labelColor: '#4B4F54',
9544
- labelBackgroundColor: '#ffffff'
9545
- };
9607
+ const crosshairLine = getDarkCrosshairLine();
9608
+ const crosshairRect = getDarkCrosshairRect();
9546
9609
  const baseConfig = {
9547
9610
  backgroundColor: 'transparent',
9548
- color: {
9549
- linearColorScheme: [
9550
- '#A0CEFF',
9551
- '#2E62F1'
9552
- ],
9553
- colorScheme: [
9554
- '#2E62F1',
9555
- '#4DC36A',
9556
- '#FF8406',
9557
- '#FFCC00',
9558
- '#4F44CF',
9559
- '#5AC8FA',
9560
- '#003A8C',
9561
- '#B08AE2',
9562
- '#FF6341',
9563
- '#98DD62'
9564
- ]
9565
- },
9566
- label: {
9567
- enable: true,
9568
- wrap: true,
9569
- showValue: true,
9570
- showValuePercent: false,
9571
- labelColorSmartInvert: false,
9572
- labelOverlap: true
9573
- },
9574
- tooltip: {
9575
- enable: true
9576
- },
9577
- legend: {
9578
- enable: true,
9579
- border: true,
9580
- maxSize: 1,
9581
- position: 'rt',
9582
- shapeType: 'rectRound',
9583
- labelColor: '#FDFDFD',
9584
- labelFontSize: 12,
9585
- labelFontWeight: 400
9586
- }
9587
- };
9588
- const tableConfig = {
9589
- borderColor: '#4b4e53',
9590
- bodyFontSize: 12,
9591
- bodyFontColor: '#fdfdfd',
9592
- bodyBackgroundColor: 'transparent',
9593
- headerFontSize: 12,
9594
- headerFontColor: '#fdfdfd',
9595
- headerBackgroundColor: '#36393e',
9596
- hoverBodyBackgroundColor: '#4284ff66',
9597
- hoverBodyInlineBackgroundColor: '#4284ff10',
9598
- hoverHeaderBackgroundColor: '#6f7984cc',
9599
- hoverHeaderInlineBackgroundColor: '#4b4f54',
9600
- selectedBorderColor: '#3073f2',
9601
- selectedBackgroundColor: '#4284ff33'
9611
+ color: getDarkColor(),
9612
+ label: getDefaultLabel(),
9613
+ legend: getDefaultLegend(),
9614
+ tooltip: getDefaultTooltip()
9602
9615
  };
9616
+ const tableConfig = getDarkTableConfig();
9603
9617
  return {
9604
9618
  config: {
9605
9619
  table: tableConfig,
@@ -9696,6 +9710,11 @@
9696
9710
  },
9697
9711
  scatter: {
9698
9712
  ...baseConfig,
9713
+ crosshairLine,
9714
+ sizeRange: [
9715
+ 8,
9716
+ 24
9717
+ ],
9699
9718
  xAxis: {
9700
9719
  ...linearAxis,
9701
9720
  line: {
@@ -9710,11 +9729,11 @@
9710
9729
  visible: true
9711
9730
  }
9712
9731
  },
9713
- crosshairLine,
9714
- sizeRange: [
9715
- 8,
9716
- 24
9717
- ]
9732
+ label: {
9733
+ ...baseConfig.label,
9734
+ showValue: false,
9735
+ showValuePercent: false
9736
+ }
9718
9737
  },
9719
9738
  dualAxis: {
9720
9739
  ...baseConfig,
@@ -9737,7 +9756,8 @@
9737
9756
  label: {
9738
9757
  ...baseConfig.label,
9739
9758
  showValuePercent: true,
9740
- labelLayout: 'labelLine'
9759
+ labelLayout: 'labelLine',
9760
+ showDimension: true
9741
9761
  }
9742
9762
  },
9743
9763
  donut: {
@@ -9745,7 +9765,8 @@
9745
9765
  label: {
9746
9766
  ...baseConfig.label,
9747
9767
  showValuePercent: true,
9748
- labelLayout: 'labelLine'
9768
+ labelLayout: 'labelLine',
9769
+ showDimension: true
9749
9770
  }
9750
9771
  },
9751
9772
  radar: {
@@ -9755,14 +9776,16 @@
9755
9776
  ...baseConfig,
9756
9777
  label: {
9757
9778
  ...baseConfig.label,
9758
- showValuePercent: true
9779
+ showValuePercent: true,
9780
+ showDimension: true
9759
9781
  }
9760
9782
  },
9761
9783
  roseParallel: {
9762
9784
  ...baseConfig,
9763
9785
  label: {
9764
9786
  ...baseConfig.label,
9765
- showValuePercent: true
9787
+ showValuePercent: true,
9788
+ showDimension: true
9766
9789
  }
9767
9790
  },
9768
9791
  funnel: {
@@ -13482,6 +13505,7 @@
13482
13505
  wrap: schemas_boolean().nullish(),
13483
13506
  showValue: schemas_boolean().nullish(),
13484
13507
  showValuePercent: schemas_boolean().nullish(),
13508
+ showDimension: schemas_boolean().nullish(),
13485
13509
  autoFormat: schemas_boolean().nullish(),
13486
13510
  numFormat: zNumFormat.nullish(),
13487
13511
  labelFontSize: schemas_number().nullish(),
@@ -13847,7 +13871,7 @@
13847
13871
  selector: union([
13848
13872
  zSelector,
13849
13873
  zSelectors
13850
- ]),
13874
+ ]).nullish(),
13851
13875
  text: schemas_string().or(schemas_array(schemas_string())).nullish(),
13852
13876
  textColor: schemas_string().default('#ffffff').nullish(),
13853
13877
  textFontSize: schemas_number().default(12).nullish(),
@@ -13975,7 +13999,7 @@
13975
13999
  selector: union([
13976
14000
  zSelector,
13977
14001
  zSelectors
13978
- ]),
14002
+ ]).nullish(),
13979
14003
  textPosition: schemas_enum([
13980
14004
  'top',
13981
14005
  'topRight',