@visactor/vseed 0.2.1 → 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 (196) 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/builder/register/all.js +2 -2
  9. package/dist/esm/builder/register/all.js.map +1 -1
  10. package/dist/esm/builder/register/chartType/boxplot.d.ts +1 -1
  11. package/dist/esm/builder/register/chartType/boxplot.js +2 -2
  12. package/dist/esm/builder/register/chartType/boxplot.js.map +1 -1
  13. package/dist/esm/builder/register/chartType/index.d.ts +1 -1
  14. package/dist/esm/builder/register/chartType/index.js +2 -2
  15. package/dist/esm/dataReshape/constant.d.ts +1 -0
  16. package/dist/esm/dataReshape/constant.js +2 -1
  17. package/dist/esm/dataReshape/constant.js.map +1 -1
  18. package/dist/esm/i18n/i18n.js +1 -4
  19. package/dist/esm/i18n/i18n.js.map +1 -1
  20. package/dist/esm/index.d.ts +1 -1
  21. package/dist/esm/index.js +2 -2
  22. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +17 -0
  23. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
  24. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +12 -0
  25. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
  26. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js +3 -1
  27. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js.map +1 -1
  28. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +3 -3
  29. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
  30. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js +4 -12
  31. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
  32. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js +3 -76
  33. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
  34. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.d.ts +6 -0
  35. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js +95 -0
  36. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js.map +1 -0
  37. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js +16 -84
  38. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js.map +1 -1
  39. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.d.ts +2 -0
  40. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.js +23 -0
  41. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.js.map +1 -0
  42. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js +4 -12
  43. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
  44. package/dist/esm/pipeline/spec/chart/pipes/annotation/index.d.ts +1 -0
  45. package/dist/esm/pipeline/spec/chart/pipes/annotation/index.js +2 -1
  46. package/dist/esm/pipeline/spec/chart/pipes/axes/axisStyle.d.ts +3 -0
  47. package/dist/esm/pipeline/spec/chart/pipes/axes/axisStyle.js +65 -0
  48. package/dist/esm/pipeline/spec/chart/pipes/axes/axisStyle.js.map +1 -0
  49. package/dist/esm/pipeline/spec/chart/pipes/axes/heatmapBandAxis.d.ts +2 -0
  50. package/dist/esm/pipeline/spec/chart/pipes/axes/heatmapBandAxis.js +24 -0
  51. package/dist/esm/pipeline/spec/chart/pipes/axes/heatmapBandAxis.js.map +1 -0
  52. package/dist/esm/pipeline/spec/chart/pipes/axes/index.d.ts +1 -0
  53. package/dist/esm/pipeline/spec/chart/pipes/axes/index.js +2 -1
  54. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +15 -72
  55. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
  56. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +17 -73
  57. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
  58. package/dist/esm/pipeline/spec/chart/pipes/dual/dualChartType.js +11 -13
  59. package/dist/esm/pipeline/spec/chart/pipes/dual/dualChartType.js.map +1 -1
  60. package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js +10 -8
  61. package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js.map +1 -1
  62. package/dist/esm/pipeline/spec/chart/pipes/init/heatmap.js +0 -12
  63. package/dist/esm/pipeline/spec/chart/pipes/init/heatmap.js.map +1 -1
  64. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +1 -1
  65. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  66. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js +13 -1
  67. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js.map +1 -1
  68. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js +2 -2
  69. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js.map +1 -1
  70. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js +3 -1
  71. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js.map +1 -1
  72. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +3 -1
  73. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
  74. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +3 -1
  75. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
  76. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipElement.d.ts +2 -0
  77. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipElement.js +58 -0
  78. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipElement.js.map +1 -0
  79. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js +3 -1
  80. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js.map +1 -1
  81. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +11 -8
  82. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -1
  83. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js +3 -1
  84. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
  85. package/dist/esm/pipeline/spec/chart/utils/histogram.d.ts +1 -0
  86. package/dist/esm/pipeline/spec/chart/utils/histogram.js +6 -2
  87. package/dist/esm/pipeline/spec/chart/utils/histogram.js.map +1 -1
  88. package/dist/esm/pipeline/utils/boxplot.d.ts +1 -0
  89. package/dist/esm/pipeline/utils/boxplot.js +8 -0
  90. package/dist/esm/pipeline/utils/boxplot.js.map +1 -0
  91. package/dist/esm/pipeline/utils/index.d.ts +1 -0
  92. package/dist/esm/pipeline/utils/index.js +1 -0
  93. package/dist/esm/theme/common/legend.d.ts +3 -1
  94. package/dist/esm/theme/common/legend.js +13 -1
  95. package/dist/esm/theme/common/legend.js.map +1 -1
  96. package/dist/esm/theme/common/tooltip.js +1 -1
  97. package/dist/esm/theme/common/tooltip.js.map +1 -1
  98. package/dist/esm/theme/dark/dark.js +4 -1
  99. package/dist/esm/theme/dark/dark.js.map +1 -1
  100. package/dist/esm/theme/light/light.js +4 -1
  101. package/dist/esm/theme/light/light.js.map +1 -1
  102. package/dist/esm/types/advancedVSeed.d.ts +252 -420
  103. package/dist/esm/types/chartType/area/area.d.ts +2 -2
  104. package/dist/esm/types/chartType/area/zArea.d.ts +5 -281
  105. package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +3 -5
  106. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +5 -281
  107. package/dist/esm/types/chartType/bar/bar.d.ts +3 -3
  108. package/dist/esm/types/chartType/bar/zBar.d.ts +5 -281
  109. package/dist/esm/types/chartType/barParallel/barParallel.d.ts +3 -3
  110. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +5 -281
  111. package/dist/esm/types/chartType/barPercent/barPercent.d.ts +3 -3
  112. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +5 -281
  113. package/dist/esm/types/chartType/{boxplot/boxplot.d.ts → boxPlot/boxPlot.d.ts} +6 -6
  114. package/dist/esm/types/chartType/boxPlot/index.d.ts +2 -0
  115. package/dist/esm/types/chartType/boxPlot/index.js +1 -0
  116. package/dist/esm/types/chartType/{boxplot/zBoxplot.d.ts → boxPlot/zBoxPlot.d.ts} +6 -282
  117. package/dist/esm/types/chartType/{boxplot/zBoxplot.js → boxPlot/zBoxPlot.js} +3 -3
  118. package/dist/esm/types/chartType/{boxplot/zBoxplot.js.map → boxPlot/zBoxPlot.js.map} +1 -1
  119. package/dist/esm/types/chartType/column/column.d.ts +4 -4
  120. package/dist/esm/types/chartType/column/zColumn.d.ts +7 -283
  121. package/dist/esm/types/chartType/column/zColumn.js +1 -1
  122. package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
  123. package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +3 -5
  124. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +5 -281
  125. package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +3 -3
  126. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +5 -281
  127. package/dist/esm/types/chartType/donut/zDonut.d.ts +1 -1
  128. package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +3 -3
  129. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +5 -281
  130. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +5 -0
  131. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +5 -0
  132. package/dist/esm/types/chartType/histogram/histogram.d.ts +6 -6
  133. package/dist/esm/types/chartType/histogram/zHistogram.d.ts +5 -281
  134. package/dist/esm/types/chartType/index.d.ts +1 -1
  135. package/dist/esm/types/chartType/index.js +1 -1
  136. package/dist/esm/types/chartType/line/line.d.ts +3 -5
  137. package/dist/esm/types/chartType/line/zLine.d.ts +5 -281
  138. package/dist/esm/types/chartType/pie/zPie.d.ts +1 -1
  139. package/dist/esm/types/chartType/pivotTable/pivotTable.d.ts +1 -1
  140. package/dist/esm/types/chartType/radar/zRadar.d.ts +1 -1
  141. package/dist/esm/types/chartType/rose/zRose.d.ts +1 -1
  142. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +1 -1
  143. package/dist/esm/types/chartType/scatter/scatter.d.ts +7 -7
  144. package/dist/esm/types/chartType/scatter/zScatter.d.ts +13 -289
  145. package/dist/esm/types/chartType/scatter/zScatter.js +4 -4
  146. package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
  147. package/dist/esm/types/chartType/table/table.d.ts +1 -1
  148. package/dist/esm/types/dataSelector/selector.d.ts +108 -0
  149. package/dist/esm/types/dataSelector/selector.js +58 -51
  150. package/dist/esm/types/dataSelector/selector.js.map +1 -1
  151. package/dist/esm/types/properties/annotation/annotation.d.ts +4 -280
  152. package/dist/esm/types/properties/annotation/annotationArea.d.ts +2 -2
  153. package/dist/esm/types/properties/annotation/annotationHorizontalLine.d.ts +1 -6
  154. package/dist/esm/types/properties/annotation/annotationVerticalLine.d.ts +0 -5
  155. package/dist/esm/types/properties/annotation/zAnnotationArea.d.ts +2 -2
  156. package/dist/esm/types/properties/annotation/zAnnotationArea.js +3 -3
  157. package/dist/esm/types/properties/annotation/zAnnotationArea.js.map +1 -1
  158. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.d.ts +0 -69
  159. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.js +0 -5
  160. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.js.map +1 -1
  161. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.d.ts +0 -69
  162. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.js +0 -5
  163. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.js.map +1 -1
  164. package/dist/esm/types/properties/config/area.d.ts +2 -2
  165. package/dist/esm/types/properties/config/bar.d.ts +3 -3
  166. package/dist/esm/types/properties/config/boxplot.d.ts +1 -1
  167. package/dist/esm/types/properties/config/column.d.ts +3 -3
  168. package/dist/esm/types/properties/config/config.d.ts +102 -48
  169. package/dist/esm/types/properties/config/dualAxis.d.ts +1 -1
  170. package/dist/esm/types/properties/config/funnel.d.ts +1 -1
  171. package/dist/esm/types/properties/config/heatmap.d.ts +83 -29
  172. package/dist/esm/types/properties/config/heatmap.js +6 -3
  173. package/dist/esm/types/properties/config/heatmap.js.map +1 -1
  174. package/dist/esm/types/properties/config/histogram.d.ts +1 -1
  175. package/dist/esm/types/properties/config/legend/legend.d.ts +10 -2
  176. package/dist/esm/types/properties/config/legend/legend.js +7 -2
  177. package/dist/esm/types/properties/config/legend/legend.js.map +1 -1
  178. package/dist/esm/types/properties/config/line.d.ts +1 -1
  179. package/dist/esm/types/properties/config/pie.d.ts +3 -3
  180. package/dist/esm/types/properties/config/rose.d.ts +2 -2
  181. package/dist/esm/types/properties/config/scatter.d.ts +1 -1
  182. package/dist/esm/types/properties/regressionLine/linearRegressionLine.d.ts +4 -0
  183. package/dist/esm/types/properties/regressionLine/logisticRegressionLine.d.ts +4 -0
  184. package/dist/esm/types/properties/regressionLine/lowessRegressionLine.d.ts +4 -0
  185. package/dist/esm/types/properties/regressionLine/polynomialRegressionLine.d.ts +4 -0
  186. package/dist/esm/types/properties/theme/customTheme.d.ts +204 -96
  187. package/dist/esm/types/vseed.d.ts +2 -2
  188. package/dist/esm/types/zVseed.d.ts +837 -4415
  189. package/dist/esm/types/zVseed.js +2 -2
  190. package/dist/esm/types/zVseed.js.map +1 -1
  191. package/dist/umd/index.js +541 -426
  192. package/dist/umd/index.js.map +1 -1
  193. package/package.json +10 -5
  194. package/dist/esm/types/chartType/boxplot/index.d.ts +0 -2
  195. package/dist/esm/types/chartType/boxplot/index.js +0 -1
  196. /package/dist/esm/types/chartType/{boxplot/boxplot.js → boxPlot/boxPlot.js} +0 -0
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,
@@ -119,7 +120,6 @@
119
120
  ORIGINAL_DATA: ()=>ORIGINAL_DATA,
