@visactor/vseed 0.2.2 → 0.2.3

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 (133) hide show
  1. package/dist/cjs/index.cjs +1 -3
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/buildAdvanced.js +1 -2
  4. package/dist/esm/builder/builder/buildAdvanced.js.map +1 -1
  5. package/dist/esm/builder/builder/buildSpec.js +1 -2
  6. package/dist/esm/builder/builder/buildSpec.js.map +1 -1
  7. package/dist/esm/builder/builder/builder.d.ts +628 -334
  8. package/dist/esm/dataReshape/constant.d.ts +1 -0
  9. package/dist/esm/dataReshape/constant.js +2 -1
  10. package/dist/esm/dataReshape/constant.js.map +1 -1
  11. package/dist/esm/i18n/i18n.js +1 -4
  12. package/dist/esm/i18n/i18n.js.map +1 -1
  13. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +12 -0
  14. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
  15. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js +3 -1
  16. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js.map +1 -1
  17. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js +4 -12
  18. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
  19. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js +4 -12
  20. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
  21. package/dist/esm/pipeline/spec/chart/pipes/axes/axisStyle.d.ts +3 -0
  22. package/dist/esm/pipeline/spec/chart/pipes/axes/axisStyle.js +65 -0
  23. package/dist/esm/pipeline/spec/chart/pipes/axes/axisStyle.js.map +1 -0
  24. package/dist/esm/pipeline/spec/chart/pipes/axes/heatmapBandAxis.d.ts +2 -0
  25. package/dist/esm/pipeline/spec/chart/pipes/axes/heatmapBandAxis.js +24 -0
  26. package/dist/esm/pipeline/spec/chart/pipes/axes/heatmapBandAxis.js.map +1 -0
  27. package/dist/esm/pipeline/spec/chart/pipes/axes/index.d.ts +1 -0
  28. package/dist/esm/pipeline/spec/chart/pipes/axes/index.js +2 -1
  29. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +15 -72
  30. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
  31. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +17 -73
  32. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
  33. package/dist/esm/pipeline/spec/chart/pipes/dual/dualChartType.js +11 -13
  34. package/dist/esm/pipeline/spec/chart/pipes/dual/dualChartType.js.map +1 -1
  35. package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js +10 -8
  36. package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js.map +1 -1
  37. package/dist/esm/pipeline/spec/chart/pipes/init/heatmap.js +0 -12
  38. package/dist/esm/pipeline/spec/chart/pipes/init/heatmap.js.map +1 -1
  39. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +1 -1
  40. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  41. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js +13 -1
  42. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js.map +1 -1
  43. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js +2 -2
  44. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js.map +1 -1
  45. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js +3 -1
  46. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js.map +1 -1
  47. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +3 -1
  48. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
  49. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +3 -1
  50. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
  51. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipElement.d.ts +2 -0
  52. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipElement.js +58 -0
  53. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipElement.js.map +1 -0
  54. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js +3 -1
  55. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js.map +1 -1
  56. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +3 -1
  57. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -1
  58. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js +3 -1
  59. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
  60. package/dist/esm/pipeline/utils/boxplot.d.ts +1 -0
  61. package/dist/esm/pipeline/utils/boxplot.js +8 -0
  62. package/dist/esm/pipeline/utils/boxplot.js.map +1 -0
  63. package/dist/esm/pipeline/utils/index.d.ts +1 -0
  64. package/dist/esm/pipeline/utils/index.js +1 -0
  65. package/dist/esm/theme/common/legend.d.ts +3 -1
  66. package/dist/esm/theme/common/legend.js +13 -1
  67. package/dist/esm/theme/common/legend.js.map +1 -1
  68. package/dist/esm/theme/common/tooltip.js +1 -1
  69. package/dist/esm/theme/common/tooltip.js.map +1 -1
  70. package/dist/esm/theme/dark/dark.js +4 -1
  71. package/dist/esm/theme/dark/dark.js.map +1 -1
  72. package/dist/esm/theme/light/light.js +4 -1
  73. package/dist/esm/theme/light/light.js.map +1 -1
  74. package/dist/esm/types/advancedVSeed.d.ts +252 -420
  75. package/dist/esm/types/chartType/area/zArea.d.ts +5 -281
  76. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +5 -281
  77. package/dist/esm/types/chartType/bar/zBar.d.ts +5 -281
  78. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +5 -281
  79. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +5 -281
  80. package/dist/esm/types/chartType/boxPlot/zBoxPlot.d.ts +5 -281
  81. package/dist/esm/types/chartType/column/zColumn.d.ts +5 -281
  82. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +5 -281
  83. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +5 -281
  84. package/dist/esm/types/chartType/donut/zDonut.d.ts +1 -1
  85. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +5 -281
  86. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +5 -0
  87. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +5 -0
  88. package/dist/esm/types/chartType/histogram/zHistogram.d.ts +5 -281
  89. package/dist/esm/types/chartType/line/zLine.d.ts +5 -281
  90. package/dist/esm/types/chartType/pie/zPie.d.ts +1 -1
  91. package/dist/esm/types/chartType/radar/zRadar.d.ts +1 -1
  92. package/dist/esm/types/chartType/rose/zRose.d.ts +1 -1
  93. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +1 -1
  94. package/dist/esm/types/chartType/scatter/zScatter.d.ts +5 -281
  95. package/dist/esm/types/dataSelector/selector.d.ts +108 -0
  96. package/dist/esm/types/dataSelector/selector.js +58 -51
  97. package/dist/esm/types/dataSelector/selector.js.map +1 -1
  98. package/dist/esm/types/properties/annotation/annotation.d.ts +4 -280
  99. package/dist/esm/types/properties/annotation/annotationArea.d.ts +2 -2
  100. package/dist/esm/types/properties/annotation/annotationHorizontalLine.d.ts +1 -6
  101. package/dist/esm/types/properties/annotation/annotationVerticalLine.d.ts +0 -5
  102. package/dist/esm/types/properties/annotation/zAnnotationArea.d.ts +2 -2
  103. package/dist/esm/types/properties/annotation/zAnnotationArea.js +3 -3
  104. package/dist/esm/types/properties/annotation/zAnnotationArea.js.map +1 -1
  105. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.d.ts +0 -69
  106. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.js +0 -5
  107. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.js.map +1 -1
  108. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.d.ts +0 -69
  109. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.js +0 -5
  110. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.js.map +1 -1
  111. package/dist/esm/types/properties/config/area.d.ts +2 -2
  112. package/dist/esm/types/properties/config/bar.d.ts +3 -3
  113. package/dist/esm/types/properties/config/boxplot.d.ts +1 -1
  114. package/dist/esm/types/properties/config/column.d.ts +3 -3
  115. package/dist/esm/types/properties/config/config.d.ts +102 -48
  116. package/dist/esm/types/properties/config/dualAxis.d.ts +1 -1
  117. package/dist/esm/types/properties/config/funnel.d.ts +1 -1
  118. package/dist/esm/types/properties/config/heatmap.d.ts +83 -29
  119. package/dist/esm/types/properties/config/heatmap.js +6 -3
  120. package/dist/esm/types/properties/config/heatmap.js.map +1 -1
  121. package/dist/esm/types/properties/config/histogram.d.ts +1 -1
  122. package/dist/esm/types/properties/config/legend/legend.d.ts +10 -2
  123. package/dist/esm/types/properties/config/legend/legend.js +7 -2
  124. package/dist/esm/types/properties/config/legend/legend.js.map +1 -1
  125. package/dist/esm/types/properties/config/line.d.ts +1 -1
  126. package/dist/esm/types/properties/config/pie.d.ts +3 -3
  127. package/dist/esm/types/properties/config/rose.d.ts +2 -2
  128. package/dist/esm/types/properties/config/scatter.d.ts +1 -1
  129. package/dist/esm/types/properties/theme/customTheme.d.ts +204 -96
  130. package/dist/esm/types/zVseed.d.ts +828 -4406
  131. package/dist/umd/index.js +371 -291
  132. package/dist/umd/index.js.map +1 -1
  133. package/package.json +10 -5
package/dist/umd/index.js CHANGED
@@ -71,6 +71,7 @@
71
71
  zAnnotationVerticalLineConfig: ()=>zAnnotationVerticalLineConfig,
72
72
  zCustomThemeConfig: ()=>zCustomThemeConfig,
73
73
  zMeasureEncoding: ()=>zMeasureEncoding,
74
+ zMeasureSelector: ()=>zMeasureSelector,
74
75
  MedianMeasureId: ()=>MedianMeasureId,
75
76
  BinPercentageMeasureId: ()=>BinPercentageMeasureId,
76
77
  AngleEncoding: ()=>AngleEncoding,
@@ -139,13 +140,14 @@
139
140
  zLinearRegressionLine: ()=>zLinearRegressionLine,
140
141
  createNumFormatter: ()=>createNumFormatter,
141
142
  DEFAULT_PARENT_ID: ()=>DEFAULT_PARENT_ID,