120
121
  columnAdvancedPipeline: ()=>columnAdvancedPipeline,
121
122
  FoldMeasureId: ()=>FoldMeasureId,
122
- zBoxplot: ()=>zBoxplot,
123
123
  MeasureName: ()=>MeasureName,
124
124
  lightTheme: ()=>lightTheme,
125
125
  zSort: ()=>zSort,
@@ -140,13 +140,14 @@
140
140
  zLinearRegressionLine: ()=>zLinearRegressionLine,
141
141
  createNumFormatter: ()=>createNumFormatter,
142
142
  DEFAULT_PARENT_ID: ()=>DEFAULT_PARENT_ID,
143
- isPivotChart: ()=>isPivotChart,
143
+ isPivotChart: ()=>chatType_isPivotChart,
144
144
  zPolynomialRegressionLine: ()=>zPolynomialRegressionLine,
145
145
  zTableConfig: ()=>zTableConfig,
146
146
  findFirstMeasure: ()=>findFirstMeasure,
147
147
  isValueSelector: ()=>isValueSelector,
148
148
  zFunnel: ()=>zFunnel,
149
149
  zChartType: ()=>zChartType,
150
+ zAreaSelectors: ()=>zAreaSelectors,
150
151
  registerColumnParallel: ()=>registerColumnParallel,
151
152
  isDimensionSelector: ()=>isDimensionSelector,
152
153
  BAND_AXIS_INNER_OFFSET_IN_PIVOT: ()=>2,
@@ -180,6 +181,7 @@
180
181
  registerHistogram: ()=>registerHistogram,
181
182
  Q1MeasureValue: ()=>"__Q1__",
182
183
  lineAdvancedPipeline: ()=>lineAdvancedPipeline,
184
+ zAreaSelector: ()=>zAreaSelector,
183
185
  zRadarConfig: ()=>zRadarConfig,
184
186
  zRoseParallelConfig: ()=>zRoseParallelConfig,
185
187
  isMeasureSelector: ()=>isMeasureSelector,
@@ -209,7 +211,6 @@
209
211
  dualAxisSpecPipeline: ()=>dualAxisSpecPipeline,
210
212
  unfoldDimensions: ()=>unfoldDimensions,
211
213
  zArea: ()=>zArea,
212
- registerBoxplot: ()=>registerBoxplot,
213
214
  histogramAdvancedPipeline: ()=>histogramAdvancedPipeline,
214
215
  registerDarkTheme: ()=>registerDarkTheme,
215
216
  ChartTypeEnum: ()=>ChartTypeEnum,
@@ -232,6 +233,7 @@
232
233
  registerPivotTable: ()=>registerPivotTable,
233
234
  execPipeline: ()=>execPipeline,
234
235
  XEncoding: ()=>XEncoding,
236
+ zBoxPlot: ()=>zBoxPlot,
235
237
  zLineStyle: ()=>zLineStyle,
236
238
  zRegressionLine: ()=>zRegressionLine,
237
239
  findMeasureById: ()=>findMeasureById,
@@ -247,12 +249,13 @@
247
249
  registerDonut: ()=>registerDonut,
248
250
  findTreeNodesBy: ()=>findTreeNodesBy,
249
251
  zRadar: ()=>zRadar,
250
- zTable: ()=>zTable,
252
+ registerBoxPlot: ()=>registerBoxPlot,
251
253
  zAnnotation: ()=>zAnnotation,
252
- zXBandAxis: ()=>zXBandAxis,
254
+ zTable: ()=>zTable,
253
255
  pieAdvancedPipeline: ()=>pieAdvancedPipeline,
254
256
  ANNOTATION_Z_INDEX: ()=>1000,
255
257
  zColumnPercent: ()=>zColumnPercent,
258
+ zXBandAxis: ()=>zXBandAxis,
256
259
  createFormatter: ()=>createFormatter,
257
260
  columnPercentSpecPipeline: ()=>columnPercentSpecPipeline,
258
261
  zSelector: ()=>zSelector,
@@ -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
+ }
3036
3020
  };
3021
+ };
3022
+ const xBand = (spec, context)=>{
3023
+ const result = {
3024
+ ...spec
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
  };
@@ -3874,33 +3950,39 @@
3874
3950
  textBaseline: 'middle'
3875
3951
  }
3876
3952
  };
3877
- const annotationPoint_annotationPoint = (spec, context)=>{
3878
- const { advancedVSeed, vseed } = context;
3879
- const { annotation, config } = advancedVSeed;
3880
- if (!annotation || !annotation.annotationPoint) return spec;
3881
- const theme = config?.[vseed.chartType]?.annotation?.annotationPoint;
3882
- const { annotationPoint } = annotation;
3883
- const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
3884
- annotationPoint
3885
- ];
3886
- const isHorizontalBar = isBarLikeChart(advancedVSeed);
3887
- const defaultStyle = isHorizontalBar ? {
3888
- textAlign: 'right',
3889
- textBaseline: 'middle'
3890
- } : {
3891
- textAlign: 'center',
3892
- textBaseline: 'top'
3893
- };
3894
- const markPoint = annotationPointList.flatMap((annotationPoint)=>{
3895
- const { selector: selectorPoint, text = '', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = defaultStyle.textAlign, textBaseline = defaultStyle.textBaseline, textBackgroundBorderColor = theme?.textBackgroundBorderColor, textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundPadding = theme?.textBackgroundPadding ?? 2, textBackgroundVisible = theme?.textBackgroundVisible ?? true, offsetX = theme?.offsetX ?? 0, offsetY = theme?.offsetY ?? 0 } = annotationPoint;
3896
- const dataset = advancedVSeed.dataset.flat();
3897
- const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
3898
- const dx = -10 - (isHorizontalBar ? textFontSize : 0);
3899
- const dy = isHorizontalBar ? 0 : textFontSize;
3900
- return selectedData.map((datum)=>({
3953
+ const generateAnnotationPointPipe = (options)=>{
3954
+ const findSelectedDatas = options.findSelectedDatas ?? ((dataset, s)=>dataset.filter((datum)=>selector_selector(datum, s)));
3955
+ const generateMarkPoint = options.generateMarkPoint ?? ((datum)=>[
3956
+ {
3957
+ coordinate: (data)=>data.find((item)=>isSubset(datum, item))
3958
+ }
3959
+ ]);
3960
+ return (spec, context)=>{
3961
+ const { advancedVSeed, vseed } = context;
3962
+ const { annotation, config } = advancedVSeed;
3963
+ if (!annotation || !annotation.annotationPoint) return spec;
3964
+ const theme = config?.[vseed.chartType]?.annotation?.annotationPoint;
3965
+ const { annotationPoint } = annotation;
3966
+ const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
3967
+ annotationPoint
3968
+ ];
3969
+ const isHorizontalBar = isBarLikeChart(advancedVSeed);
3970
+ const defaultStyle = isHorizontalBar ? {
3971
+ textAlign: 'right',
3972
+ textBaseline: 'middle'
3973
+ } : {
3974
+ textAlign: 'center',
3975
+ textBaseline: 'top'
3976
+ };
3977
+ const markPoint = annotationPointList.flatMap((annotationPoint)=>{
3978
+ const { selector: selectorPoint, text = '', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = defaultStyle.textAlign, textBaseline = defaultStyle.textBaseline, textBackgroundBorderColor = theme?.textBackgroundBorderColor, textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundPadding = theme?.textBackgroundPadding ?? 2, textBackgroundVisible = theme?.textBackgroundVisible ?? true, offsetX = theme?.offsetX ?? 0, offsetY = theme?.offsetY ?? 0 } = annotationPoint;
3979
+ const dataset = advancedVSeed.dataset.flat();
3980
+ const selectedData = selectorPoint ? findSelectedDatas(dataset, selectorPoint, spec, context) : [];
3981
+ const dx = -10 - (isHorizontalBar ? textFontSize : 0);
3982
+ const dy = isHorizontalBar ? 0 : textFontSize;
3983
+ const markPointStyle = {
3901
3984
  zIndex: 1000,
3902
3985
  regionRelative: true,
3903
- coordinate: (data)=>data.find((item)=>isSubset(datum, item)),
3904
3986
  itemLine: {
3905
3987
  visible: false
3906
3988
  },
@@ -3938,20 +4020,31 @@
3938
4020
  }
3939
4021
  }
3940
4022
  }
3941
- }));
3942
- });
3943
- return {
3944
- ...spec,
3945
- markPoint
4023
+ };
4024
+ return selectedData.reduce((res, datum)=>{
4025
+ const marks = generateMarkPoint(datum, spec, context);
4026
+ if (marks && marks.length) marks.forEach((mark)=>{
4027
+ res.push({
4028
+ ...markPointStyle,
4029
+ ...mark
4030
+ });
4031
+ });
4032
+ return res;
4033
+ }, []);
4034
+ });
4035
+ return {
4036
+ ...spec,
4037
+ markPoint
4038
+ };
3946
4039
  };
3947
4040
  };
4041
+ const annotationPoint_annotationPoint = generateAnnotationPointPipe({});
3948
4042
  function chunk_BO3LQZNF_o(r) {
3949
4043
  return Array.isArray(r);
3950
4044
  }
3951
4045
  const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
3952
4046
  const { advancedVSeed, vseed } = context;
3953
- const { annotation, datasetReshapeInfo, config } = advancedVSeed;
3954
- const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
4047
+ const { annotation, config } = advancedVSeed;
3955
4048
  if (!annotation || !annotation.annotationVerticalLine) return spec;
3956
4049
  const theme = config?.[vseed.chartType]?.annotation?.annotationVerticalLine;
3957
4050
  const { annotationVerticalLine } = annotation;
@@ -3967,8 +4060,7 @@
3967
4060
  insideEnd: 'insideEndTop'
3968
4061
  };
3969
4062
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
3970
- 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;
3971
- 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;
3972
4064
  const generateOneMarkLine = (x)=>({
3973
4065
  x,
3974
4066
  autoRange: true,
@@ -4039,18 +4131,13 @@
4039
4131
  }
4040
4132
  }
4041
4133
  });
4042
- 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)) {
4043
4135
  const xValueArr = Array.isArray(xValue) ? xValue : [
4044
4136
  xValue
4045
4137
  ];
4046
4138
  return xValueArr.map(generateOneMarkLine);
4047
4139
  }
4048
- const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
4049
- return selectedData.map((datum)=>{
4050
- if (datum[unfoldInfo.encodingX]) return generateOneMarkLine(datum[unfoldInfo.encodingX]);
4051
- if (datum[foldInfo.measureValue]) return generateOneMarkLine(datum[foldInfo.measureValue]);
4052
- return {};
4053
- });
4140
+ return [];
4054
4141
  });
4055
4142
  const specMarkLine = spec.markLine || [];
4056
4143
  const newMarkLine = [
@@ -4064,8 +4151,7 @@
4064
4151
  };
4065
4152
  const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
4066
4153
  const { advancedVSeed, vseed } = context;
4067
- const { annotation, datasetReshapeInfo, config } = advancedVSeed;
4068
- const { foldInfo, unfoldInfo } = datasetReshapeInfo[0];
4154
+ const { annotation, config } = advancedVSeed;
4069
4155
  if (!annotation || !annotation.annotationHorizontalLine) return spec;
4070
4156
  const theme = config?.[vseed.chartType]?.annotation?.annotationHorizontalLine;
4071
4157
  const { annotationHorizontalLine } = annotation;
@@ -4081,8 +4167,7 @@
4081
4167
  insideEnd: 'insideEndTop'
4082
4168
  };
4083
4169
  const markLine = annotationHorizontalLineList.flatMap((annotationHorizontalLine)=>{
4084
- 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;
4085
- 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;
4086
4171
  const generateOneMarkLine = (y)=>({
4087
4172
  y,
4088
4173
  autoRange: true,
@@ -4152,18 +4237,13 @@
4152
4237
  }
4153
4238
  }
4154
4239
  });
4155
- 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)) {
4156
4241
  const yValueArr = Array.isArray(yValue) ? yValue : [
4157
4242
  yValue
4158
4243
  ];
4159
4244
  return yValueArr.map(generateOneMarkLine);
4160
4245
  }
4161
- const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
4162
- return selectedData.map((datum)=>{
4163
- if (datum[unfoldInfo.encodingY]) return generateOneMarkLine(datum[unfoldInfo.encodingY]);
4164
- if (datum[foldInfo.measureValue]) return generateOneMarkLine(datum[foldInfo.measureValue]);
4165
- return {};
4166
- });
4246
+ return [];
4167
4247
  });
4168
4248
  const specMarkLine = spec.markLine || [];
4169
4249
  const newMarkLine = [
@@ -5535,8 +5615,8 @@
5535
5615
  });
5536
5616
  spec.chartDimensionLinkage = {
5537
5617
  showTooltip: config.showTooltip ?? chartSpec?.tooltip?.dimension?.visible ?? true,
5538
- heightLimitToShowTooltipForLastRow: 60,
5539
- widthLimitToShowTooltipForLastColumn: 90,
5618
+ heightLimitToShowTooltipForEdgeRow: 60,
5619
+ widthLimitToShowTooltipForEdgeColumn: 90,
5540
5620
  labelHoverOnAxis
5541
5621
  };
5542
5622
  return spec;
@@ -5544,7 +5624,7 @@
5544
5624
  const pivotAdapter_pivotAdapter = (pipeline, pivotPipeline)=>{
5545
5625
  const adapted = (spec, context)=>{
5546
5626
  const { vseed } = context;
5547
- const usePivotChart = isPivotChart(vseed);
5627
+ const usePivotChart = chatType_isPivotChart(vseed);
5548
5628
  if (usePivotChart) return execPipeline(pivotPipeline, context, spec);
5549
5629
  return execPipeline(pipeline, context, spec);
5550
5630
  };
@@ -7062,7 +7142,7 @@
7062
7142
  ...spec,
7063
7143
  data: {
7064
7144
  id,
7065
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
7145
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
7066
7146
  fields: fields
7067
7147
  }
7068
7148
  };