142
- isPivotChart: ()=>isPivotChart,
143
+ isPivotChart: ()=>chatType_isPivotChart,
143
144
  zPolynomialRegressionLine: ()=>zPolynomialRegressionLine,
144
145
  zTableConfig: ()=>zTableConfig,
145
146
  findFirstMeasure: ()=>findFirstMeasure,
146
147
  isValueSelector: ()=>isValueSelector,
147
148
  zFunnel: ()=>zFunnel,
148
149
  zChartType: ()=>zChartType,
150
+ zAreaSelectors: ()=>zAreaSelectors,
149
151
  registerColumnParallel: ()=>registerColumnParallel,
150
152
  isDimensionSelector: ()=>isDimensionSelector,
151
153
  BAND_AXIS_INNER_OFFSET_IN_PIVOT: ()=>2,
@@ -179,6 +181,7 @@
179
181
  registerHistogram: ()=>registerHistogram,
180
182
  Q1MeasureValue: ()=>"__Q1__",
181
183
  lineAdvancedPipeline: ()=>lineAdvancedPipeline,
184
+ zAreaSelector: ()=>zAreaSelector,
182
185
  zRadarConfig: ()=>zRadarConfig,
183
186
  zRoseParallelConfig: ()=>zRoseParallelConfig,
184
187
  isMeasureSelector: ()=>isMeasureSelector,
@@ -273,6 +276,7 @@
273
276
  zDimensionLinkage: ()=>zDimensionLinkage,
274
277
  preorderTraverse: ()=>preorderTraverse,
275
278
  deleteMeasureTreeByCallback: ()=>deleteMeasureTreeByCallback,
279
+ zDimensionSelector: ()=>zDimensionSelector,
276
280
  registerLightTheme: ()=>registerLightTheme,
277
281
  isMeasure: ()=>isMeasure,
278
282
  FoldYMeasureValue: ()=>FoldYMeasureValue,
@@ -294,6 +298,7 @@
294
298
  registerDualAxis: ()=>registerDualAxis,
295
299
  zAnnotationHorizontalLineConfig: ()=>zAnnotationHorizontalLineConfig,
296
300
  registerFunnel: ()=>registerFunnel,
301
+ BoxPlotPivotIndicator: ()=>BoxPlotPivotIndicator,
297
302
  histogramSpecPipeline: ()=>histogramSpecPipeline,
298
303
  roseAdvancedPipeline: ()=>roseAdvancedPipeline,
299
304
  zNumFormat: ()=>zNumFormat,
@@ -310,9 +315,10 @@
310
315
  columnPercentAdvancedPipeline: ()=>columnPercentAdvancedPipeline,
311
316
  barPercentAdvancedPipeline: ()=>barPercentAdvancedPipeline,
312
317
  DimensionEncodingEnum: ()=>DimensionEncodingEnum,
313
- zDonutConfig: ()=>zDonutConfig,
318
+ revisedBoxPlotFieldKey: ()=>revisedBoxPlotFieldKey,
314
319
  funnelAdvancedPipeline: ()=>funnelAdvancedPipeline,
315
320
  zDataset: ()=>zDataset,
321
+ zDonutConfig: ()=>zDonutConfig,
316
322
  zLogisticRegressionLine: ()=>zLogisticRegressionLine,
317
323
  createFormatterByMeasure: ()=>createFormatterByMeasure,
318
324
  zBoxGapInGroup: ()=>zBoxGapInGroup,
@@ -374,10 +380,7 @@
374
380
  i18n = (segments, ...values)=>{
375
381
  const text = segments.map((segment, index)=>segment + (values[index] || '')).join('');
376
382
  const translatedText = this.translateMap?.[text]?.[this.locale];
377
- if (chunk_JK3VNB42_n(translatedText)) {
378
- console.warn(`i18n ${this.locale} no translate: ${text}`);
379
- return text;
380
- }
383
+ if (chunk_JK3VNB42_n(translatedText)) return text;
381
384
  return translatedText;
382
385
  };
383
386
  setLocale = (locale)=>{
@@ -406,8 +409,7 @@
406
409
  builder.advancedVSeed = advancedVSeed;
407
410
  return advancedVSeed;
408
411
  } catch (e) {
409
- console.error(e);
410
- throw new Error(`buildAdvanced error: ${e.message}.\ndetails info in console`);
412
+ throw new Error(`buildAdvanced error: ${e.message}`);
411
413
  } finally{
412
414
  const end = 'undefined' != typeof performance ? performance.now() : Date.now();
413
415
  builder.performance['buildAdvanced'] = `${(end - start).toFixed(4)}ms`;
@@ -428,8 +430,7 @@
428
430
  builder.spec = spec;
429
431
  return spec;
430
432
  } catch (e) {
431
- console.error(e);
432
- throw new Error(`buildSpec error: ${e.message}.\ndetails info in console`);
433
+ throw new Error(`buildSpec error: ${e.message}`);
433
434
  } finally{
434
435
  const end = 'undefined' != typeof performance ? performance.now() : Date.now();
435
436
  builder.performance['buildSpec'] = `${(end - start).toFixed(4)}ms`;
@@ -635,7 +636,7 @@
635
636
  'pivotTable'
636
637
  ].includes(vseed.chartType);
637
638
  const isVChart = (vseed)=>!isVTable(vseed);
638
- const isPivotChart = (vseed)=>{
639
+ const chatType_isPivotChart = (vseed)=>{
639
640
  if (isVTable(vseed)) return false;
640
641
  if (chatType_isPivot(vseed)) return true;
641
642
  return isCombination(vseed);
@@ -1653,6 +1654,7 @@
1653
1654
  const DetailEncoding = '__Dim_Detail__';
1654
1655
  const ColorEncoding = '__Dim_Color__';
1655
1656
  const ColorIdEncoding = '__Dim_ColorId__';
1657
+ const BoxPlotPivotIndicator = '__BoxPlot_Pivot_Indicator__';
1656
1658
  const LowerWhisker = '__Lower_Whisker__';
1657
1659
  const UpperWhisker = '__Upper_Whisker__';
1658
1660
  const OutliersMeasureId = '__Outliers__';
@@ -2316,7 +2318,7 @@
2316
2318
  advancedVSeed.measures = generateMeasuresByParentId(advancedVSeed.measures);
2317
2319
  return advancedVSeed;
2318
2320
  }
2319
- if (isPivotChart(advancedVSeed)) advancedVSeed.measures = basicMeasuresToMeasureTree(advancedVSeed.measures);
2321
+ if (chatType_isPivotChart(advancedVSeed)) advancedVSeed.measures = basicMeasuresToMeasureTree(advancedVSeed.measures);
2320
2322
  return advancedVSeed;
2321
2323
  };
2322
2324
  const generateMeasuresByParentId = (measures)=>{
@@ -2451,7 +2453,7 @@
2451
2453
  };
2452
2454
  const pivotAdapter = (pipeline, pivotPipeline)=>(advancedVSeed, context)=>{
2453
2455
  const { vseed } = context;
2454
- const usePivotChart = isPivotChart(vseed);
2456
+ const usePivotChart = chatType_isPivotChart(vseed);
2455
2457
  if (usePivotChart) return execPipeline(pivotPipeline, context, advancedVSeed);
2456
2458
  return execPipeline(pipeline, context, advancedVSeed);
2457
2459
  };
@@ -2929,7 +2931,7 @@
2929
2931
  ...spec,
2930
2932
  data: {
2931
2933
  id,
2932
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
2934
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
2933
2935
  fields: fields
2934
2936
  }
2935
2937
  };
@@ -2954,24 +2956,14 @@
2954
2956
  return alias;
2955
2957
  }).join(' & ');
2956
2958
  };