@@ -7076,7 +7156,7 @@
7076
7156
  const { chartType } = vseed;
7077
7157
  const config = advancedVSeed.config?.[chartType]?.xAxis ?? {};
7078
7158
  if (!result.axes) result.axes = [];
7079
- const isPivot = isPivotChart(vseed);
7159
+ const isPivot = chatType_isPivotChart(vseed);
7080
7160
  const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, autoFormat, numFormat = {} } = config;
7081
7161
  const formatter = createNumFormatter(numFormat);
7082
7162
  const percentFormatter = createNumFormatter({
@@ -7164,78 +7244,22 @@
7164
7244
  const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed;
7165
7245
  const config = advancedVSeed.config?.[chartType]?.yAxis ?? {};
7166
7246
  if (!result.axes) result.axes = [];
7167
- const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange } = config;
7168
- const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
7247
+ const { labelAutoLimitLength = 80 } = config;
7169
7248
  const onlyMeasureId = 0 === (encoding.y || []).filter((v)=>v !== MeasureId).length;
7170
- const bandAxis = {
7171
- visible,
7172
- type: 'band',
7173
- orient: 'left',
7174
- maxWidth: labelAutoLimitLength + 60,
7175
- sampling,
7176
- hover: true,
7177
- label: {
7178
- visible: label?.visible,
7179
- flush: true,
7180
- containerAlign: 'right',
7181
- space: 8,
7182
- style: {
7183
- maxLineWidth: labelAutoLimitLength,
7184
- fill: label?.labelColor,
7185
- angle: label?.labelAngle,
7186
- fontSize: label?.labelFontSize,
7187
- fontWeight: label?.labelFontWeight
7188
- },
7189
- minGap: labelAutoHideGap,
7190
- autoHide: labelAutoHide,
7191
- autoHideMethod: 'greedy',
7192
- autoHideSeparation: labelAutoHideGap,
7193
- autoLimit: labelAutoLimit,
7194
- autoRotate: labelAutoRotate,
7195
- autoRotateAngle: labelAutoRotateAngleRange,
7196
- lastVisible: true
7197
- },
7198
- title: {
7199
- visible: title?.visible,
7200
- text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y),
7201
- style: {
7202
- fill: title?.titleColor,
7203
- fontSize: title?.titleFontSize,
7204
- fontWeight: title?.titleFontWeight
7205
- }
7206
- },
7207
- tick: {
7208
- visible: tick?.visible,
7209
- tickSize: tick?.tickSize,
7210
- inside: tick?.tickInside,
7211
- style: {
7212
- stroke: tick?.tickColor
7213
- }
7214
- },
7215
- grid: {
7216
- visible: grid?.visible,
7217
- style: {
7218
- lineWidth: grid?.gridWidth,
7219
- stroke: grid?.gridColor,
7220
- lineDash: grid?.gridLineDash
7221
- }
7222
- },
7223
- domainLine: {
7224
- visible: line?.visible,
7225
- style: {
7226
- lineWidth: line?.lineWidth,
7227
- stroke: line?.lineColor
7228
- }
7229
- },
7230
- paddingInner: [
7231
- 0.15,
7232
- 0.1
7233
- ],
7234
- paddingOuter: [
7235
- 0.075,
7236
- 0.1
7237
- ]
7238
- };
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);
7239
7263
  if (onlyMeasureId && bandAxis.label) {
7240
7264
  const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
7241
7265
  const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
@@ -8229,7 +8253,7 @@
8229
8253
  ...spec,
8230
8254
  data: {
8231
8255
  id,
8232
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
8256
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
8233
8257
  fields: fields
8234
8258
  }
8235
8259
  };
@@ -8290,7 +8314,8 @@
8290
8314
  },
8291
8315
  dimension: {
8292
8316
  visible: false
8293
- }
8317
+ },
8318
+ updateElement: updateTooltipElement
8294
8319
  };
8295
8320
  return result;
8296
8321
  };
@@ -8403,37 +8428,56 @@
8403
8428
  const t = 1 - uu * uu * uu;
8404
8429
  return t * t * t;
8405
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
+ }
8406
8441
  function regressionLowess(data, x = (d)=>d.x, y = (d)=>d.y, options = {}) {
8407
8442
  var _a;
8408
- 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 = [];
8409
8444
  visitPoints(data, x, y, (dx, dy)=>{
8410
- ptsX.push(dx), ptsY.push(dy);
8411
- });
8412
- 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;
8413
8452
  function predictSingle(x0, robustWeights) {
8414
8453
  if (0 === n) return 0;
8415
- const dists = [];
8416
- for(let i = 0; i < n; i++)dists.push({
8417
- idx: i,
8418
- dist: Math.abs(ptsX[i] - x0)
8419
- });
8420
- dists.sort((a, b)=>a.dist - b.dist);
8421
- 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
+ }
8422
8466
  let sumw = 0;
8423
- for(let i = 0; i < m; i++){
8424
- const idx = dists[i].idx;
8425
- let wi = tricube(0 === maxDist ? 0 : dists[i].dist / maxDist);
8426
- 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;
8427
8471
  }
8428
- if (0 === sumw) return ptsY[dists[0].idx];
8472
+ if (0 === sumw) return ptsY[left < n ? left : n - 1];
8429
8473
  if (0 === degree) {
8430
8474
  let s = 0;
8431
- 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];
8432
8476
  return s / sumw;
8433
8477
  }
8434
8478
  let sw = 0, sx = 0, sy = 0, sxx = 0, sxy = 0;
8435
- for(let i = 0; i < m; i++){
8436
- 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];
8437
8481
  sw += wi, sx += wi * xi, sy += wi * yi, sxx += wi * xi * xi, sxy += wi * xi * yi;
8438
8482
  }
8439
8483
  const meanX = sx / sw, meanY = sy / sw, denom = sxx - sx * meanX, slope = Math.abs(denom) < 1e-12 ? 0 : (sxy - sx * meanY) / denom;
@@ -8441,8 +8485,8 @@
8441
8485
  }
8442
8486
  function predict(x0) {
8443
8487
  if (Array.isArray(x0)) {
8444
- const out = [];
8445
- 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]);
8446
8490
  return out;
8447
8491
  }
8448
8492
  return predictSingle(x0);
@@ -8451,26 +8495,23 @@
8451
8495
  predict: predict,
8452
8496
  evaluate: predict,
8453
8497
  evaluateGrid: function(N) {
8454
- const out = [];
8455
- if (N <= 0) return out;
8456
- if (0 === n) return out;
8457
- let min = 1 / 0, max = -1 / 0;
8458
- 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];
8459
8501
  if (min === max) {
8460
8502
  const v = predictSingle(min);
8461
- for(let i = 0; i < N; i++)out.push({
8503
+ for(let i = 0; i < N; i++)out[i] = {
8462
8504
  x: min,
8463
8505
  y: v
8464
- });
8506
+ };
8465
8507
  return out;
8466
8508
  }
8467
8509
  const step = (max - min) / (N - 1);
8468
8510
  let robustWeights;
8469
- for(let iter = 0; iter < iterations; iter++){
8470
- const fits = [];
8471
- for(let i = 0; i < n; i++)fits.push(predictSingle(ptsX[i], robustWeights));
8472
- const res = [];
8473
- 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]);
8474
8515
  const med = res.slice().sort((a, b)=>a - b)[Math.floor(n / 2)] || 0;
8475
8516
  robustWeights = new Array(n);
8476
8517
  for(let i = 0; i < n; i++){
@@ -8480,10 +8521,10 @@
8480
8521
  }
8481
8522
  for(let i = 0; i < N; i++){
8482
8523
  const px = i === N - 1 ? max : min + step * i;
8483
- out.push({
8524
+ out[i] = {
8484
8525
  x: px,
8485
8526
  y: predictSingle(px, robustWeights)
8486
- });
8527
+ };
8487
8528
  }
8488
8529
  return out;
8489
8530
  },
@@ -8491,9 +8532,8 @@
8491
8532
  const out = [];
8492
8533
  if (N <= 0) return out;
8493
8534
  if (0 === n) return out;
8494
- let min = 1 / 0, max = -1 / 0;
8495
- for(let i = 0; i < n; i++)ptsX[i] < min && (min = ptsX[i]), ptsX[i] > max && (max = ptsX[i]);
8496
- 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;
8497
8537
  const comps = computeLinearCIComponents(data, x, y, (xx)=>predictSingle(xx));
8498
8538
  if (0 === comps.n) return out;