2957
- const xBand = (spec, context)=>{
2958
- const result = {
2959
- ...spec
2960
- };
2961
- const { advancedVSeed, vseed } = context;
2962
- const { chartType } = vseed;
2963
- const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed;
2964
- const config = advancedVSeed.config?.[chartType]?.xAxis ?? {};
2965
- if (!result.axes) result.axes = [];
2959
+ const isNull = (value)=>null === value;
2960
+ const common_isNull = isNull;
2961
+ const bandAxisStyle = (config)=>{
2966
2962
  const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange } = config;
2967
- const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
2968
- const onlyMeasureId = 0 === (encoding.x || []).filter((v)=>v !== MeasureId).length;
2969
- const bandAxis = {
2970
- visible,
2963
+ return {
2971
2964
  type: 'band',
2972
- orient: 'bottom',
2973
- maxHeight: labelAutoLimitLength + 60,
2974
- sampling,
2965
+ sampling: !(labelAutoHide || labelAutoRotate || labelAutoLimit),
2966
+ visible,
2975
2967
  hover: true,
2976
2968
  label: {
2977
2969
  visible: label?.visible,
@@ -2995,7 +2987,7 @@
2995
2987
  },
2996
2988
  title: {
2997
2989
  visible: title?.visible,
2998
- text: title?.titleText || defaultTitleText(measures, dimensions, encoding.x),
2990
+ text: title?.titleText,
2999
2991
  style: {
3000
2992
  fill: title?.titleColor,
3001
2993
  fontSize: title?.titleFontSize,
@@ -3024,16 +3016,32 @@
3024
3016
  lineWidth: line?.lineWidth,
3025
3017
  stroke: line?.lineColor
3026
3018
  }
3027
- },
3028
- paddingInner: [
3029
- 0.15,
3030
- 0.1
3031
- ],
3032
- paddingOuter: [
3033
- 0.075,
3034
- 0.1
3035
- ]
3019
+ }
3020
+ };
3021
+ };
3022
+ const xBand = (spec, context)=>{
3023
+ const result = {
3024
+ ...spec
3036
3025
  };
3026
+ const { advancedVSeed, vseed } = context;
3027
+ const { chartType } = vseed;
3028
+ const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed;
3029
+ const config = advancedVSeed.config?.[chartType]?.xAxis ?? {};
3030
+ if (!result.axes) result.axes = [];
3031
+ const { labelAutoLimitLength = 80 } = config;
3032
+ const onlyMeasureId = 0 === (encoding.x || []).filter((v)=>v !== MeasureId).length;
3033
+ const bandAxis = bandAxisStyle(config);
3034
+ bandAxis.orient = 'bottom';
3035
+ bandAxis.maxHeight = labelAutoLimitLength + 60;
3036
+ bandAxis.paddingInner = [
3037
+ 0.15,
3038
+ 0.1
3039
+ ];
3040
+ bandAxis.paddingOuter = [
3041
+ 0.075,
3042
+ 0.1
3043
+ ];
3044
+ if (common_isNull(bandAxis.title?.text)) bandAxis.title.text = defaultTitleText(measures, dimensions, encoding.x);
3037
3045
  if (onlyMeasureId && bandAxis.label) {
3038
3046
  const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
3039
3047
  const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
@@ -3069,7 +3077,7 @@
3069
3077
  const { measures, dimensions, encoding } = advancedVSeed;
3070
3078
  const config = advancedVSeed.config?.[chartType]?.yAxis ?? {};
3071
3079
  if (!result.axes) result.axes = [];
3072
- const isPivot = isPivotChart(vseed);
3080
+ const isPivot = chatType_isPivotChart(vseed);
3073
3081
  const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, autoFormat, numFormat = {} } = config;
3074
3082
  const formatter = createNumFormatter(numFormat);
3075
3083
  const percentFormatter = createNumFormatter({
@@ -3337,7 +3345,7 @@
3337
3345
  const baseConfig = advancedVSeed.config[chartType];
3338
3346
  if (!baseConfig || !baseConfig.legend) return result;
3339
3347
  const { legend } = baseConfig;
3340
- const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight } = legend || {};
3348
+ const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight, railBackgroundColor, handlerBorderColor } = legend || {};
3341
3349
  const orient = [
3342
3350
  'bottom',
3343
3351
  'bottomLeft',
@@ -3391,6 +3399,18 @@
3391
3399
  fontSize: labelFontSize,
3392
3400
  fontWeight: labelFontWeight
3393
3401
  }
3402
+ },
3403
+ rail: {
3404
+ style: {
3405
+ fill: railBackgroundColor
3406
+ }
3407
+ },
3408
+ handler: {
3409
+ style: {
3410
+ outerBorder: {
3411
+ stroke: handlerBorderColor
3412
+ }
3413
+ }
3394
3414
  }
3395
3415
  };
3396
3416
  const colorMeasure = findTreeNodesBy(measures, (m)=>'color' === m.encoding)?.[0];
@@ -3638,7 +3658,7 @@
3638
3658
  const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedDimensions, advancedVSeedMeasures, encoding, foldInfoList)=>{
3639
3659
  const { enable, wrap, showValue, showValuePercent, showDimension, labelOverlap, labelColorSmartInvert, labelStroke, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
3640
3660
  const hasDimLabelEncoding = vseedDimensions.some((item)=>encoding.label?.includes(item.id));
3641
- const labelDims = T(hasDimLabelEncoding ? vseedDimensions.filter((item)=>encoding.label?.includes(item.id)) : showDimension ? advancedVSeedDimensions.filter((d)=>d.id !== MeasureId) : [], (item)=>item.id);
3661
+ const labelDims = T(hasDimLabelEncoding ? vseedDimensions.filter((item)=>encoding.label?.includes(item.id)) : showDimension ? advancedVSeedDimensions.filter((d)=>d.id !== MeasureId && 'row' !== d.encoding && 'column' !== d.encoding) : [], (item)=>item.id);
3642
3662
  const labelMeas = T(vseedMeasures.filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
3643
3663
  const percentFormat = chunk_5S4PYKVY_t(numFormat, {
3644
3664
  type: 'percent'
@@ -3713,6 +3733,61 @@
3713
3733
  fontWeight: 'bold'
3714
3734
  }
3715
3735
  });
3736
+ const setWholeIcon = (shapeContainer, color)=>{
3737
+ shapeContainer.style.backgroundColor = color;
3738
+ shapeContainer.style.borderColor = color;
3739
+ shapeContainer.style.width = '4px';
3740
+ shapeContainer.style.height = '100%';
3741
+ shapeContainer.style.display = 'inline-block';
3742
+ shapeContainer.style.borderRadius = '2px';
3743
+ shapeContainer.style.marginRight = '6px';
3744
+ const shapeElements = shapeContainer.children;
3745
+ for(let i = 0; i < shapeElements.length; i++){
3746
+ const shapeElement = shapeElements[i];
3747
+ const svgElement = shapeElement.children[0];
3748
+ if (svgElement) svgElement.style.visibility = 'hidden';
3749
+ shapeElement.style.background = 'transparent';
3750
+ shapeElement.style.borderColor = 'transparent';
3751
+ }
3752
+ };
3753
+ const updateTooltipElement = (tooltipElement, actualTooltip)=>{
3754
+ if (!tooltipElement || !tooltipElement.querySelector || !actualTooltip) return;
3755
+ const shapeContainer = tooltipElement.querySelector('.vchart-tooltip-shape-column');
3756
+ if (!shapeContainer) return;
3757
+ if ('mark' === actualTooltip.activeType) {
3758
+ const color = actualTooltip.content[0].shapeFill ?? 'transparent';
3759
+ setWholeIcon(shapeContainer, color);
3760
+ } else if ('dimension' === actualTooltip.activeType) {
3761
+ shapeContainer.style.background = 'transparent';
3762
+ shapeContainer.style.borderColor = 'transparent';
3763
+ shapeContainer.style.width = 'auto';
3764
+ shapeContainer.style.height = 'auto';
3765
+ shapeContainer.style.display = 'inline-block';
3766
+ shapeContainer.style.marginRight = '2px';
3767
+ const shapeElements = shapeContainer.children;
3768
+ for(let i = 0; i < shapeElements.length; i++){
3769
+ const shapeElement = shapeElements[i];
3770
+ const svgElement = shapeElement.children[0];
3771
+ if (svgElement) svgElement.style.visibility = 'hidden';
3772
+ const color = actualTooltip.content[i]?.shapeFill ?? 'transparent';
3773
+ shapeElement.style.width = '4px';
3774
+ shapeElement.style.height = '100%';
3775
+ shapeElement.style.borderRadius = '2px';
3776
+ shapeElement.style.marginRight = '4px';
3777
+ shapeElement.style.backgroundColor = color;
3778
+ shapeElement.style.borderColor = color;
3779
+ }
3780
+ }
3781
+ const title = tooltipElement.querySelector('.vchart-tooltip-title');
3782
+ if (title) title.style.marginBottom = '8px';
3783
+ };
3784
+ const updateMarkTooltipElement = (tooltipElement, actualTooltip)=>{
3785
+ if (!tooltipElement || !tooltipElement.querySelector || !actualTooltip) return;
3786
+ const shapeContainer = tooltipElement.querySelector('.vchart-tooltip-shape-column');
3787
+ if (!shapeContainer) return;
3788
+ const color = actualTooltip.content[0].shapeFill ?? 'transparent';
3789
+ setWholeIcon(shapeContainer, color);
3790
+ };
3716
3791
  const tooltip_tooltip = (spec, context)=>{
3717
3792
  const result = {
3718
3793
  ...spec
@@ -3739,7 +3814,8 @@
3739
3814
  visible: true
3740
3815
  },
3741
3816
  content: createDimensionContent(dimensions, measures, foldInfo, unfoldInfo)
3742
- }
3817
+ },
3818
+ updateElement: updateTooltipElement
3743
3819
  };
3744
3820
  return result;
3745
3821
  };
@@ -3968,8 +4044,7 @@
3968
4044
  }
3969
4045
  const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
3970
4046
  const { advancedVSeed, vseed } = context;
3971
- const { annotation, datasetReshapeInfo, config } = advancedVSeed;
3972
- const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
4047
+ const { annotation, config } = advancedVSeed;
3973
4048
  if (!annotation || !annotation.annotationVerticalLine) return spec;
3974
4049
  const theme = config?.[vseed.chartType]?.annotation?.annotationVerticalLine;
3975
4050
  const { annotationVerticalLine } = annotation;
@@ -3985,8 +4060,7 @@
3985
4060
  insideEnd: 'insideEndTop'
3986
4061
  };
3987
4062
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
3988
- const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = 'center', textBaseline = 'top', lineColor = theme?.lineColor ?? '#212121', lineStyle = theme?.lineStyle ?? 'dashed', lineVisible = theme?.lineStyle ?? true, lineWidth = theme?.lineWidth ?? 1, textBackgroundVisible = theme?.textBackgroundVisible ?? true, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#212121', textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundPadding = theme?.textBackgroundPadding ?? 2 } = annotationVerticalLine;
3989
- const dataset = advancedVSeed.dataset.flat();
4063
+ const { xValue, text = '', textPosition = 'insideEnd', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = 'center', textBaseline = 'top', lineColor = theme?.lineColor ?? '#212121', lineStyle = theme?.lineStyle ?? 'dashed', lineVisible = theme?.lineStyle ?? true, lineWidth = theme?.lineWidth ?? 1, textBackgroundVisible = theme?.textBackgroundVisible ?? true, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#212121', textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundPadding = theme?.textBackgroundPadding ?? 2 } = annotationVerticalLine;
3990
4064
  const generateOneMarkLine = (x)=>({
3991
4065
  x,
3992
4066
  autoRange: true,
@@ -4057,18 +4131,13 @@
4057
4131
  }
4058
4132
  }
4059
4133
  });
4060
- if (!selectorPoint && chunk_BO3LQZNF_o(xValue) || chunk_SFZGYJFI_t(xValue) || chunk_6GTAPB47_e(xValue)) {
4134
+ if (chunk_BO3LQZNF_o(xValue) || chunk_SFZGYJFI_t(xValue) || chunk_6GTAPB47_e(xValue)) {
4061
4135
  const xValueArr = Array.isArray(xValue) ? xValue : [
4062
4136
  xValue
4063
4137
  ];
4064
4138
  return xValueArr.map(generateOneMarkLine);
4065
4139
  }
4066
- const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
4067
- return selectedData.map((datum)=>{
4068
- if (datum[unfoldInfo.encodingX]) return generateOneMarkLine(datum[unfoldInfo.encodingX]);
4069
- if (datum[foldInfo.measureValue]) return generateOneMarkLine(datum[foldInfo.measureValue]);
4070
- return {};
4071
- });
4140
+ return [];
4072
4141
  });
4073
4142
  const specMarkLine = spec.markLine || [];
4074
4143
  const newMarkLine = [
@@ -4082,8 +4151,7 @@
4082
4151
  };
4083
4152
  const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
4084
4153
  const { advancedVSeed, vseed } = context;
4085
- const { annotation, datasetReshapeInfo, config } = advancedVSeed;
4086
- const { foldInfo, unfoldInfo } = datasetReshapeInfo[0];
4154
+ const { annotation, config } = advancedVSeed;
4087
4155
  if (!annotation || !annotation.annotationHorizontalLine) return spec;
4088
4156
  const theme = config?.[vseed.chartType]?.annotation?.annotationHorizontalLine;
4089
4157
  const { annotationHorizontalLine } = annotation;
@@ -4099,8 +4167,7 @@
4099
4167
  insideEnd: 'insideEndTop'
4100
4168
  };
4101
4169
  const markLine = annotationHorizontalLineList.flatMap((annotationHorizontalLine)=>{
4102
- const { selector: selectorPoint, yValue, text = '', textPosition = 'insideEnd', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = 'right', textBaseline = 'bottom', lineColor = theme?.lineColor ?? '#212121', lineStyle = theme?.lineStyle ?? 'dashed', lineVisible = theme?.lineStyle ?? true, lineWidth = theme?.lineWidth ?? 1, textBackgroundVisible = theme?.textBackgroundVisible ?? true, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#212121', textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundPadding = theme?.textBackgroundPadding ?? 2 } = annotationHorizontalLine;
4103
- const dataset = advancedVSeed.dataset.flat();
4170
+ const { yValue, text = '', textPosition = 'insideEnd', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = 'right', textBaseline = 'bottom', lineColor = theme?.lineColor ?? '#212121', lineStyle = theme?.lineStyle ?? 'dashed', lineVisible = theme?.lineStyle ?? true, lineWidth = theme?.lineWidth ?? 1, textBackgroundVisible = theme?.textBackgroundVisible ?? true, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#212121', textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundPadding = theme?.textBackgroundPadding ?? 2 } = annotationHorizontalLine;
4104
4171
  const generateOneMarkLine = (y)=>({
4105
4172
  y,
4106
4173
  autoRange: true,
@@ -4170,18 +4237,13 @@
4170
4237
  }
4171
4238
  }
4172
4239
  });
4173
- if (!selectorPoint && chunk_BO3LQZNF_o(yValue) || chunk_SFZGYJFI_t(yValue) || chunk_6GTAPB47_e(yValue)) {
4240
+ if (chunk_BO3LQZNF_o(yValue) || chunk_SFZGYJFI_t(yValue) || chunk_6GTAPB47_e(yValue)) {
4174
4241
  const yValueArr = Array.isArray(yValue) ? yValue : [
4175
4242
  yValue
4176
4243
  ];
4177
4244
  return yValueArr.map(generateOneMarkLine);
4178
4245
  }
4179
- const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
4180
- return selectedData.map((datum)=>{
4181
- if (datum[unfoldInfo.encodingY]) return generateOneMarkLine(datum[unfoldInfo.encodingY]);
4182
- if (datum[foldInfo.measureValue]) return generateOneMarkLine(datum[foldInfo.measureValue]);
4183
- return {};
4184
- });
4246
+ return [];
4185
4247
  });
4186
4248
  const specMarkLine = spec.markLine || [];
4187
4249
  const newMarkLine = [
@@ -5553,8 +5615,8 @@
5553
5615
  });
5554
5616
  spec.chartDimensionLinkage = {
5555
5617
  showTooltip: config.showTooltip ?? chartSpec?.tooltip?.dimension?.visible ?? true,
5556
- heightLimitToShowTooltipForLastRow: 60,
5557
- widthLimitToShowTooltipForLastColumn: 90,
5618
+ heightLimitToShowTooltipForEdgeRow: 60,
5619
+ widthLimitToShowTooltipForEdgeColumn: 90,
5558
5620
  labelHoverOnAxis
5559
5621
  };
5560
5622
  return spec;
@@ -5562,7 +5624,7 @@
5562
5624
  const pivotAdapter_pivotAdapter = (pipeline, pivotPipeline)=>{
5563
5625
  const adapted = (spec, context)=>{
5564
5626
  const { vseed } = context;
5565
- const usePivotChart = isPivotChart(vseed);
5627
+ const usePivotChart = chatType_isPivotChart(vseed);
5566
5628
  if (usePivotChart) return execPipeline(pivotPipeline, context, spec);
5567
5629
  return execPipeline(pipeline, context, spec);
5568
5630
  };
@@ -7080,7 +7142,7 @@
7080
7142
  ...spec,
7081
7143
  data: {
7082
7144
  id,
7083
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
7145
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
7084
7146
  fields: fields
7085
7147
  }
7086
7148
  };
@@ -7094,7 +7156,7 @@
7094
7156
  const { chartType } = vseed;
7095
7157
  const config = advancedVSeed.config?.[chartType]?.xAxis ?? {};
7096
7158
  if (!result.axes) result.axes = [];
7097
- const isPivot = isPivotChart(vseed);
7159
+ const isPivot = chatType_isPivotChart(vseed);
7098
7160
  const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, autoFormat, numFormat = {} } = config;
7099
7161
  const formatter = createNumFormatter(numFormat);