8499
8539
  const z = Math.abs(invNorm(1 - alpha / 2));
@@ -9323,6 +9363,10 @@
9323
9363
  result.animation = true;
9324
9364
  return result;
9325
9365
  };
9366
+ const DEFAULT_DUAL_CHART_TYPE = {
9367
+ primary: 'column',
9368
+ secondary: 'line'
9369
+ };
9326
9370
  const dualChartTypePrimary = (spec, context)=>{
9327
9371
  const result = {
9328
9372
  ...spec,
@@ -9332,12 +9376,9 @@
9332
9376
  const { chartType } = vseed;
9333
9377
  const { datasetReshapeInfo } = advancedVSeed;
9334
9378
  const index = datasetReshapeInfo[0].index;
9335
- const config = advancedVSeed.config?.[chartType]?.dualChartType || {
9336
- primary: 'column',
9337
- secondary: 'line'
9338
- };
9339
- const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
9340
- 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;
9341
9382
  const bothColumn = 'column' === primary && 'column' === secondary;
9342
9383
  const type = bothColumn ? 'columnParallel' : primary;
9343
9384
  switch(type){
@@ -9388,13 +9429,10 @@
9388
9429
  const { advancedVSeed, vseed } = context;
9389
9430
  const { chartType } = vseed;
9390
9431
  const { datasetReshapeInfo } = advancedVSeed;
9391
- const config = advancedVSeed.config?.[chartType]?.dualChartType || {
9392
- primary: 'column',
9393
- secondary: 'line'
9394
- };
9432
+ const config = advancedVSeed.config?.[chartType]?.dualChartType || DEFAULT_DUAL_CHART_TYPE;
9395
9433
  const index = datasetReshapeInfo[0].index;
9396
- const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
9397
- 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;
9398
9436
  const bothColumn = 'column' === primary && 'column' === secondary;
9399
9437
  const type = bothColumn ? 'columnParallel' : secondary;
9400
9438
  switch(type){
@@ -9433,7 +9471,7 @@
9433
9471
  result.type = 'scatter';
9434
9472
  break;
9435
9473
  default:
9436
- result.type = secondary;
9474
+ result.type = secondary ?? DEFAULT_DUAL_CHART_TYPE.secondary;
9437
9475
  }
9438
9476
  return result;
9439
9477
  };
@@ -9472,7 +9510,7 @@
9472
9510
  ...spec,
9473
9511
  data: {
9474
9512
  id: `${id}-primary-dataset`,
9475
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
9513
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
9476
9514
  fields: fields
9477
9515
  }
9478
9516
  };
@@ -9512,7 +9550,7 @@
9512
9550
  ...spec,
9513
9551
  data: {
9514
9552
  id: `${id}-secondary-dataset`,
9515
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
9553
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
9516
9554
  fields: fields
9517
9555
  }
9518
9556
  };
@@ -9619,7 +9657,8 @@
9619
9657
  enable: true
9620
9658
  } } = baseConfig;
9621
9659
  result.tooltip = {
9622
- style: getTooltipStyle(tooltip)
9660
+ style: getTooltipStyle(tooltip),
9661
+ updateElement: updateTooltipElement
9623
9662
  };
9624
9663
  return result;
9625
9664
  };
@@ -9878,90 +9917,23 @@
9878
9917
  }), match || (result[k] = v);
9879
9918
  }), result;
9880
9919
  }
9881
- const annotationPointOfDualAxis = (spec, context)=>{
9882
- const { advancedVSeed, vseed } = context;
9883
- const { annotation, config } = advancedVSeed;
9884
- if (!annotation || !annotation.annotationPoint) return spec;
9885
- const theme = config?.[vseed.chartType]?.annotation?.annotationPoint;
9886
- const { annotationPoint } = annotation;
9887
- const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
9888
- annotationPoint
9889
- ];
9890
- const isHorizontalBar = isBarLikeChart(advancedVSeed);
9891
- const defaultStyle = isHorizontalBar ? {
9892
- textAlign: 'right',
9893
- textBaseline: 'middle'
9894
- } : {
9895
- textAlign: 'center',
9896
- textBaseline: 'top'
9897
- };
9898
- const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m)=>m.id);
9899
- const markPoint = annotationPointList.flatMap((annotationPoint)=>{
9900
- const { selector: selectorPoint, text = '', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = defaultStyle.textAlign, textBaseline = defaultStyle.textBaseline, textBackgroundBorderColor = theme?.textBackgroundBorderColor, textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundPadding = theme?.textBackgroundPadding ?? 2, textBackgroundVisible = theme?.textBackgroundVisible ?? true, offsetX = theme?.offsetX ?? 0, offsetY = theme?.offsetY ?? 0 } = annotationPoint;
9901
- const dataset = advancedVSeed.dataset.flat();
9902
- const selectedData = selectorPoint ? dataset.reduce((res, d)=>{
9920
+ const annotationPointOfDualAxis = generateAnnotationPointPipe({
9921
+ findSelectedDatas: (dataset, s, spec, context)=>dataset.reduce((res, d)=>{
9922
+ const { advancedVSeed } = context;
9923
+ const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m)=>m.id);
9903
9924
  const pickedDatum = pickWithout(d, allMeasureIds.filter((id)=>id !== d[MeasureId]));
9904
- if (selector_selector(pickedDatum, selectorPoint)) res.push(pickedDatum);
9925
+ if (selector_selector(pickedDatum, s)) res.push(pickedDatum);
9905
9926
  return res;
9906
- }, []) : [];
9907
- const dx = -10 - (isHorizontalBar ? textFontSize : 0);
9908
- const dy = isHorizontalBar ? 0 : textFontSize;
9909
- const baseConfig = {
9910
- zIndex: 1000,
9911
- itemLine: {
9912
- visible: false
9913
- },
9914
- itemContent: {
9915
- offsetY,
9916
- offsetX,
9917
- confine: true,
9918
- text: {
9919
- text: text,
9920
- style: {
9921
- opacity: 0.95,
9922
- visible: true,
9923
- textAlign: textAlign,
9924
- textBaseline: textBaseline,
9925
- fill: textColor,
9926
- stroke: textBackgroundColor,
9927
- lineWidth: 1,
9928
- fontSize: textFontSize,
9929
- fontWeight: textFontWeight,
9930
- dx,
9931
- dy
9932
- },
9933
- labelBackground: {
9934
- visible: textBackgroundVisible,
9935
- padding: textBackgroundPadding,
9936
- style: {
9937
- opacity: 0.95,
9938
- cornerRadius: textBackgroundBorderRadius ?? 4,
9939
- fill: textBackgroundColor,
9940
- stroke: textBackgroundBorderColor,
9941
- lineWidth: textBackgroundBorderWidth,
9942
- dx,
9943
- dy
9944
- }
9945
- }
9946
- }
9947
- }
9948
- };
9949
- return spec.series?.reduce((res, s, index)=>{
9950
- selectedData.forEach((datum)=>{
9951
- res.push({
9952
- ...baseConfig,
9953
- relativeSeriesIndex: index,
9954
- coordinate: (data)=>data.find((item)=>isSubset(datum, item, allMeasureIds.filter((id)=>id !== item[MeasureId])))
9955
- });
9956
- });
9957
- return res;
9958
- }, []);
9959
- });
9960
- return {
9961
- ...spec,
9962
- markPoint
9963
- };
9964
- };
9927
+ }, []),
9928
+ generateMarkPoint: (datum, spec, context)=>{
9929
+ const { advancedVSeed } = context;
9930
+ const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m)=>m.id);
9931
+ return spec.series?.map((s, index)=>({
9932
+ relativeSeriesIndex: index,
9933
+ coordinate: (data)=>data.find((item)=>isSubset(datum, item, allMeasureIds.filter((id)=>id !== item[MeasureId])))
9934
+ }));
9935
+ }
9936
+ });
9965
9937
  const dualAxis = [
9966
9938
  seriesDualAxis([
9967
9939
  initDualAxisPrimary,
@@ -11284,6 +11256,26 @@
11284
11256
  markStyle_markStyle,
11285
11257
  annotation_annotation
11286
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
+ };
11287
11279
  const heatmapColorLegend = (spec, context)=>{
11288
11280
  const result = colorLegend(spec, context);
11289
11281
  if (result.legends) result.legends.customFilter = (data, range, key)=>{
@@ -11356,7 +11348,8 @@
11356
11348
  },
11357
11349
  dimension: {
11358
11350
  visible: false
11359
- }
11351
+ },
11352
+ updateElement: updateTooltipElement
11360
11353
  };
11361
11354
  return result;
11362
11355
  };