7100
7162
  const percentFormatter = createNumFormatter({
@@ -7182,78 +7244,22 @@
7182
7244
  const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed;
7183
7245
  const config = advancedVSeed.config?.[chartType]?.yAxis ?? {};
7184
7246
  if (!result.axes) result.axes = [];
7185
- const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange } = config;
7186
- const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
7247
+ const { labelAutoLimitLength = 80 } = config;
7187
7248
  const onlyMeasureId = 0 === (encoding.y || []).filter((v)=>v !== MeasureId).length;
7188
- const bandAxis = {
7189
- visible,
7190
- type: 'band',
7191
- orient: 'left',
7192
- maxWidth: labelAutoLimitLength + 60,
7193
- sampling,
7194
- hover: true,
7195
- label: {
7196
- visible: label?.visible,
7197
- flush: true,
7198
- containerAlign: 'right',
7199
- space: 8,
7200
- style: {
7201
- maxLineWidth: labelAutoLimitLength,
7202
- fill: label?.labelColor,
7203
- angle: label?.labelAngle,
7204
- fontSize: label?.labelFontSize,
7205
- fontWeight: label?.labelFontWeight
7206
- },
7207
- minGap: labelAutoHideGap,
7208
- autoHide: labelAutoHide,
7209
- autoHideMethod: 'greedy',
7210
- autoHideSeparation: labelAutoHideGap,
7211
- autoLimit: labelAutoLimit,
7212
- autoRotate: labelAutoRotate,
7213
- autoRotateAngle: labelAutoRotateAngleRange,
7214
- lastVisible: true
7215
- },
7216
- title: {
7217
- visible: title?.visible,
7218
- text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y),
7219
- style: {
7220
- fill: title?.titleColor,
7221
- fontSize: title?.titleFontSize,
7222
- fontWeight: title?.titleFontWeight
7223
- }
7224
- },
7225
- tick: {
7226
- visible: tick?.visible,
7227
- tickSize: tick?.tickSize,
7228
- inside: tick?.tickInside,
7229
- style: {
7230
- stroke: tick?.tickColor
7231
- }
7232
- },
7233
- grid: {
7234
- visible: grid?.visible,
7235
- style: {
7236
- lineWidth: grid?.gridWidth,
7237
- stroke: grid?.gridColor,
7238
- lineDash: grid?.gridLineDash
7239
- }
7240
- },
7241
- domainLine: {
7242
- visible: line?.visible,
7243
- style: {
7244
- lineWidth: line?.lineWidth,
7245
- stroke: line?.lineColor
7246
- }
7247
- },
7248
- paddingInner: [
7249
- 0.15,
7250
- 0.1
7251
- ],
7252
- paddingOuter: [
7253
- 0.075,
7254
- 0.1
7255
- ]
7256
- };
7249
+ const bandAxis = bandAxisStyle(config);
7250
+ bandAxis.type = 'band';
7251
+ bandAxis.orient = 'left';
7252
+ bandAxis.maxWidth = labelAutoLimitLength + 60;
7253
+ if (bandAxis.label) bandAxis.label.containerAlign = 'right';
7254
+ bandAxis.paddingInner = [
7255
+ 0.15,
7256
+ 0.1
7257
+ ];
7258
+ bandAxis.paddingOuter = [
7259
+ 0.075,
7260
+ 0.1
7261
+ ];
7262
+ if (common_isNull(bandAxis.title?.text)) bandAxis.title.text = defaultTitleText(measures, dimensions, encoding.y);
7257
7263
  if (onlyMeasureId && bandAxis.label) {
7258
7264
  const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
7259
7265
  const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
@@ -8247,7 +8253,7 @@
8247
8253
  ...spec,
8248
8254
  data: {
8249
8255
  id,
8250
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
8256
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
8251
8257
  fields: fields
8252
8258
  }
8253
8259
  };
@@ -8308,7 +8314,8 @@
8308
8314
  },
8309
8315
  dimension: {
8310
8316
  visible: false
8311
- }
8317
+ },
8318
+ updateElement: updateTooltipElement
8312
8319
  };
8313
8320
  return result;
8314
8321
  };
@@ -8421,37 +8428,56 @@
8421
8428
  const t = 1 - uu * uu * uu;
8422
8429
  return t * t * t;
8423
8430
  }