@@ -11437,18 +11430,6 @@
11437
11430
  result.seriesField = unfoldInfo.encodingColorId;
11438
11431
  result.valueField = foldInfo.measureValue;
11439
11432
  result.padding = 0;
11440
- result.axes = [
11441
- {
11442
- type: 'band',
11443
- orient: 'left',
11444
- bandPadding: 0
11445
- },
11446
- {
11447
- type: 'band',
11448
- orient: 'bottom',
11449
- bandPadding: 0
11450
- }
11451
- ];
11452
11433
  result.region = [
11453
11434
  {
11454
11435
  clip: true
@@ -11463,6 +11444,7 @@
11463
11444
  datasetXY,
11464
11445
  colorAdapter(color_color, linearColor),
11465
11446
  label_label,
11447
+ heatmapBandAxis,
11466
11448
  colorAdapter(discreteLegend, heatmapColorLegend),
11467
11449
  colorCellStyleFill(markStyle_cellStyle_cellStyle),
11468
11450
  tooltipHeatmap,
@@ -11482,6 +11464,7 @@
11482
11464
  datasetXY,
11483
11465
  colorAdapter(color_color, linearColor),
11484
11466
  label_label,
11467
+ heatmapBandAxis,
11485
11468
  tooltipHeatmap,
11486
11469
  colorCellStyleFill(markStyle_cellStyle_cellStyle),
11487
11470
  annotationPoint_annotationPoint,
@@ -11741,6 +11724,10 @@
11741
11724
  measures
11742
11725
  };
11743
11726
  };
11727
+ const revisedBoxPlotFieldKey = (fieldKey, groupId, isPivotChart = true)=>{
11728
+ if (!isPivotChart) return fieldKey;
11729
+ return `${BoxPlotPivotIndicator}_${groupId}_${fieldKey}`;
11730
+ };
11744
11731
  const pivotReshapeWithBoxplotEncoding = (advancedVSeed, context)=>{
11745
11732
  const result = {
11746
11733
  ...advancedVSeed
@@ -11792,6 +11779,12 @@
11792
11779
  boxPlotData.forEach((datum)=>{
11793
11780
  datum[FoldMeasureId] = f;
11794
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];
11795
11788
  });
11796
11789
  boxPlotDataList.push(...boxPlotData);
11797
11790
  });
@@ -11812,10 +11805,15 @@
11812
11805
  });
11813
11806
  res.dataset.forEach((datum)=>{
11814
11807
  datum[UpperWhisker] = datum[encoding.max[0]];
11808
+ datum[revisedBoxPlotFieldKey("__Q1__", groupId)] = datum[encoding.max[0]];
11815
11809
  datum[LowerWhisker] = datum[encoding.min[0]];
11810
+ datum[revisedBoxPlotFieldKey(LowerWhisker, groupId)] = datum[encoding.min[0]];
11816
11811
  datum["__Q1__"] = datum[encoding.q1[0]];
11812
+ datum[revisedBoxPlotFieldKey("__Q1__", groupId)] = datum[encoding.q1[0]];
11817
11813
  datum["__Q3__"] = datum[encoding.q3[0]];
11814
+ datum[revisedBoxPlotFieldKey("__Q3__", groupId)] = datum[encoding.q3[0]];
11818
11815
  datum[MedianMeasureId] = datum[encoding.median[0]];
11816
+ datum[revisedBoxPlotFieldKey(MedianMeasureId, groupId)] = datum[encoding.median[0]];
11819
11817
  });
11820
11818
  newDatasets = res.dataset;
11821
11819
  foldInfo = {};
@@ -11869,16 +11867,17 @@
11869
11867
  const result = {
11870
11868
  ...spec
11871
11869
  };
11872
- const { advancedVSeed } = context;
11870
+ const { advancedVSeed, vseed } = context;
11873
11871
  const { datasetReshapeInfo, encoding } = advancedVSeed;
11874
- const { unfoldInfo } = datasetReshapeInfo[0];
11872
+ const { unfoldInfo, id } = datasetReshapeInfo[0];
11873
+ const usePivotChart = chatType_isPivotChart(vseed);
11875
11874
  result.type = 'boxPlot';
11876
- result.minField = LowerWhisker;
11877
- result.maxField = UpperWhisker;
11878
- result.q1Field = "__Q1__";
11879
- result.medianField = MedianMeasureId;
11880
- result.q3Field = "__Q3__";
11881
- 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);
11882
11881
  result.xField = [
11883
11882
  unfoldInfo.encodingX
11884
11883
  ];
@@ -11926,7 +11925,7 @@
11926
11925
  ...spec,
11927
11926
  data: {
11928
11927
  id,
11929
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
11928
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
11930
11929
  fields: fields
11931
11930
  }
11932
11931
  };
@@ -11998,7 +11997,8 @@
11998
11997
  },
11999
11998
  dimension: {
12000
11999
  visible: false
12001
- }
12000
+ },
12001
+ updateElement: updateTooltipElement
12002
12002
  };
12003
12003
  return result;
12004
12004
  };
@@ -12210,10 +12210,55 @@
12210
12210
  const boxplotSpecPipeline = [
12211
12211
  pivotAdapter_pivotAdapter(boxplot_boxplot, pivotBoxplot)
12212
12212
  ];
12213
- const registerBoxplot = ()=>{
12213
+ const registerBoxPlot = ()=>{
12214
12214
  Builder._advancedPipelineMap.boxPlot = boxplotAdvancedPipeline;
12215
12215
  Builder._specPipelineMap.boxPlot = boxplotSpecPipeline;
12216
12216
  };
12217
+ const isArrayLike_isArrayLike = function(value) {
12218
+ return null !== value && "function" != typeof value && Number.isFinite(value.length);
12219
+ };
12220
+ const common_isArrayLike = isArrayLike_isArrayLike;
12221
+ function baseMerge(target, source, shallowArray = !1, skipTargetArray = !1) {
12222
+ if (source) {
12223
+ if (target === source) return;
12224
+ if (common_isValid(source) && "object" == typeof source) {
12225
+ const iterable = Object(source), props = [];
12226
+ for(const key in iterable)props.push(key);
12227
+ let { length: length } = props, propIndex = -1;
12228
+ for(; length--;){
12229
+ const key = props[++propIndex];
12230
+ !common_isValid(iterable[key]) || "object" != typeof iterable[key] || skipTargetArray && common_isArray(target[key]) ? assignMergeValue(target, key, iterable[key]) : baseMergeDeep(target, source, key, shallowArray, skipTargetArray);
12231
+ }
12232
+ }
12233
+ }
12234
+ }
12235
+ function baseMergeDeep(target, source, key, shallowArray = !1, skipTargetArray = !1) {
12236
+ const objValue = target[key], srcValue = source[key];
12237
+ let newValue = source[key], isCommon = !0;
12238
+ if (common_isArray(srcValue)) {
12239
+ if (shallowArray) newValue = [];
12240
+ else if (common_isArray(objValue)) newValue = objValue;
12241
+ else if (common_isArrayLike(objValue)) {
12242
+ newValue = new Array(objValue.length);
12243
+ let index = -1;
12244
+ const length = objValue.length;
12245
+ for(; ++index < length;)newValue[index] = objValue[index];
12246
+ }
12247
+ } else common_isPlainObject(srcValue) ? (newValue = null != objValue ? objValue : {}, "function" != typeof objValue && "object" == typeof objValue || (newValue = {})) : isCommon = !1;
12248
+ isCommon && baseMerge(newValue, srcValue, shallowArray, skipTargetArray), assignMergeValue(target, key, newValue);
12249
+ }
12250
+ function assignMergeValue(target, key, value) {
12251
+ (void 0 === value || eq(target[key], value)) && (void 0 !== value || key in target) || (target[key] = value);
12252
+ }
12253
+ function eq(value, other) {
12254
+ return value === other || Number.isNaN(value) && Number.isNaN(other);
12255
+ }
12256
+ function merge(target, ...sources) {
12257
+ let sourceIndex = -1;
12258
+ const length = sources.length;
12259
+ for(; ++sourceIndex < length;)baseMerge(target, sources[sourceIndex], !0);
12260
+ return target;
12261
+ }
12217
12262
  const histogramConfig = (advancedVSeed, context)=>{
12218
12263
  const { vseed } = context;
12219
12264
  const { chartType } = vseed;
@@ -12236,6 +12281,22 @@
12236
12281
  'dimensionLinkage'
12237
12282
  ]);
12238
12283
  let config = replaceNullToUndefined(pickedConfig);
12284
+ if (pickedConfig?.binValueType === 'percentage') config = merge({}, {
12285
+ yAxis: {
12286
+ autoFomat: false,
12287
+ numFormat: {
12288
+ type: 'percent',
12289
+ fractionDigits: 1
12290
+ }
12291
+ },
12292
+ label: {
12293
+ autoFormat: false,
12294
+ numFormat: {
12295
+ type: 'percent',
12296
+ fractionDigits: 1
12297
+ }
12298
+ }
12299
+ }, config);
12239
12300
  if (!hasColorEncoding && !config?.legend?.enable) config = {
12240
12301
  ...config,
12241
12302
  legend: {
@@ -12428,15 +12489,21 @@
12428
12489
  startMin
12429
12490
  ]; startMin <= max;)startMin += stepSize, thresholds.push(startMin);
12430
12491
  } else {
12431
- 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;
12432
12493
  if (max - min > 1) {
12433
12494
  const start = Math.floor(min), stepSizeInt = Math.ceil((max - start) / bins);
12434
12495
  thresholds = new Array(bins + 1);
12435
- 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
+ }
12436
12500
  } else {
12437
12501
  const stepSize = (max - min) / bins;
12438
12502
  thresholds = new Array(bins + 1);
12439
- 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
+ }
12440
12507
  }
12441
12508
  }
12442
12509
  const numBins = Math.max(0, thresholds.length - 1);
@@ -12746,7 +12813,7 @@
12746
12813
  ...spec,
12747
12814
  data: {
12748
12815
  id,
12749
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
12816
+ values: chatType_isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
12750
12817
  fields: fields
12751
12818
  }
12752
12819
  };
@@ -12758,6 +12825,10 @@
12758
12825
  const formatter = createNumFormatter(numFormat);
12759
12826
  return (value)=>createLinearFormat(value, autoFormat, numFormat, formatter);
12760
12827
  };
12828
+ const getDefaultValueFormatterOfHistogram = (binValueType = 'count')=>'percentage' === binValueType ? createNumFormatter({
12829
+ type: 'percent',
12830
+ fractionDigits: 1
12831
+ }) : (value)=>autoFormatter(value);
12761
12832
  const tooltipHistogram_VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
12762
12833
  const tooltipHistogram = (spec, context)=>{
12763
12834
  const result = {
@@ -12766,11 +12837,12 @@
12766
12837
  const { advancedVSeed } = context;
12767
12838
  const { chartType, dimensions, encoding } = advancedVSeed;
12768
12839
  const baseConfig = advancedVSeed.config[chartType];
12769
- const { tooltip = {
12840
+ const { binValueType, tooltip = {
12770
12841
  enable: true
12771
12842
  } } = baseConfig;
12772
12843
  const { enable } = tooltip;
12773
12844
  const defaultXFormatter = getDefaultXFormatterOfHistogram(advancedVSeed);
12845
+ const defaultValueFormatter = getDefaultValueFormatterOfHistogram(binValueType);
12774
12846
  result.tooltip = {
12775
12847
  style: getTooltipStyle(tooltip),
12776
12848
  visible: enable,
@@ -12778,18 +12850,19 @@
12778
12850
  title: {
12779
12851
  visible: false
12780
12852
  },
12781
- content: tooltipHistogram_createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter)
12853
+ content: tooltipHistogram_createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter, defaultValueFormatter)
12782
12854
  },
12783
12855
  dimension: {
12784
12856
  title: {
12785
12857
  visible: false
12786
12858
  },
12787
- content: tooltipHistogram_createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter)
12788
- }
12859
+ content: tooltipHistogram_createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter, defaultValueFormatter)
12860
+ },
12861
+ updateElement: updateMarkTooltipElement
12789
12862
  };
12790
12863
  return result;
12791
12864
  };
12792
- const tooltipHistogram_createMarkContent = (tooltip, dimensions, encoding, dimFormatter)=>{
12865
+ const tooltipHistogram_createMarkContent = (tooltip, dimensions, encoding, dimFormatter, defaultValueFormatter)=>{
12793
12866
  const dims = C(dimensions.filter((item)=>tooltip.includes(item.id)), T((item)=>item.id), T((item)=>item.alias));
12794
12867
  const dimContent = dims.map((item)=>({
12795
12868
  visible: true,
@@ -12801,7 +12874,7 @@
12801
12874
  if (encoding.color?.includes(item.id)) return datum?.[ColorEncoding];
12802
12875
  if (encoding.x?.includes(item.id)) return datum?.[XEncoding];
12803
12876
  }
12804
- return datum?.[item.id];
12877
+ return defaultValueFormatter(datum?.[item.id]);
12805
12878
  }
12806
12879
  }));
12807
12880
  const defaultContent = [
@@ -12815,7 +12888,7 @@
12815
12888
  },
12816
12889
  value: (datum)=>{
12817
12890
  if (!datum) return '';
12818
- return datum[FoldMeasureValue];
12891
+ return defaultValueFormatter(datum[FoldMeasureValue]);
12819
12892
  }
12820
12893
  }
12821
12894
  ];
@@ -12845,6 +12918,24 @@
12845
12918
  };
12846
12919
  return result;
12847
12920
  };
12921
+ const annotationPointOfHistogram = generateAnnotationPointPipe({
12922
+ generateMarkPoint: (datum, spec)=>{
12923
+ const histogramSpec = spec;
12924
+ const xField = histogramSpec.xField;
12925
+ const x2Field = histogramSpec.x2Field;
12926
+ return [
12927
+ {
12928
+ coordinate: (data)=>{
12929
+ const d = data.find((item)=>isSubset(datum, item));
12930
+ return d ? {
12931
+ ...d,
12932
+ [xField]: (d[xField] + d[x2Field]) / 2
12933
+ } : void 0;
12934
+ }
12935
+ }
12936
+ ];
12937
+ }
12938
+ });
12848
12939
  const gaussian = (u)=>1 / Math.sqrt(2 * Math.PI) * Math.exp(-0.5 * u * u);