8431
+ function stratifiedSample(sortedData, maxSamples) {
8432
+ const n = sortedData.length;
8433
+ if (n <= maxSamples) return sortedData;
8434
+ const sampled = [], step = n / maxSamples;
8435
+ for(let i = 0; i < maxSamples; i++){
8436
+ const idx = Math.min(Math.floor(i * step), n - 1);
8437
+ sampled.push(sortedData[idx]);
8438
+ }
8439
+ return sampled;
8440
+ }
8424
8441
  function regressionLowess(data, x = (d)=>d.x, y = (d)=>d.y, options = {}) {
8425
8442
  var _a;
8426
- const span = options.span || .3, degree = 0 === options.degree ? 0 : 1, alpha = null != (_a = null == options ? void 0 : options.alpha) ? _a : .05, iterations = null == options.iterations ? 2 : options.iterations, ptsX = [], ptsY = [];
8443
+ const span = options.span || .3, degree = 0 === options.degree ? 0 : 1, alpha = null != (_a = options.alpha) ? _a : .05, iterations = null == options.iterations ? 2 : options.iterations, maxSamples = options.maxSamples || 1e3, rawPoints = [];
8427
8444
  visitPoints(data, x, y, (dx, dy)=>{
8428
- ptsX.push(dx), ptsY.push(dy);
8429
- });
8430
- const n = ptsX.length;
8445
+ rawPoints.push({
8446
+ x: dx,
8447
+ y: dy
8448
+ });
8449
+ }), rawPoints.sort((a, b)=>a.x - b.x);
8450
+ const sampledPoints = stratifiedSample(rawPoints, maxSamples), n = sampledPoints.length, ptsX = new Array(n), ptsY = new Array(n);
8451
+ for(let i = 0; i < n; i++)ptsX[i] = sampledPoints[i].x, ptsY[i] = sampledPoints[i].y;
8431
8452
  function predictSingle(x0, robustWeights) {
8432
8453
  if (0 === n) return 0;
8433
- const dists = [];
8434
- for(let i = 0; i < n; i++)dists.push({
8435
- idx: i,
8436
- dist: Math.abs(ptsX[i] - x0)
8437
- });
8438
- dists.sort((a, b)=>a.dist - b.dist);
8439
- const m = Math.max(2, Math.min(n, Math.floor(span * n))), maxDist = dists[m - 1].dist || 0, w = new Array(m);
8454
+ let left = 0, right = n;
8455
+ for(; left < right;){
8456
+ const mid = left + right >> 1;
8457
+ ptsX[mid] < x0 ? left = mid + 1 : right = mid;
8458
+ }
8459
+ const m = Math.max(2, Math.min(n, Math.floor(span * n))), start = Math.max(0, left - Math.floor(m / 2)), end = Math.min(n, start + m), actualStart = Math.max(0, end - m);
8460
+ let maxDist = 0;
8461
+ const windowSize = end - actualStart, distances = new Array(windowSize);
8462
+ for(let i = actualStart; i < end; i++){
8463
+ const dist = Math.abs(ptsX[i] - x0);
8464
+ distances[i - actualStart] = dist, dist > maxDist && (maxDist = dist);
8465
+ }
8440
8466
  let sumw = 0;
8441
- for(let i = 0; i < m; i++){
8442
- const idx = dists[i].idx;
8443
- let wi = tricube(0 === maxDist ? 0 : dists[i].dist / maxDist);
8444
- robustWeights && null != robustWeights[idx] && (wi *= robustWeights[idx]), w[i] = wi, sumw += wi;
8467
+ const w = new Array(windowSize);
8468
+ for(let i = 0; i < windowSize; i++){
8469
+ let wi = tricube(0 === maxDist ? 0 : distances[i] / maxDist);
8470
+ robustWeights && null != robustWeights[actualStart + i] && (wi *= robustWeights[actualStart + i]), w[i] = wi, sumw += wi;
8445
8471
  }
8446
- if (0 === sumw) return ptsY[dists[0].idx];
8472
+ if (0 === sumw) return ptsY[left < n ? left : n - 1];
8447
8473
  if (0 === degree) {
8448
8474
  let s = 0;
8449
- for(let i = 0; i < m; i++)s += w[i] * ptsY[dists[i].idx];
8475
+ for(let i = 0; i < w.length; i++)s += w[i] * ptsY[actualStart + i];
8450
8476
  return s / sumw;
8451
8477
  }
8452
8478
  let sw = 0, sx = 0, sy = 0, sxx = 0, sxy = 0;
8453
- for(let i = 0; i < m; i++){
8454
- const idx = dists[i].idx, xi = ptsX[idx], yi = ptsY[idx], wi = w[i];
8479
+ for(let i = actualStart; i < end; i++){
8480
+ const idx = i - actualStart, xi = ptsX[i], yi = ptsY[i], wi = w[idx];
8455
8481
  sw += wi, sx += wi * xi, sy += wi * yi, sxx += wi * xi * xi, sxy += wi * xi * yi;
8456
8482
  }
8457
8483
  const meanX = sx / sw, meanY = sy / sw, denom = sxx - sx * meanX, slope = Math.abs(denom) < 1e-12 ? 0 : (sxy - sx * meanY) / denom;
@@ -8459,8 +8485,8 @@
8459
8485
  }
8460
8486
  function predict(x0) {
8461
8487
  if (Array.isArray(x0)) {
8462
- const out = [];
8463
- for(let i = 0; i < x0.length; i++)out.push(predictSingle(x0[i]));
8488
+ const len = x0.length, out = new Array(len);
8489
+ for(let i = 0; i < len; i++)out[i] = predictSingle(x0[i]);
8464
8490
  return out;
8465
8491
  }
8466
8492
  return predictSingle(x0);
@@ -8469,26 +8495,23 @@
8469
8495
  predict: predict,
8470
8496
  evaluate: predict,
8471
8497
  evaluateGrid: function(N) {
8472
- const out = [];
8473
- if (N <= 0) return out;
8474
- if (0 === n) return out;
8475
- let min = 1 / 0, max = -1 / 0;
8476
- for(let i = 0; i < n; i++)ptsX[i] < min && (min = ptsX[i]), ptsX[i] > max && (max = ptsX[i]);
8498
+ if (N <= 0) return [];
8499
+ if (0 === n) return [];
8500
+ const out = new Array(N), min = ptsX[0], max = ptsX[n - 1];
8477
8501
  if (min === max) {
8478
8502
  const v = predictSingle(min);
8479
- for(let i = 0; i < N; i++)out.push({
8503
+ for(let i = 0; i < N; i++)out[i] = {
8480
8504
  x: min,
8481
8505
  y: v
8482
- });
8506
+ };
8483
8507
  return out;
8484
8508
  }
8485
8509
  const step = (max - min) / (N - 1);
8486
8510
  let robustWeights;
8487
- for(let iter = 0; iter < iterations; iter++){
8488
- const fits = [];
8489
- for(let i = 0; i < n; i++)fits.push(predictSingle(ptsX[i], robustWeights));
8490
- const res = [];
8491
- for(let i = 0; i < n; i++)res.push(Math.abs(ptsY[i] - fits[i]));
8511
+ const effectiveIterations = null != options.iterations ? iterations : n > 500 ? 0 : iterations;
8512
+ if (effectiveIterations > 0) for(let iter = 0; iter < effectiveIterations; iter++){
8513
+ const fits = new Array(n), res = new Array(n);
8514
+ for(let i = 0; i < n; i++)fits[i] = predictSingle(ptsX[i], robustWeights), res[i] = Math.abs(ptsY[i] - fits[i]);
8492
8515
  const med = res.slice().sort((a, b)=>a - b)[Math.floor(n / 2)] || 0;
8493
8516
  robustWeights = new Array(n);
8494
8517
  for(let i = 0; i < n; i++){
@@ -8498,10 +8521,10 @@
8498
8521
  }
8499
8522
  for(let i = 0; i < N; i++){
8500
8523
  const px = i === N - 1 ? max : min + step * i;
8501
- out.push({
8524
+ out[i] = {
8502
8525
  x: px,
8503
8526
  y: predictSingle(px, robustWeights)
8504
- });
8527
+ };
8505
8528
  }
8506
8529
  return out;
8507
8530
  },
@@ -8509,9 +8532,8 @@
8509
8532
  const out = [];
8510
8533
  if (N <= 0) return out;
8511
8534
  if (0 === n) return out;
8512
- let min = 1 / 0, max = -1 / 0;
8513
- for(let i = 0; i < n; i++)ptsX[i] < min && (min = ptsX[i]), ptsX[i] > max && (max = ptsX[i]);
8514
- if (min === 1 / 0 || max === -1 / 0) return out;
8535
+ const min = ptsX[0], max = ptsX[n - 1];
8536
+ if (void 0 === min || void 0 === max || min === 1 / 0 || max === -1 / 0) return out;
8515
8537
  const comps = computeLinearCIComponents(data, x, y, (xx)=>predictSingle(xx));
8516
8538
  if (0 === comps.n) return out;
8517
8539
  const z = Math.abs(invNorm(1 - alpha / 2));
@@ -9341,6 +9363,10 @@
9341
9363
  result.animation = true;
9342
9364
  return result;
9343
9365
  };
9366
+ const DEFAULT_DUAL_CHART_TYPE = {
9367
+ primary: 'column',
9368
+ secondary: 'line'
9369
+ };
9344
9370
  const dualChartTypePrimary = (spec, context)=>{
9345
9371
  const result = {
9346
9372
  ...spec,
@@ -9350,12 +9376,9 @@
9350
9376
  const { chartType } = vseed;
9351
9377
  const { datasetReshapeInfo } = advancedVSeed;
9352
9378
  const index = datasetReshapeInfo[0].index;
9353
- const config = advancedVSeed.config?.[chartType]?.dualChartType || {
9354
- primary: 'column',
9355
- secondary: 'line'
9356
- };
9357
- const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
9358
- const secondary = Array.isArray(config) ? config[index].secondary || config[0].secondary : config.secondary;
9379
+ const config = advancedVSeed.config?.[chartType]?.dualChartType || DEFAULT_DUAL_CHART_TYPE;
9380
+ const primary = (Array.isArray(config) ? config[index]?.primary || config[0]?.primary : config.primary) ?? DEFAULT_DUAL_CHART_TYPE.primary;
9381
+ const secondary = (Array.isArray(config) ? config[index]?.secondary || config[0]?.secondary : config.secondary) ?? DEFAULT_DUAL_CHART_TYPE.secondary;
9359
9382
  const bothColumn = 'column' === primary && 'column' === secondary;
9360
9383
  const type = bothColumn ? 'columnParallel' : primary;
9361
9384
  switch(type){
@@ -9406,13 +9429,10 @@
9406
9429
  const { advancedVSeed, vseed } = context;
9407
9430
  const { chartType } = vseed;
9408
9431
  const { datasetReshapeInfo } = advancedVSeed;
9409
- const config = advancedVSeed.config?.[chartType]?.dualChartType || {
9410
- primary: 'column',
9411
- secondary: 'line'
9412
- };
9432
+ const config = advancedVSeed.config?.[chartType]?.dualChartType || DEFAULT_DUAL_CHART_TYPE;
9413
9433
  const index = datasetReshapeInfo[0].index;
9414
- const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
9415
- const secondary = Array.isArray(config) ? config[index].secondary || config[0].secondary : config.secondary;
9434
+ const primary = (Array.isArray(config) ? config[index]?.primary || config[0]?.primary : config.primary) ?? DEFAULT_DUAL_CHART_TYPE.primary;
9435
+ const secondary = (Array.isArray(config) ? config[index]?.secondary || config[0]?.secondary : config.secondary) ?? DEFAULT_DUAL_CHART_TYPE.secondary;
9416
9436
  const bothColumn = 'column' === primary && 'column' === secondary;
9417
9437
  const type = bothColumn ? 'columnParallel' : secondary;
9418
9438
  switch(type){
@@ -9451,7 +9471,7 @@
9451
9471
  result.type = 'scatter';
9452
9472
  break;
9453
9473
  default:
9454
- result.type = secondary;
9474
+ result.type = secondary ?? DEFAULT_DUAL_CHART_TYPE.secondary;
9455
9475
  }
9456
9476
  return result;
9457
9477
  };
@@ -9490,7 +9510,7 @@
9490
9510
  ...spec,
9491
9511
  data: {
9492
9512
  id: `${id}-primary-dataset`,
9493
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
9513
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
9494
9514
  fields: fields
9495
9515
  }
9496
9516
  };
@@ -9530,7 +9550,7 @@
9530
9550
  ...spec,
9531
9551
  data: {
9532
9552
  id: `${id}-secondary-dataset`,
9533
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
9553
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
9534
9554
  fields: fields
9535
9555
  }
9536
9556
  };
@@ -9637,7 +9657,8 @@
9637
9657
  enable: true
9638
9658
  } } = baseConfig;
9639
9659
  result.tooltip = {
9640
- style: getTooltipStyle(tooltip)
9660
+ style: getTooltipStyle(tooltip),
9661
+ updateElement: updateTooltipElement
9641
9662
  };
9642
9663
  return result;
9643
9664
  };
@@ -11235,6 +11256,26 @@
11235
11256
  markStyle_markStyle,
11236
11257
  annotation_annotation
11237
11258
  ];
11259
+ const heatmapBandAxis = (spec, context)=>{
11260
+ const result = {
11261
+ ...spec
11262
+ };
11263
+ const { advancedVSeed, vseed } = context;
11264
+ const { chartType } = vseed;
11265
+ const xAxisConfig = advancedVSeed.config?.[chartType]?.xAxis ?? {};
11266
+ const yAxisConfig = advancedVSeed.config?.[chartType]?.yAxis ?? {};
11267
+ const xBandAxis = bandAxisStyle(xAxisConfig);
11268
+ const yBandAxis = bandAxisStyle(yAxisConfig);
11269
+ xBandAxis.orient = 'bottom';
11270
+ xBandAxis.bandPadding = 0;
11271
+ yBandAxis.orient = 'left';
11272
+ yBandAxis.bandPadding = 0;
11273
+ result.axes = [
11274
+ xBandAxis,
11275
+ yBandAxis
11276
+ ];
11277
+ return result;
11278
+ };
11238
11279
  const heatmapColorLegend = (spec, context)=>{
11239
11280
  const result = colorLegend(spec, context);
11240
11281
  if (result.legends) result.legends.customFilter = (data, range, key)=>{
@@ -11307,7 +11348,8 @@
11307
11348
  },
11308
11349
  dimension: {
11309
11350
  visible: false
11310
- }
11351
+ },
11352
+ updateElement: updateTooltipElement
11311
11353
  };