12849
12940
  function scott(n, std, dim = 1) {
12850
12941
  return n <= 0 || 0 === std ? 0 : std * Math.pow(n, -1 / (dim + 4));
@@ -13234,7 +13325,7 @@
13234
13325
  colorAdapter(discreteLegend, colorLegend),
13235
13326
  histogramVerticalCrosshairRect,
13236
13327
  colorBarStyleFill(barStyle_barStyle),
13237
- annotationPoint_annotationPoint,
13328
+ annotationPointOfHistogram,
13238
13329
  annotationVerticalLine_annotationVerticalLine,
13239
13330
  annotationHorizontalLine_annotationHorizontalLine,
13240
13331
  annotationAreaBand,
@@ -13257,7 +13348,7 @@
13257
13348
  tooltipHistogram,
13258
13349
  colorBarStyleFill(barStyle_barStyle),
13259
13350
  histogramVerticalCrosshairRect,
13260
- annotationPoint_annotationPoint,
13351
+ annotationPointOfHistogram,
13261
13352
  annotationVerticalLine_annotationVerticalLine,
13262
13353
  annotationHorizontalLine_annotationHorizontalLine,
13263
13354
  annotationAreaBand,
@@ -13386,6 +13477,18 @@
13386
13477
  pagerIconColor: '#89909D',
13387
13478
  pagerIconDisableColor: '#F1F2F5'
13388
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
+ });
13389
13492
  const getDefaultTableConfig = ()=>({
13390
13493
  bodyFontSize: 12,
13391
13494
  bodyBackgroundColor: 'transparent',
@@ -13447,7 +13550,7 @@
13447
13550
  enable: true,
13448
13551
  borderRadius: 12,
13449
13552
  borderWidth: 1,
13450
- padding: 7,
13553
+ padding: 9,
13451
13554
  lineHeight: 12,
13452
13555
  fontSize: 12,
13453
13556
  lineSpace: 6
@@ -14064,6 +14167,9 @@
14064
14167
  },
14065
14168
  heatmap: {
14066
14169
  ...baseConfig,
14170
+ legend: getLightColorLegend(),
14171
+ xAxis: bandAxis,
14172
+ yAxis: bandAxis,
14067
14173
  label: {
14068
14174
  ...baseConfig.label,
14069
14175
  labelColorSmartInvert: true
@@ -14329,6 +14435,9 @@
14329
14435
  },
14330
14436
  heatmap: {
14331
14437
  ...baseConfig,
14438
+ legend: getDarkColorLegend(),
14439
+ xAxis: bandAxis,
14440
+ yAxis: bandAxis,
14332
14441
  label: {
14333
14442
  ...baseConfig.label,
14334
14443
  labelColorSmartInvert: true
@@ -14392,7 +14501,7 @@
14392
14501
  registerRadar();
14393
14502
  registerFunnel();
14394
14503
  registerHeatmap();
14395
- registerBoxplot();
14504
+ registerBoxPlot();
14396
14505
  registerHistogram();
14397
14506
  registerLightTheme();
14398
14507
  registerDarkTheme();
@@ -14737,7 +14846,7 @@
14737
14846
  });
14738
14847
  return clone(schema, def);
14739
14848
  }
14740
- function merge(a, b) {
14849
+ function util_merge(a, b) {
14741
14850
  const def = mergeDefs(a._zod.def, {
14742
14851
  get shape () {
14743
14852
  const _shape = {
@@ -17416,7 +17525,7 @@
17416
17525
  catchall: void 0
17417
17526
  });
17418
17527
  inst.extend = (incoming)=>extend(inst, incoming);
17419
- inst.merge = (other)=>merge(inst, other);
17528
+ inst.merge = (other)=>util_merge(inst, other);
17420
17529
  inst.pick = (mask)=>pick(inst, mask);
17421
17530
  inst.omit = (mask)=>omit(inst, mask);
17422
17531
  inst.partial = (...args)=>partial(ZodOptional, inst, args[0]);
@@ -18095,61 +18204,68 @@
18095
18204
  const zLinearColor = schemas_object({
18096
18205
  linearColorScheme: schemas_array(schemas_string()).nullish()
18097
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
+ });
18098
18257
  const zSelector = union([
18099
18258
  schemas_string(),
18100
18259
  schemas_number(),
18101
- schemas_object({
18102
- field: schemas_string(),
18103
- operator: schemas_enum([
18104
- '=',
18105
- '==',
18106
- '!=',
18107
- '>',
18108
- '<',
18109
- '>=',
18110
- '<=',
18111
- 'between'
18112
- ]).nullish(),
18113
- op: schemas_enum([
18114
- '=',
18115
- '==',
18116
- '!=',
18117
- '>',
18118
- '<',
18119
- '>=',
18120
- '<=',
18121
- 'between'
18122
- ]).nullish(),
18123
- value: union([
18124
- schemas_string(),
18125
- schemas_number(),
18126
- schemas_array(union([
18127
- schemas_string(),
18128
- schemas_number()
18129
- ]))
18130
- ])
18131
- }),
18132
- schemas_object({
18133
- field: schemas_string(),
18134
- operator: schemas_enum([
18135
- 'in',
18136
- 'not in'
18137
- ]).nullish(),
18138
- op: schemas_enum([
18139
- 'in',
18140
- 'not in'
18141
- ]).nullish(),
18142
- value: union([
18143
- schemas_string(),
18144
- schemas_number(),
18145
- schemas_array(union([
18146
- schemas_string(),
18147
- schemas_number()
18148
- ]))
18149
- ])
18150
- })
18260
+ zMeasureSelector,
18261
+ zDimensionSelector
18151
18262
  ]);
18152
18263
  const zSelectors = schemas_array(zSelector);
18264
+ const zAreaSelector = union([
18265
+ zMeasureSelector,
18266
+ zDimensionSelector
18267
+ ]);
18268
+ const zAreaSelectors = schemas_array(zAreaSelector);
18153
18269
  const zLabel = schemas_object({
18154
18270
  enable: schemas_boolean().nullish(),
18155
18271
  wrap: schemas_boolean().nullish(),
@@ -18220,9 +18336,9 @@
18220
18336
  'bl',
18221
18337
  'br'
18222
18338
  ]).default('bottom').nullish(),
18223
- labelColor: schemas_string().default('#fff').nullish(),
18224
18339
  pagerIconColor: schemas_string().nullish(),
18225
18340
  pagerIconDisableColor: schemas_string().nullish(),
18341
+ labelColor: schemas_string().default('#fff').nullish(),
18226
18342
  labelFontSize: schemas_number().default(12).nullish(),
18227
18343
  labelFontWeight: schemas_number().or(schemas_string()).default(400).nullish()
18228
18344
  });
@@ -18249,7 +18365,12 @@
18249
18365
  'bl',
18250
18366
  'br'
18251
18367
  ]).default('bottom').nullish(),
18252
- 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()
18253
18374
  });
18254
18375
  const zTooltip = schemas_object({
18255
18376
  enable: schemas_boolean().default(true).nullish(),
@@ -18294,10 +18415,6 @@
18294
18415
  offsetX: schemas_number().default(0).nullish()
18295
18416
  });
18296
18417
  const zAnnotationHorizontalLine = schemas_object({
18297
- selector: union([
18298
- zSelector,
18299
- zSelectors
18300
- ]).nullish(),
18301
18418
  yValue: union([
18302
18419
  schemas_number(),
18303
18420
  schemas_string(),
@@ -18345,8 +18462,8 @@
18345
18462
  });
18346
18463
  const zAnnotationArea = schemas_object({
18347
18464
  selector: union([
18348
- zSelector,
18349
- zSelectors
18465
+ zAreaSelector,
18466
+ zAreaSelectors
18350
18467
  ]).nullish(),
18351
18468
  textPosition: schemas_enum([
18352
18469
  'top',
@@ -18641,9 +18758,11 @@
18641
18758
  label: zLabel.nullish(),
18642
18759
  color: zColor.nullish(),
18643
18760
  tooltip: zTooltip.nullish(),
18644
- legend: zLegend.nullish(),
18761
+ legend: zColorLegend.nullish(),
18645
18762
  pivotGrid: zPivotChartGridConfig.nullish(),
18646
- cell: zHeatmapCell.nullish()
18763
+ cell: zHeatmapCell.nullish(),
18764
+ xAxis: zXBandAxis.nullish(),
18765
+ yAxis: zYBandAxis.nullish()
18647
18766
  });
18648
18767
  const zPivotTableConfig = zTableConfig;
18649
18768
  const zWhiskersConfig = schemas_number().or(schemas_array(schemas_number())).default(1.5);
@@ -18819,10 +18938,6 @@
18819
18938
  outlierStyle: zOutlierStyle.or(schemas_array(zOutlierStyle)).nullish()
18820
18939
  });
18821
18940
  const zAnnotationVerticalLine = schemas_object({
18822
- selector: union([
18823
- zSelector,
18824
- zSelectors
18825
- ]).nullish(),
18826
18941
  xValue: union([
18827
18942
  schemas_number(),
18828
18943
  schemas_string(),
@@ -19004,7 +19119,7 @@
19004
19119
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
19005
19120
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
19006
19121
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
19007
- polynomialRegressionLine: schemas_array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).or(schemas_boolean()).nullish(),
19122
+ polynomialRegressionLine: schemas_array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).nullish(),
19008
19123
  dimensionLinkage: zDimensionLinkage.nullish(),
19009
19124
  locale: zLocale.nullish()
19010
19125
  });
@@ -19208,10 +19323,10 @@
19208
19323
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
19209
19324
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
19210
19325
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
19211
- linearRegressionLine: schemas_array(zLinearRegressionLine).or(zLinearRegressionLine).or(schemas_boolean()).nullish(),
19212
- lowessRegressionLine: schemas_array(zLowessRegressionLine).or(zLowessRegressionLine).or(schemas_boolean()).nullish(),
19213
- polynomialRegressionLine: schemas_array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).or(schemas_boolean()).nullish(),
19214
- logisticRegressionLine: schemas_array(zLogisticRegressionLine).or(zLogisticRegressionLine).or(schemas_boolean()).nullish(),
19326
+ linearRegressionLine: schemas_array(zLinearRegressionLine).or(zLinearRegressionLine).nullish(),
19327
+ lowessRegressionLine: schemas_array(zLowessRegressionLine).or(zLowessRegressionLine).nullish(),
19328
+ polynomialRegressionLine: schemas_array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).nullish(),
19329
+ logisticRegressionLine: schemas_array(zLogisticRegressionLine).or(zLogisticRegressionLine).nullish(),
19215
19330
  dimensionLinkage: zDimensionLinkage.nullish(),
19216
19331
  locale: zLocale.nullish()
19217
19332
  });
@@ -19373,7 +19488,7 @@
19373
19488
  theme: zTheme.nullish(),
19374
19489
  locale: zLocale.nullish()
19375
19490
  });
19376
- const zBoxplot = schemas_object({
19491
+ const zBoxPlot = schemas_object({
19377
19492
  chartType: literal('boxPlot'),
19378
19493
  dataset: zDataset.nullish(),
19379
19494
  encoding: zEncoding.nullish(),
@@ -19423,7 +19538,7 @@
19423
19538
  zRadar,
19424
19539
  zFunnel,
19425
19540
  zHeatmap,
19426
- zBoxplot,
19541
+ zBoxPlot,
19427
19542
  zHistogram
19428
19543
  ]);
19429
19544
  const zCellStyle = schemas_object({