11312
11354
  return result;
11313
11355
  };
@@ -11388,18 +11430,6 @@
11388
11430
  result.seriesField = unfoldInfo.encodingColorId;
11389
11431
  result.valueField = foldInfo.measureValue;
11390
11432
  result.padding = 0;
11391
- result.axes = [
11392
- {
11393
- type: 'band',
11394
- orient: 'left',
11395
- bandPadding: 0
11396
- },
11397
- {
11398
- type: 'band',
11399
- orient: 'bottom',
11400
- bandPadding: 0
11401
- }
11402
- ];
11403
11433
  result.region = [
11404
11434
  {
11405
11435
  clip: true
@@ -11414,6 +11444,7 @@
11414
11444
  datasetXY,
11415
11445
  colorAdapter(color_color, linearColor),
11416
11446
  label_label,
11447
+ heatmapBandAxis,
11417
11448
  colorAdapter(discreteLegend, heatmapColorLegend),
11418
11449
  colorCellStyleFill(markStyle_cellStyle_cellStyle),
11419
11450
  tooltipHeatmap,
@@ -11433,6 +11464,7 @@
11433
11464
  datasetXY,
11434
11465
  colorAdapter(color_color, linearColor),
11435
11466
  label_label,
11467
+ heatmapBandAxis,
11436
11468
  tooltipHeatmap,
11437
11469
  colorCellStyleFill(markStyle_cellStyle_cellStyle),
11438
11470
  annotationPoint_annotationPoint,
@@ -11692,6 +11724,10 @@
11692
11724
  measures
11693
11725
  };
11694
11726
  };
11727
+ const revisedBoxPlotFieldKey = (fieldKey, groupId, isPivotChart = true)=>{
11728
+ if (!isPivotChart) return fieldKey;
11729
+ return `${BoxPlotPivotIndicator}_${groupId}_${fieldKey}`;
11730
+ };
11695
11731
  const pivotReshapeWithBoxplotEncoding = (advancedVSeed, context)=>{
11696
11732
  const result = {
11697
11733
  ...advancedVSeed
@@ -11743,6 +11779,12 @@
11743
11779
  boxPlotData.forEach((datum)=>{
11744
11780
  datum[FoldMeasureId] = f;
11745
11781
  datum[FoldMeasureName] = m?.alias ?? f;
11782
+ datum[revisedBoxPlotFieldKey("__Q1__", groupId)] = datum["__Q1__"];
11783
+ datum[revisedBoxPlotFieldKey("__Q3__", groupId)] = datum["__Q3__"];
11784
+ datum[revisedBoxPlotFieldKey(LowerWhisker, groupId)] = datum[LowerWhisker];
11785
+ datum[revisedBoxPlotFieldKey(UpperWhisker, groupId)] = datum[UpperWhisker];
11786
+ datum[revisedBoxPlotFieldKey(MedianMeasureId, groupId)] = datum[MedianMeasureId];
11787
+ datum[revisedBoxPlotFieldKey(OutliersMeasureId, groupId)] = datum[OutliersMeasureId];
11746
11788
  });
11747
11789
  boxPlotDataList.push(...boxPlotData);
11748
11790
  });
@@ -11763,10 +11805,15 @@
11763
11805
  });
11764
11806
  res.dataset.forEach((datum)=>{
11765
11807
  datum[UpperWhisker] = datum[encoding.max[0]];
11808
+ datum[revisedBoxPlotFieldKey("__Q1__", groupId)] = datum[encoding.max[0]];
11766
11809
  datum[LowerWhisker] = datum[encoding.min[0]];
11810
+ datum[revisedBoxPlotFieldKey(LowerWhisker, groupId)] = datum[encoding.min[0]];
11767
11811
  datum["__Q1__"] = datum[encoding.q1[0]];
11812
+ datum[revisedBoxPlotFieldKey("__Q1__", groupId)] = datum[encoding.q1[0]];
11768
11813
  datum["__Q3__"] = datum[encoding.q3[0]];
11814
+ datum[revisedBoxPlotFieldKey("__Q3__", groupId)] = datum[encoding.q3[0]];
11769
11815
  datum[MedianMeasureId] = datum[encoding.median[0]];
11816
+ datum[revisedBoxPlotFieldKey(MedianMeasureId, groupId)] = datum[encoding.median[0]];
11770
11817
  });
11771
11818
  newDatasets = res.dataset;
11772
11819
  foldInfo = {};
@@ -11820,16 +11867,17 @@
11820
11867
  const result = {
11821
11868
  ...spec
11822
11869
  };
11823
- const { advancedVSeed } = context;
11870
+ const { advancedVSeed, vseed } = context;
11824
11871
  const { datasetReshapeInfo, encoding } = advancedVSeed;
11825
- const { unfoldInfo } = datasetReshapeInfo[0];
11872
+ const { unfoldInfo, id } = datasetReshapeInfo[0];
11873
+ const usePivotChart = chatType_isPivotChart(vseed);
11826
11874
  result.type = 'boxPlot';
11827
- result.minField = LowerWhisker;
11828
- result.maxField = UpperWhisker;
11829
- result.q1Field = "__Q1__";
11830
- result.medianField = MedianMeasureId;
11831
- result.q3Field = "__Q3__";
11832
- result.outliersField = OutliersMeasureId;
11875
+ result.minField = revisedBoxPlotFieldKey(LowerWhisker, id, usePivotChart);
11876
+ result.maxField = revisedBoxPlotFieldKey(UpperWhisker, id, usePivotChart);
11877
+ result.q1Field = revisedBoxPlotFieldKey("__Q1__", id, usePivotChart);
11878
+ result.medianField = revisedBoxPlotFieldKey(MedianMeasureId, id, usePivotChart);
11879
+ result.q3Field = revisedBoxPlotFieldKey("__Q3__", id, usePivotChart);
11880
+ result.outliersField = revisedBoxPlotFieldKey(OutliersMeasureId, id, usePivotChart);
11833
11881
  result.xField = [
11834
11882
  unfoldInfo.encodingX
11835
11883
  ];
@@ -11877,7 +11925,7 @@
11877
11925
  ...spec,
11878
11926
  data: {
11879
11927
  id,
11880
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
11928
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
11881
11929
  fields: fields
11882
11930
  }
11883
11931
  };
@@ -11949,7 +11997,8 @@
11949
11997
  },
11950
11998
  dimension: {
11951
11999
  visible: false
11952
- }
12000
+ },
12001
+ updateElement: updateTooltipElement
11953
12002
  };
11954
12003
  return result;
11955
12004
  };
@@ -12440,15 +12489,21 @@
12440
12489
  startMin
12441
12490
  ]; startMin <= max;)startMin += stepSize, thresholds.push(startMin);
12442
12491
  } else {
12443
- const bins = options.bins && options.bins > 0 ? Math.floor(options.bins) : 10;
12492
+ let bins = options.bins && options.bins > 0 ? Math.floor(options.bins) : 10;
12444
12493
  if (max - min > 1) {
12445
12494
  const start = Math.floor(min), stepSizeInt = Math.ceil((max - start) / bins);
12446
12495
  thresholds = new Array(bins + 1);
12447
- for(let i = 0; i <= bins; i++)thresholds[i] = start + stepSizeInt * i;
12496
+ for(let i = 0; i <= bins; i++)if (thresholds[i] = start + stepSizeInt * i, thresholds[i] > max) {
12497
+ bins = i, thresholds.length = bins + 1;
12498
+ break;
12499
+ }
12448
12500
  } else {
12449
12501
  const stepSize = (max - min) / bins;
12450
12502
  thresholds = new Array(bins + 1);
12451
- for(let i = 0; i <= bins; i++)thresholds[i] = min + stepSize * i;
12503
+ for(let i = 0; i <= bins; i++)if (thresholds[i] = min + stepSize * i, thresholds[i] > max) {
12504
+ bins = i, thresholds.length = bins + 1;
12505
+ break;
12506
+ }
12452
12507
  }
12453
12508
  }
12454
12509
  const numBins = Math.max(0, thresholds.length - 1);
@@ -12758,7 +12813,7 @@
12758
12813
  ...spec,
12759
12814
  data: {
12760
12815
  id,
12761
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
12816
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
12762
12817
  fields: fields
12763
12818
  }
12764
12819
  };
@@ -12802,7 +12857,8 @@
12802
12857
  visible: false
12803
12858
  },
12804
12859
  content: tooltipHistogram_createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter, defaultValueFormatter)
12805
- }
12860
+ },
12861
+ updateElement: updateMarkTooltipElement
12806
12862
  };
12807
12863
  return result;
12808
12864
  };
@@ -13421,6 +13477,18 @@
13421
13477
  pagerIconColor: '#89909D',
13422
13478
  pagerIconDisableColor: '#F1F2F5'
13423
13479
  });
13480
+ const getDarkColorLegend = ()=>({
13481
+ ...getDefaultLegend(),
13482
+ labelColor: '#BBBDC3',
13483
+ railBackgroundColor: '#404349',
13484
+ handlerBorderColor: '#4B4F54'
13485
+ });
13486
+ const getLightColorLegend = ()=>({
13487
+ ...getDefaultLegend(),
13488
+ labelColor: '#606773',
13489
+ handlerBorderColor: '#fff',
13490
+ railBackgroundColor: '#f1f3f4'
13491
+ });
13424
13492
  const getDefaultTableConfig = ()=>({
13425
13493
  bodyFontSize: 12,
13426
13494
  bodyBackgroundColor: 'transparent',
@@ -13482,7 +13550,7 @@
13482
13550
  enable: true,
13483
13551
  borderRadius: 12,
13484
13552
  borderWidth: 1,
13485
- padding: 7,
13553
+ padding: 9,
13486
13554
  lineHeight: 12,
13487
13555
  fontSize: 12,
13488
13556
  lineSpace: 6
@@ -14099,6 +14167,9 @@
14099
14167
  },
14100
14168
  heatmap: {
14101
14169
  ...baseConfig,
14170
+ legend: getLightColorLegend(),
14171
+ xAxis: bandAxis,
14172
+ yAxis: bandAxis,
14102
14173
  label: {
14103
14174
  ...baseConfig.label,
14104
14175
  labelColorSmartInvert: true
@@ -14364,6 +14435,9 @@
14364
14435
  },
14365
14436
  heatmap: {
14366
14437
  ...baseConfig,
14438
+ legend: getDarkColorLegend(),
14439
+ xAxis: bandAxis,
14440
+ yAxis: bandAxis,
14367
14441
  label: {
14368
14442
  ...baseConfig.label,
14369
14443
  labelColorSmartInvert: true
@@ -18130,61 +18204,68 @@
18130
18204
  const zLinearColor = schemas_object({
18131
18205
  linearColorScheme: schemas_array(schemas_string()).nullish()
18132
18206
  });
18207
+ const zMeasureSelector = schemas_object({
18208
+ field: schemas_string(),
18209
+ operator: schemas_enum([
18210
+ '=',
18211
+ '==',
18212
+ '!=',
18213
+ '>',
18214
+ '<',
18215
+ '>=',
18216
+ '<=',
18217
+ 'between'
18218
+ ]).nullish(),
18219
+ op: schemas_enum([
18220
+ '=',
18221
+ '==',
18222
+ '!=',
18223
+ '>',
18224
+ '<',
18225
+ '>=',
18226
+ '<=',
18227
+ 'between'
18228
+ ]).nullish(),
18229
+ value: union([
18230
+ schemas_string(),
18231
+ schemas_number(),
18232
+ schemas_array(union([
18233
+ schemas_string(),
18234
+ schemas_number()
18235
+ ]))
18236
+ ])
18237
+ });
18238
+ const zDimensionSelector = schemas_object({
18239
+ field: schemas_string(),
18240
+ operator: schemas_enum([
18241
+ 'in',
18242
+ 'not in'
18243
+ ]).nullish(),
18244
+ op: schemas_enum([
18245
+ 'in',
18246
+ 'not in'
18247
+ ]).nullish(),
18248
+ value: union([
18249
+ schemas_string(),
18250
+ schemas_number(),
18251
+ schemas_array(union([
18252
+ schemas_string(),
18253
+ schemas_number()
18254
+ ]))
18255
+ ])
18256
+ });
18133
18257
  const zSelector = union([
18134
18258
  schemas_string(),
18135
18259
  schemas_number(),
18136
- schemas_object({
18137
- field: schemas_string(),
18138
- operator: schemas_enum([
18139
- '=',
18140
- '==',
18141
- '!=',
18142
- '>',
18143
- '<',
18144
- '>=',
18145
- '<=',
18146
- 'between'
18147
- ]).nullish(),
18148
- op: schemas_enum([
18149
- '=',
18150
- '==',
18151
- '!=',
18152
- '>',
18153
- '<',
18154
- '>=',
18155
- '<=',
18156
- 'between'
18157
- ]).nullish(),
18158
- value: union([
18159
- schemas_string(),
18160
- schemas_number(),
18161
- schemas_array(union([
18162
- schemas_string(),
18163
- schemas_number()
18164
- ]))
18165
- ])
18166
- }),
18167
- schemas_object({
18168
- field: schemas_string(),
18169
- operator: schemas_enum([
18170
- 'in',
18171
- 'not in'
18172
- ]).nullish(),
18173
- op: schemas_enum([
18174
- 'in',
18175
- 'not in'
18176
- ]).nullish(),
18177
- value: union([
18178
- schemas_string(),
18179
- schemas_number(),
18180
- schemas_array(union([
18181
- schemas_string(),
18182
- schemas_number()
18183
- ]))
18184
- ])
18185
- })
18260
+ zMeasureSelector,
18261
+ zDimensionSelector
18186
18262
  ]);
18187
18263
  const zSelectors = schemas_array(zSelector);
18264
+ const zAreaSelector = union([
18265
+ zMeasureSelector,
18266
+ zDimensionSelector
18267
+ ]);
18268
+ const zAreaSelectors = schemas_array(zAreaSelector);
18188
18269
  const zLabel = schemas_object({
18189
18270
  enable: schemas_boolean().nullish(),
18190
18271
  wrap: schemas_boolean().nullish(),
@@ -18255,9 +18336,9 @@
18255
18336
  'bl',
18256
18337
  'br'
18257
18338
  ]).default('bottom').nullish(),
18258
- labelColor: schemas_string().default('#fff').nullish(),
18259
18339
  pagerIconColor: schemas_string().nullish(),
18260
18340
  pagerIconDisableColor: schemas_string().nullish(),
18341
+ labelColor: schemas_string().default('#fff').nullish(),
18261
18342
  labelFontSize: schemas_number().default(12).nullish(),
18262
18343
  labelFontWeight: schemas_number().or(schemas_string()).default(400).nullish()
18263
18344
  });
@@ -18284,7 +18365,12 @@
18284
18365
  'bl',
18285
18366
  'br'
18286
18367
  ]).default('bottom').nullish(),
18287
- enable: schemas_boolean().default(true).nullish()
18368
+ enable: schemas_boolean().default(true).nullish(),
18369
+ railBackgroundColor: schemas_string().nullish(),
18370
+ handlerBorderColor: schemas_string().nullish(),
18371
+ labelColor: schemas_string().default('#fff').nullish(),
18372
+ labelFontSize: schemas_number().default(12).nullish(),
18373
+ labelFontWeight: schemas_number().or(schemas_string()).default(400).nullish()
18288
18374
  });
18289
18375
  const zTooltip = schemas_object({
18290
18376
  enable: schemas_boolean().default(true).nullish(),
@@ -18329,10 +18415,6 @@
18329
18415
  offsetX: schemas_number().default(0).nullish()
18330
18416
  });
18331
18417
  const zAnnotationHorizontalLine = schemas_object({
18332
- selector: union([
18333
- zSelector,
18334
- zSelectors
18335
- ]).nullish(),
18336
18418
  yValue: union([
18337
18419
  schemas_number(),
18338
18420
  schemas_string(),
@@ -18380,8 +18462,8 @@
18380
18462
  });
18381
18463
  const zAnnotationArea = schemas_object({
18382
18464
  selector: union([
18383
- zSelector,
18384
- zSelectors
18465
+ zAreaSelector,
18466
+ zAreaSelectors
18385
18467
  ]).nullish(),
18386
18468
  textPosition: schemas_enum([
18387
18469
  'top',
@@ -18676,9 +18758,11 @@
18676
18758
  label: zLabel.nullish(),
18677
18759
  color: zColor.nullish(),
18678
18760
  tooltip: zTooltip.nullish(),
18679
- legend: zLegend.nullish(),
18761
+ legend: zColorLegend.nullish(),
18680
18762
  pivotGrid: zPivotChartGridConfig.nullish(),
18681
- cell: zHeatmapCell.nullish()
18763
+ cell: zHeatmapCell.nullish(),
18764
+ xAxis: zXBandAxis.nullish(),
18765
+ yAxis: zYBandAxis.nullish()
18682
18766
  });
18683
18767
  const zPivotTableConfig = zTableConfig;
18684
18768
  const zWhiskersConfig = schemas_number().or(schemas_array(schemas_number())).default(1.5);
@@ -18854,10 +18938,6 @@
18854
18938
  outlierStyle: zOutlierStyle.or(schemas_array(zOutlierStyle)).nullish()
18855
18939
  });
18856
18940
  const zAnnotationVerticalLine = schemas_object({
18857
- selector: union([
18858
- zSelector,
18859
- zSelectors
18860
- ]).nullish(),
18861
18941
  xValue: union([
18862
18942
  schemas_number(),
18863
18943
  schemas_string(),