@visactor/vseed 0.1.49 → 0.1.51

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 (192) hide show
  1. package/dist/cjs/index.cjs +3 -3
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/buildAdvanced.js +1 -1
  4. package/dist/esm/builder/builder/buildAdvanced.js.map +1 -1
  5. package/dist/esm/builder/builder/buildSpec.js +1 -1
  6. package/dist/esm/builder/builder/buildSpec.js.map +1 -1
  7. package/dist/esm/builder/builder/builder.d.ts +483 -1
  8. package/dist/esm/builder/builder/builder.js +5 -1
  9. package/dist/esm/builder/builder/builder.js.map +1 -1
  10. package/dist/esm/dataSelector/selector.d.ts +5 -0
  11. package/dist/esm/dataSelector/selector.js +92 -50
  12. package/dist/esm/dataSelector/selector.js.map +1 -1
  13. package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js +2 -1
  14. package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js.map +1 -1
  15. package/dist/esm/pipeline/advanced/chart/pipes/config/column.js +2 -1
  16. package/dist/esm/pipeline/advanced/chart/pipes/config/column.js.map +1 -1
  17. package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js +2 -1
  18. package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js.map +1 -1
  19. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +2 -1
  20. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
  21. package/dist/esm/pipeline/advanced/chart/pipes/config/line.js +2 -1
  22. package/dist/esm/pipeline/advanced/chart/pipes/config/line.js.map +1 -1
  23. package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js +2 -1
  24. package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js.map +1 -1
  25. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +1 -1
  26. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
  27. package/dist/esm/pipeline/spec/chart/pipeline/area.js +3 -2
  28. package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
  29. package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js +3 -2
  30. package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
  31. package/dist/esm/pipeline/spec/chart/pipeline/bar.js +3 -2
  32. package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
  33. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js +3 -2
  34. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
  35. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js +3 -2
  36. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
  37. package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +3 -2
  38. package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -1
  39. package/dist/esm/pipeline/spec/chart/pipeline/column.js +3 -2
  40. package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
  41. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js +3 -2
  42. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
  43. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js +3 -2
  44. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
  45. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js +5 -4
  46. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
  47. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +3 -2
  48. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
  49. package/dist/esm/pipeline/spec/chart/pipeline/line.js +3 -2
  50. package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
  51. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +3 -2
  52. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
  53. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.d.ts +2 -0
  54. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js +94 -0
  55. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js.map +1 -0
  56. package/dist/esm/pipeline/spec/chart/pipes/annotation/index.d.ts +1 -0
  57. package/dist/esm/pipeline/spec/chart/pipes/annotation/index.js +2 -1
  58. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.d.ts +1 -1
  59. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js +2 -1
  60. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js.map +1 -1
  61. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +12 -1
  62. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
  63. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +12 -1
  64. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
  65. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairLine.js +3 -0
  66. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairLine.js.map +1 -1
  67. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js +3 -0
  68. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js.map +1 -1
  69. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairLine.js +3 -0
  70. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairLine.js.map +1 -1
  71. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js +3 -0
  72. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js.map +1 -1
  73. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.d.ts +2 -0
  74. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js +49 -0
  75. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js.map +1 -0
  76. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.d.ts +1 -0
  77. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.js +2 -1
  78. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +15 -0
  79. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  80. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js +1 -0
  81. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
  82. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js +13 -9
  83. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js.map +1 -1
  84. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js +8 -5
  85. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -1
  86. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js +8 -5
  87. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -1
  88. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js +61 -29
  89. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js.map +1 -1
  90. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +8 -8
  91. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
  92. package/dist/esm/types/advancedVSeed.d.ts +175 -0
  93. package/dist/esm/types/advancedVSeed.js +1 -0
  94. package/dist/esm/types/advancedVSeed.js.map +1 -1
  95. package/dist/esm/types/chartType/area/area.d.ts +6 -1
  96. package/dist/esm/types/chartType/area/zArea.d.ts +5 -0
  97. package/dist/esm/types/chartType/area/zArea.js +2 -1
  98. package/dist/esm/types/chartType/area/zArea.js.map +1 -1
  99. package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +6 -1
  100. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +5 -0
  101. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js +2 -1
  102. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js.map +1 -1
  103. package/dist/esm/types/chartType/bar/bar.d.ts +6 -1
  104. package/dist/esm/types/chartType/bar/zBar.d.ts +5 -0
  105. package/dist/esm/types/chartType/bar/zBar.js +2 -1
  106. package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
  107. package/dist/esm/types/chartType/barParallel/barParallel.d.ts +6 -1
  108. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +5 -0
  109. package/dist/esm/types/chartType/barParallel/zBarParallel.js +2 -1
  110. package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
  111. package/dist/esm/types/chartType/barPercent/barPercent.d.ts +6 -1
  112. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +5 -0
  113. package/dist/esm/types/chartType/barPercent/zBarPercent.js +2 -1
  114. package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
  115. package/dist/esm/types/chartType/boxplot/boxplot.d.ts +6 -1
  116. package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +5 -0
  117. package/dist/esm/types/chartType/boxplot/zBoxplot.js +2 -1
  118. package/dist/esm/types/chartType/boxplot/zBoxplot.js.map +1 -1
  119. package/dist/esm/types/chartType/column/column.d.ts +6 -1
  120. package/dist/esm/types/chartType/column/zColumn.d.ts +5 -0
  121. package/dist/esm/types/chartType/column/zColumn.js +2 -1
  122. package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
  123. package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +6 -1
  124. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +5 -0
  125. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +2 -1
  126. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
  127. package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +6 -1
  128. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +5 -0
  129. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js +2 -1
  130. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
  131. package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +6 -1
  132. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +5 -0
  133. package/dist/esm/types/chartType/dualAxis/zDualAxis.js +2 -1
  134. package/dist/esm/types/chartType/dualAxis/zDualAxis.js.map +1 -1
  135. package/dist/esm/types/chartType/histogram/histogram.d.ts +6 -1
  136. package/dist/esm/types/chartType/histogram/zHistogram.d.ts +5 -0
  137. package/dist/esm/types/chartType/histogram/zHistogram.js +2 -1
  138. package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -1
  139. package/dist/esm/types/chartType/line/line.d.ts +6 -1
  140. package/dist/esm/types/chartType/line/zLine.d.ts +5 -0
  141. package/dist/esm/types/chartType/line/zLine.js +2 -1
  142. package/dist/esm/types/chartType/line/zLine.js.map +1 -1
  143. package/dist/esm/types/chartType/scatter/scatter.d.ts +6 -1
  144. package/dist/esm/types/chartType/scatter/zScatter.d.ts +5 -0
  145. package/dist/esm/types/chartType/scatter/zScatter.js +2 -1
  146. package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
  147. package/dist/esm/types/index.d.ts +1 -0
  148. package/dist/esm/types/index.js +1 -0
  149. package/dist/esm/types/properties/config/area.d.ts +10 -0
  150. package/dist/esm/types/properties/config/area.js +3 -1
  151. package/dist/esm/types/properties/config/area.js.map +1 -1
  152. package/dist/esm/types/properties/config/bar.d.ts +15 -0
  153. package/dist/esm/types/properties/config/bar.js +3 -1
  154. package/dist/esm/types/properties/config/bar.js.map +1 -1
  155. package/dist/esm/types/properties/config/boxplot.d.ts +5 -0
  156. package/dist/esm/types/properties/config/boxplot.js +3 -1
  157. package/dist/esm/types/properties/config/boxplot.js.map +1 -1
  158. package/dist/esm/types/properties/config/column.d.ts +15 -0
  159. package/dist/esm/types/properties/config/column.js +3 -1
  160. package/dist/esm/types/properties/config/column.js.map +1 -1
  161. package/dist/esm/types/properties/config/config.d.ts +65 -0
  162. package/dist/esm/types/properties/config/dimensionLinkage/dimensionLinkage.d.ts +23 -0
  163. package/dist/esm/types/properties/config/dimensionLinkage/dimensionLinkage.js +9 -0
  164. package/dist/esm/types/properties/config/dimensionLinkage/dimensionLinkage.js.map +1 -0
  165. package/dist/esm/types/properties/config/dimensionLinkage/index.d.ts +1 -0
  166. package/dist/esm/types/properties/config/dimensionLinkage/index.js +1 -0
  167. package/dist/esm/types/properties/config/dualAxis.d.ts +5 -0
  168. package/dist/esm/types/properties/config/dualAxis.js +3 -1
  169. package/dist/esm/types/properties/config/dualAxis.js.map +1 -1
  170. package/dist/esm/types/properties/config/histogram.d.ts +5 -0
  171. package/dist/esm/types/properties/config/histogram.js +3 -1
  172. package/dist/esm/types/properties/config/histogram.js.map +1 -1
  173. package/dist/esm/types/properties/config/index.d.ts +1 -0
  174. package/dist/esm/types/properties/config/index.js +1 -0
  175. package/dist/esm/types/properties/config/label/pieLabel.d.ts +2 -2
  176. package/dist/esm/types/properties/config/line.d.ts +5 -0
  177. package/dist/esm/types/properties/config/line.js +3 -1
  178. package/dist/esm/types/properties/config/line.js.map +1 -1
  179. package/dist/esm/types/properties/config/scatter.d.ts +5 -0
  180. package/dist/esm/types/properties/config/scatter.js +3 -1
  181. package/dist/esm/types/properties/config/scatter.js.map +1 -1
  182. package/dist/esm/types/properties/regressionLine/ecdfRegressionLine.d.ts +2 -2
  183. package/dist/esm/types/properties/regressionLine/kdeRegressionLine.d.ts +2 -2
  184. package/dist/esm/types/properties/regressionLine/linearRegressionLine.d.ts +2 -2
  185. package/dist/esm/types/properties/regressionLine/logisticRegressionLine.d.ts +2 -2
  186. package/dist/esm/types/properties/regressionLine/lowessRegressionLine.d.ts +2 -2
  187. package/dist/esm/types/properties/regressionLine/polynomialRegressionLine.d.ts +2 -2
  188. package/dist/esm/types/properties/theme/customTheme.d.ts +130 -0
  189. package/dist/esm/types/zVseed.d.ts +65 -0
  190. package/dist/umd/index.js +540 -205
  191. package/dist/umd/index.js.map +1 -1
  192. package/package.json +5 -5
package/dist/umd/index.js CHANGED
@@ -40,6 +40,7 @@
40
40
  zCrosshairRect: ()=>zCrosshairRect,
41
41
  scatterSpecPipeline: ()=>scatterSpecPipeline,
42
42
  intl: ()=>intl,
43
+ selectByValue: ()=>selectByValue,
43
44
  zAnnotationPointConfig: ()=>zAnnotationPointConfig,
44
45
  columnPercentAdvancedPipeline: ()=>columnPercentAdvancedPipeline,
45
46
  zColumnConfig: ()=>zColumnConfig,
@@ -70,6 +71,7 @@
70
71
  zColumnParallel: ()=>zColumnParallel,
71
72
  zDimensions: ()=>zDimensions,
72
73
  zLegend: ()=>zLegend,
74
+ zSelector: ()=>zSelector,
73
75
  LINEAR_AXIS_INNER_OFFSET_TOP: ()=>12,
74
76
  replaceNullToUndefined: ()=>replaceNullToUndefined,
75
77
  zHeatmap: ()=>zHeatmap,
@@ -123,11 +125,13 @@
123
125
  FoldSecondaryMeasureValue: ()=>FoldSecondaryMeasureValue,
124
126
  zSort: ()=>zSort,
125
127
  isPivotChart: ()=>isPivotChart,
126
- zDualAxisConfig: ()=>zDualAxisConfig,
128
+ selectByMeasure: ()=>selectByMeasure,
127
129
  Q1MeasureValue: ()=>"__Q1__",
130
+ zDualAxisConfig: ()=>zDualAxisConfig,
128
131
  zLineConfig: ()=>zLineConfig,
129
132
  FoldPrimaryMeasureValue: ()=>FoldPrimaryMeasureValue,
130
133
  zXBandAxis: ()=>zXBandAxis,
134
+ zSelectors: ()=>zSelectors,
131
135
  FoldYMeasureId: ()=>FoldYMeasureId,
132
136
  findMeasureById: ()=>findMeasureById,
133
137
  AngleEncoding: ()=>AngleEncoding,
@@ -154,24 +158,25 @@
154
158
  columnParallelAdvancedPipeline: ()=>columnParallelAdvancedPipeline,
155
159
  zColumnPercent: ()=>zColumnPercent,
156
160
  foldMeasures: ()=>foldMeasures,
157
- zFunnel: ()=>zFunnel,
158
- zDimensionEncoding: ()=>zDimensionEncoding,
159
161
  isPivotTable: ()=>isPivotTable,
162
+ zDimensionEncoding: ()=>zDimensionEncoding,
160
163
  registerPie: ()=>registerPie,
164
+ LowerWhisker: ()=>LowerWhisker,
161
165
  zEcdfRegressionLine: ()=>zEcdfRegressionLine,
162
166
  zBarParallelConfig: ()=>zBarParallelConfig,
163
- LowerWhisker: ()=>LowerWhisker,
164
167
  lineAdvancedPipeline: ()=>lineAdvancedPipeline,
165
168
  AXIS_LABEL_SPACE: ()=>8,
166
169
  FoldMeasureValue: ()=>FoldMeasureValue,
170
+ zFunnel: ()=>zFunnel,
167
171
  ANNOTATION_Z_INDEX: ()=>1000,
168
172
  Q3MeasureValue: ()=>"__Q3__",
169
173
  createFormatter: ()=>createFormatter,
170
174
  columnPercentSpecPipeline: ()=>columnPercentSpecPipeline,
171
175
  BAND_AXIS_INNER_OFFSET_IN_PIVOT: ()=>2,
176
+ selectByPartial: ()=>selectByPartial,
172
177
  isMeasureSelector: ()=>isMeasureSelector,
173
- areaAdvancedPipeline: ()=>areaAdvancedPipeline,
174
178
  zBarConfig: ()=>zBarConfig,
179
+ areaAdvancedPipeline: ()=>areaAdvancedPipeline,
175
180
  areaPercentSpecPipeline: ()=>areaPercentSpecPipeline,
176
181
  barParallelSpecPipeline: ()=>barParallelSpecPipeline,
177
182
  zPie: ()=>zPie,
@@ -196,6 +201,7 @@
196
201
  zYBandAxis: ()=>zYBandAxis,
197
202
  BinPercentageMeasureId: ()=>BinPercentageMeasureId,
198
203
  Separator: ()=>"-",
204
+ zDimensionLinkage: ()=>zDimensionLinkage,
199
205
  findAllMeasures: ()=>findAllMeasures,
200
206
  zColorLegend: ()=>zColorLegend,
201
207
  UpperWhisker: ()=>UpperWhisker,
@@ -205,6 +211,7 @@
205
211
  registerHistogram: ()=>registerHistogram,
206
212
  zRoseParallel: ()=>zRoseParallel,
207
213
  MeasureName: ()=>MeasureName,
214
+ selectorDatum: ()=>selectorDatum,
208
215
  zRegressionLine: ()=>zRegressionLine,
209
216
  zNumFormat: ()=>zNumFormat,
210
217
  FoldYMeasureValue: ()=>FoldYMeasureValue,
@@ -227,6 +234,7 @@
227
234
  checkVSeed: ()=>checkVSeed,
228
235
  zPivotTable: ()=>zPivotTable,
229
236
  registerLightTheme: ()=>registerLightTheme,
237
+ selectByDmension: ()=>selectByDmension,
230
238
  isPartialDatumSelector: ()=>isPartialDatumSelector,
231
239
  isDimensionGroup: ()=>isDimensionGroup,
232
240
  registerPivotTable: ()=>registerPivotTable,
@@ -287,8 +295,8 @@
287
295
  MeasureEncodingEnum: ()=>MeasureEncodingEnum,
288
296
  FoldXMeasureValue: ()=>FoldXMeasureValue,
289
297
  boxplotAdvancedPipeline: ()=>boxplotAdvancedPipeline,
290
- zEncoding: ()=>zEncoding,
291
298
  dualAxisAdvancedPipeline: ()=>dualAxisAdvancedPipeline,
299
+ zEncoding: ()=>zEncoding,
292
300
  ColorEncoding: ()=>ColorEncoding,
293
301
  measureDepth: ()=>measureDepth,
294
302
  BinCountMeasureId: ()=>BinCountMeasureId,
@@ -387,7 +395,7 @@
387
395
  vseed: builder.vseed,
388
396
  customTheme: Builder.getThemeMap()
389
397
  };
390
- if (builder.vseed.locale) intl.setLocale(builder.vseed.locale);
398
+ if (builder.locale) intl.setLocale(builder.locale);
391
399
  try {
392
400
  const advancedVSeed = execPipeline(pipeline, context);
393
401
  builder.advancedVSeed = advancedVSeed;
@@ -409,7 +417,7 @@
409
417
  vseed: builder.vseed,
410
418
  advancedVSeed
411
419
  };
412
- if (builder.vseed.locale) intl.setLocale(builder.vseed.locale);
420
+ if (builder.locale) intl.setLocale(builder.locale);
413
421
  try {
414
422
  const spec = execPipeline(pipeline, context);
415
423
  builder.spec = spec;
@@ -687,9 +695,13 @@
687
695
  _advancedVSeed = null;
688
696
  _spec = null;
689
697
  _performance = {};
698
+ _locale;
690
699
  constructor(vseed){
691
700
  this._vseed = vseed;
692
- this._vseed.locale = vseed.locale || intl.getLocale();
701
+ this._locale = vseed.locale || intl.getLocale();
702
+ }
703
+ get locale() {
704
+ return this._locale;
693
705
  }
694
706
  build = ()=>build(this);
695
707
  buildSpec = (advanced)=>buildSpec(this, advanced);
@@ -1418,6 +1430,12 @@
1418
1430
  for (let r of e)delete o[r];
1419
1431
  return o;
1420
1432
  }
1433
+ function nearlyEqual(a, b, epsilon = 1e-8) {
1434
+ if (Number.isNaN(a) || Number.isNaN(b)) return false;
1435
+ if (a === b) return true;
1436
+ const diff = Math.abs(a - b);
1437
+ return diff <= epsilon;
1438
+ }
1421
1439
  const selector_selector = (vchartDatum, selector, selectorMode = 'And')=>{
1422
1440
  if (!selector) return true;
1423
1441
  const vchartKeys = Object.keys(vchartDatum).filter((k)=>k.toLocaleLowerCase().startsWith('__vchart'));
@@ -1426,58 +1444,44 @@
1426
1444
  selector
1427
1445
  ];
1428
1446
  return selectors['And' === selectorMode ? 'every' : 'some']((selector)=>{
1429
- if (isValueSelector(selector)) {
1430
- if (Object.values(datum).find((v)=>v === selector)) return true;
1431
- } else if (isMeasureSelector(selector)) {
1432
- const op = selector.operator || selector.op;
1433
- const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
1434
- selector.value
1435
- ];
1436
- switch(op){
1437
- case '=':
1438
- if (String(datum[selector.field]) === String(selectorValueArr[0])) return true;
1439
- break;
1440
- case '==':
1441
- if (datum[selector.field] === selectorValueArr[0]) return true;
1442
- break;
1443
- case '!=':
1444
- if (datum[selector.field] !== selectorValueArr[0]) return true;
1445
- break;
1446
- case '>':
1447
- if (datum[selector.field] > selectorValueArr[0]) return true;
1448
- break;
1449
- case '<':
1450
- if (datum[selector.field] < selectorValueArr[0]) return true;
1451
- break;
1452
- case '>=':
1453
- if (datum[selector.field] >= selectorValueArr[0]) return true;
1454
- break;
1455
- case '<=':
1456
- if (datum[selector.field] <= selectorValueArr[0]) return true;
1457
- break;
1458
- case 'between':
1459
- if (Array.isArray(selector.value) && datum[selector.field] >= selectorValueArr[0] && datum[selector.field] <= selectorValueArr[1]) return true;
1460
- break;
1461
- }
1462
- } else if (isDimensionSelector(selector)) {
1463
- const op = selector.operator || selector.op;
1464
- const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
1465
- selector.value
1466
- ];
1467
- switch(op){
1468
- case 'in':
1469
- if (selectorValueArr.includes(datum[selector.field])) return true;
1470
- break;
1471
- case 'not in':
1472
- if (!selectorValueArr.includes(datum[selector.field])) return true;
1473
- break;
1474
- }
1475
- } else if (isPartialDatumSelector(selector)) {
1476
- if (Object.keys(selector).every((key)=>datum[key] === selector[key])) return true;
1477
- }
1447
+ if (isValueSelector(selector)) return selectByValue(selector, datum);
1448
+ if (isMeasureSelector(selector)) return selectByMeasure(selector, datum);
1449
+ if (isDimensionSelector(selector)) return selectByDmension(selector, datum);
1450
+ if (isPartialDatumSelector(selector)) return selectByPartial(selector, datum);
1478
1451
  return false;
1479
1452
  });
1480
1453
  };
1454
+ const selectorDatum = (datum, selector)=>{
1455
+ if (!selector) return [];
1456
+ const selectors = Array.isArray(selector) ? selector : [
1457
+ selector
1458
+ ];
1459
+ let finalResult = [];
1460
+ for (const selector of selectors){
1461
+ const results = [];
1462
+ if (isValueSelector(selector)) Object.entries(datum).forEach(([key, value])=>{
1463
+ if (value === selector) results.push({
1464
+ [key]: value
1465
+ });
1466
+ });
1467
+ else if (isMeasureSelector(selector) && selectByMeasure(selector, datum)) results.push({
1468
+ [selector.field]: datum[selector.field]
1469
+ });
1470
+ else if (isDimensionSelector(selector) && selectByDmension(selector, datum)) results.push({
1471
+ [selector.field]: datum[selector.field]
1472
+ });
1473
+ else if (isPartialDatumSelector(selector) && selectByPartial(selector, datum)) results.push(selector);
1474
+ if (results.length) finalResult = finalResult.length ? finalResult.flatMap((prev)=>results.map((r)=>({
1475
+ ...prev,
1476
+ ...r
1477
+ }))) : results;
1478
+ else {
1479
+ finalResult = [];
1480
+ break;
1481
+ }
1482
+ }
1483
+ return finalResult;
1484
+ };
1481
1485
  const isValueSelector = (selector)=>'string' == typeof selector || 'number' == typeof selector;
1482
1486
  const isPartialDatumSelector = (selector)=>'object' == typeof selector && null !== selector;
1483
1487
  const isMeasureSelector = (selector)=>'object' == typeof selector && null !== selector && 'field' in selector && ('operator' in selector || 'op' in selector) && 'value' in selector && ([
@@ -1506,6 +1510,56 @@
1506
1510
  'in',
1507
1511
  'not in'
1508
1512
  ].includes(selector.op));
1513
+ const selectByMeasure = (selector, datum)=>{
1514
+ const op = selector.operator || selector.op;
1515
+ const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
1516
+ selector.value
1517
+ ];
1518
+ switch(op){
1519
+ case '=':
1520
+ if (String(datum[selector.field]) === String(selectorValueArr[0]) || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
1521
+ break;
1522
+ case '==':
1523
+ if (datum[selector.field] === selectorValueArr[0]) return true;
1524
+ break;
1525
+ case '!=':
1526
+ if (datum[selector.field] !== selectorValueArr[0]) return true;
1527
+ break;
1528
+ case '>':
1529
+ if (datum[selector.field] > selectorValueArr[0] && !nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
1530
+ break;
1531
+ case '<':
1532
+ if (datum[selector.field] < selectorValueArr[0] && !nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
1533
+ break;
1534
+ case '>=':
1535
+ if (datum[selector.field] >= selectorValueArr[0] || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
1536
+ break;
1537
+ case '<=':
1538
+ if (datum[selector.field] <= selectorValueArr[0] || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
1539
+ break;
1540
+ case 'between':
1541
+ if (Array.isArray(selector.value) && (datum[selector.field] >= selectorValueArr[0] || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) && (datum[selector.field] <= selectorValueArr[1] || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[1])))) return true;
1542
+ break;
1543
+ }
1544
+ return false;
1545
+ };
1546
+ const selectByDmension = (selector, datum)=>{
1547
+ const op = selector.operator || selector.op;
1548
+ const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
1549
+ selector.value
1550
+ ];
1551
+ switch(op){
1552
+ case 'in':
1553
+ if (selectorValueArr.includes(datum[selector.field])) return true;
1554
+ break;
1555
+ case 'not in':
1556
+ if (!selectorValueArr.includes(datum[selector.field])) return true;
1557
+ break;
1558
+ }
1559
+ return false;
1560
+ };
1561
+ const selectByPartial = (selector, datum)=>Object.keys(selector).every((key)=>datum[key] === selector[key]);
1562
+ const selectByValue = (selector, datum)=>Object.values(datum).some((v)=>v === selector);
1509
1563
  const tableStyleMap = {
1510
1564
  backgroundColor: 'bgColor',
1511
1565
  textColor: 'color',
@@ -2497,7 +2551,7 @@
2497
2551
  const { dataset, chartType } = vseed;
2498
2552
  const { encoding } = advancedVSeed;
2499
2553
  const colorMeasureId = getColorMeasureId(advancedVSeed, vseed);
2500
- const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? [], (item)=>item.id), T(advancedVSeed.reshapeMeasures ?? findAllMeasures(advancedVSeed.measures), (item)=>item.id), encoding, {
2554
+ const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? [], (item)=>item.id), T(findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures), (item)=>item.id), encoding, {
2501
2555
  colorItemAsId: false,
2502
2556
  colorMeasureId
2503
2557
  });
@@ -2635,7 +2689,8 @@
2635
2689
  'tooltip',
2636
2690
  'xAxis',
2637
2691
  'yAxis',
2638
- 'crosshairLine'
2692
+ 'crosshairLine',
2693
+ 'dimensionLinkage'
2639
2694
  ]);
2640
2695
  const config = replaceNullToUndefined(pickedConfig);
2641
2696
  result.config = {
@@ -2883,11 +2938,12 @@
2883
2938
  };
2884
2939
  const { advancedVSeed, vseed } = context;
2885
2940
  const { chartType } = vseed;
2886
- const { measures, dimensions, encoding } = advancedVSeed;
2941
+ const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed;
2887
2942
  const config = advancedVSeed.config?.[chartType]?.xAxis ?? {};
2888
2943
  if (!result.axes) result.axes = [];
2889
2944
  const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange } = config;
2890
2945
  const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
2946
+ const onlyMeasureId = 0 === (encoding.x || []).filter((v)=>v !== MeasureId).length;
2891
2947
  const bandAxis = {
2892
2948
  visible,
2893
2949
  type: 'band',
@@ -2956,6 +3012,14 @@
2956
3012
  0.1
2957
3013
  ]
2958
3014
  };
3015
+ if (onlyMeasureId && bandAxis.label) {
3016
+ const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
3017
+ const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
3018
+ ...prev,
3019
+ ...cur.unfoldInfo.colorIdMap
3020
+ }), {});
3021
+ bandAxis.label.formatMethod = (text)=>common_isArray(text) ? text : colorIdMap[String(text)]?.alias ?? text;
3022
+ }
2959
3023
  result.axes = [
2960
3024
  ...result.axes,
2961
3025
  bandAxis
@@ -3104,6 +3168,9 @@
3104
3168
  }
3105
3169
  }
3106
3170
  };
3171
+ const xAxisConfig = result.axes?.find((v)=>'bottom' === v.orient);
3172
+ const xAxisFormatter = xAxisConfig?.label?.formatMethod;
3173
+ if (xAxisFormatter) crosshair.xField.label.formatMethod = (text)=>xAxisFormatter(text);
3107
3174
  return result;
3108
3175
  };
3109
3176
  const discreteLegend = (spec, context)=>{
@@ -3745,7 +3812,8 @@
3745
3812
  ...meaContent
3746
3813
  ];
3747
3814
  };
3748
- const isSubset = (sub, obj)=>Object.entries(sub).every(([key, value])=>{
3815
+ const isSubset = (sub, obj, excludeMeasuresIds)=>Object.entries(sub).every(([key, value])=>{
3816
+ if (excludeMeasuresIds && excludeMeasuresIds.includes(key)) return false;
3749
3817
  if ('string' == typeof value) return obj[key] === value;
3750
3818
  if ('number' == typeof value) return obj[key] === value;
3751
3819
  return true;
@@ -5015,6 +5083,21 @@
5015
5083
  borderColor,
5016
5084
  cornerRadius: frameCornerRadius,
5017
5085
  borderLineWidth: outlineBorderLineWidth
5086
+ },
5087
+ axisStyle: {
5088
+ leftAxisStyle: {
5089
+ cellPaddingLeft: 10
5090
+ },
5091
+ bottomAxisStyle: {
5092
+ cellPaddingBottom: 4
5093
+ },
5094
+ rightAxisStyle: {
5095
+ cellPaddingRight: 4
5096
+ }
5097
+ },
5098
+ scrollStyle: {
5099
+ visible: 'scrolling',
5100
+ hoverOn: false
5018
5101
  }
5019
5102
  }
5020
5103
  };
@@ -5045,6 +5128,7 @@
5045
5128
  ...context,
5046
5129
  advancedVSeed: {
5047
5130
  ...advancedVSeed,
5131
+ pivotAllDatasetReshapeInfo: datasetReshapeInfo,
5048
5132
  datasetReshapeInfo: newDatasetReshapeInfo,
5049
5133
  encoding: Object.keys(encoding).reduce((res, key)=>{
5050
5134
  res[key] = encoding[key]?.filter((e)=>!invalideMeasuresIds.includes(e));
@@ -5389,6 +5473,51 @@
5389
5473
  legends
5390
5474
  };
5391
5475
  };
5476
+ const defaultScatterFormatter = (val)=>{
5477
+ if (chunk_JK3VNB42_n(val)) return '';
5478
+ if ('string' == typeof val) return val;
5479
+ if (0 === val) return '0';
5480
+ if (Math.abs(val) < 1) return val.toFixed(2);
5481
+ return val === Math.floor(val) ? `${val}` : val.toFixed(1);
5482
+ };
5483
+ const dimensionLinkage = (spec, context)=>{
5484
+ const { advancedVSeed, vseed } = context;
5485
+ const { chartType } = vseed;
5486
+ const config = advancedVSeed.config?.[chartType]?.dimensionLinkage ?? {};
5487
+ if (false === config.enable) return spec;
5488
+ const indicators = spec.indicators;
5489
+ const labelHoverOnAxis = {};
5490
+ const chartSpec = indicators?.[0]?.chartSpec;
5491
+ const crosshair = chartSpec?.crosshair;
5492
+ if (crosshair?.xField) labelHoverOnAxis.bottom = {
5493
+ visible: config.showLabel ?? crosshair.xField.label?.visible ?? true,
5494
+ background: crosshair.xField.label?.labelBackground,
5495
+ textStyle: crosshair.xField.label?.style,
5496
+ formatMethod: 'scatter' === chartType ? defaultScatterFormatter : void 0
5497
+ };
5498
+ if (crosshair?.yField) labelHoverOnAxis.left = {
5499
+ visible: config.showLabel ?? crosshair.yField.label?.visible ?? true,
5500
+ background: crosshair.yField.label?.labelBackground,
5501
+ textStyle: crosshair.yField.label?.style,
5502
+ formatMethod: 'scatter' === chartType ? defaultScatterFormatter : void 0
5503
+ };
5504
+ if (indicators && indicators.length) indicators.forEach((ind)=>{
5505
+ const crosshair = ind?.chartSpec?.crosshair;
5506
+ if (crosshair?.xField) crosshair.xField.label = {
5507
+ visible: false
5508
+ };
5509
+ if (crosshair?.yField) crosshair.yField.label = {
5510
+ visible: false
5511
+ };
5512
+ });
5513
+ spec.chartDimensionLinkage = {
5514
+ showTooltip: config.showTooltip ?? chartSpec?.tooltip?.dimension?.visible ?? true,
5515
+ heightLimitToShowTooltipForLastRow: 60,
5516
+ widthLimitToShowTooltipForLastColumn: 90,
5517
+ labelHoverOnAxis
5518
+ };
5519
+ return spec;
5520
+ };
5392
5521
  const pivotAdapter_pivotAdapter = (pipeline, pivotPipeline)=>{
5393
5522
  const adapted = (spec, context)=>{
5394
5523
  const { vseed } = context;
@@ -5447,7 +5576,8 @@
5447
5576
  pivotRowDimensions,
5448
5577
  pivotColumnDimensions,
5449
5578
  pivotTitle,
5450
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
5579
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
5580
+ dimensionLinkage
5451
5581
  ];
5452
5582
  const lineSpecPipeline = [
5453
5583
  pivotAdapter_pivotAdapter(line_line, pivotLine)
@@ -5542,7 +5672,8 @@
5542
5672
  'crosshairRect',
5543
5673
  'stackCornerRadius',
5544
5674
  'barMaxWidth',
5545
- 'barGapInGroup'
5675
+ 'barGapInGroup',
5676
+ 'dimensionLinkage'
5546
5677
  ]);
5547
5678
  const config = replaceNullToUndefined(pickedConfig);
5548
5679
  result.config = {
@@ -5707,6 +5838,9 @@
5707
5838
  }
5708
5839
  }
5709
5840
  };
5841
+ const xAxisConfig = result.axes?.find((v)=>'bottom' === v.orient);
5842
+ const xAxisFormatter = xAxisConfig?.label?.formatMethod;
5843
+ if (xAxisFormatter) crosshair.xField.label.formatMethod = (text)=>xAxisFormatter(text);
5710
5844
  return result;
5711
5845
  };
5712
5846
  const colorBarStyleFill = (stylePipe)=>(spec, context)=>{
@@ -6012,7 +6146,9 @@
6012
6146
  }
6013
6147
  return 0 === sst ? 0 : 1 - ssr / sst;
6014
6148
  }
6015
- function regressionLinear(data, x = (d)=>d.x, y = (d)=>d.y) {
6149
+ function regressionLinear(data, x = (d)=>d.x, y = (d)=>d.y, options) {
6150
+ var _a;
6151
+ const alpha = null != (_a = null == options ? void 0 : options.alpha) ? _a : .05;
6016
6152
  let n = 0, meanX = 0, meanY = 0, meanXY = 0, meanX2 = 0;
6017
6153
  visitPoints(data, x, y, (xi, yi)=>{
6018
6154
  n++, meanX += (xi - meanX) / n, meanY += (yi - meanY) / n, meanXY += (xi * yi - meanXY) / n, meanX2 += (xi * xi - meanX2) / n;
@@ -6045,7 +6181,7 @@
6045
6181
  }
6046
6182
  return out;
6047
6183
  },
6048
- confidenceInterval: function(N = 50, alpha = .05) {
6184
+ confidenceInterval: function(N = 50) {
6049
6185
  const out = [];
6050
6186
  if (0 === comps.n || N <= 0) return out;
6051
6187
  const z = invNorm(1 - alpha / 2);
@@ -6107,10 +6243,10 @@
6107
6243
  return x;
6108
6244
  }
6109
6245
  function regressionPolynomial(data, x = (d)=>d.x, y = (d)=>d.y, options = {}) {
6110
- var _a;
6246
+ var _a, _b;
6111
6247
  let degree = null != (_a = options.degree) ? _a : 0;
6112
6248
  degree < 0 && (degree = 0);
6113
- const m = degree + 1, sums = new Array(2 * degree + 1).fill(0);
6249
+ const alpha = null != (_b = options.alpha) ? _b : .05, m = degree + 1, sums = new Array(2 * degree + 1).fill(0);
6114
6250
  visitPoints(data, x, y, (dx, dy)=>{
6115
6251
  let xp = 1;
6116
6252
  for(let k = 0; k < sums.length; k++)sums[k] += xp, xp *= dx;
@@ -6165,7 +6301,7 @@
6165
6301
  }
6166
6302
  return out;
6167
6303
  },
6168
- confidenceInterval (N = 50, alpha = .05) {
6304
+ confidenceInterval (N = 50) {
6169
6305
  const out = [];
6170
6306
  if (N <= 0) return out;
6171
6307
  const comps = computeLinearCIComponents(data, x, y, predict);
@@ -6226,16 +6362,18 @@
6226
6362
  const lineTheme = advancedVSeed.config[chartType]?.regressionLine;
6227
6363
  if (!regressionLine || !regressionLine.polynomialRegressionLine) return result;
6228
6364
  const lineList = array_array(regressionLine.polynomialRegressionLine);
6229
- if (!result.customMark) result.customMark = [];
6365
+ if (!result.extensionMark) result.extensionMark = [];
6230
6366
  lineList.forEach((line, lineIndex)=>{
6367
+ if (false === line.enable) return;
6231
6368
  const theme = lineTheme.linearRegressionLine ?? {};
6232
6369
  const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight, confidenceIntervalOpacity, confidenceIntervalVisible = theme.confidenceIntervalVisible } = line;
6233
6370
  const childrenMarks = [];
6234
- result.customMark.push({
6371
+ result.extensionMark.push({
6235
6372
  type: 'group',
6236
6373
  interactive: false,
6237
6374
  zIndex: 500,
6238
6375
  name: `polynomialRegressionLine-${lineIndex}`,
6376
+ dataId: spec.data?.id,
6239
6377
  style: {
6240
6378
  data: (datum, ctx)=>{
6241
6379
  const vchart = ctx.vchart;
@@ -6244,8 +6382,7 @@
6244
6382
  if (s) {
6245
6383
  const rect = s.getRegion().getLayoutRect();
6246
6384
  if (0 === rect.width || 0 === rect.height) return null;
6247
- const start = s.getRegion().getLayoutStartPoint();
6248
- const yClamper = clamper(start.y, start.y + rect.height);
6385
+ const yClamper = clamper(0, 0 + rect.height);
6249
6386
  const data = s.getViewData()?.latestData;
6250
6387
  const fieldX = s.fieldX?.[0];
6251
6388
  const fieldY = s.fieldY?.[0];
@@ -6270,8 +6407,8 @@
6270
6407
  [fieldY]: datum.y
6271
6408
  };
6272
6409
  return {
6273
- x: s.dataToPositionX(d) + start.x + halfBandWidth,
6274
- y: yClamper(s.dataToPositionY(d) + start.y)
6410
+ x: s.dataToPositionX(d) + halfBandWidth,
6411
+ y: yClamper(s.dataToPositionY(d))
6275
6412
  };
6276
6413
  });
6277
6414
  const result = {
@@ -6286,11 +6423,11 @@
6286
6423
  [fieldY]: datum.lower
6287
6424
  };
6288
6425
  return {
6289
- x: s.dataToPositionX(d) + start.x + halfBandWidth,
6290
- y: yClamper(s.dataToPositionY(d) + start.y),
6426
+ x: s.dataToPositionX(d) + halfBandWidth,
6427
+ y: yClamper(s.dataToPositionY(d)),
6291
6428
  y1: yClamper(s.dataToPositionY({
6292
6429
  [fieldY]: datum.upper
6293
- }) + start.y)
6430
+ }))
6294
6431
  };
6295
6432
  });
6296
6433
  }
@@ -6305,6 +6442,7 @@
6305
6442
  type: 'area',
6306
6443
  interactive: false,
6307
6444
  zIndex: 500,
6445
+ dataId: spec.data?.id,
6308
6446
  style: {
6309
6447
  lineWidth: lineWidth ?? theme.lineWidth,
6310
6448
  lineDash: lineDash ?? theme.lineDash,
@@ -6321,6 +6459,7 @@
6321
6459
  type: 'line',
6322
6460
  interactive: false,
6323
6461
  zIndex: 500,
6462
+ dataId: spec.data?.id,
6324
6463
  style: {
6325
6464
  lineWidth: lineWidth ?? theme.lineWidth,
6326
6465
  lineDash: lineDash ?? theme.lineDash,
@@ -6336,6 +6475,7 @@
6336
6475
  type: 'text',
6337
6476
  interactive: false,
6338
6477
  zIndex: 500,
6478
+ dataId: spec.data?.id,
6339
6479
  style: {
6340
6480
  textAlign: 'end',
6341
6481
  fill: textColor ?? theme.textColor,
@@ -6412,7 +6552,8 @@
6412
6552
  pivotRowDimensions,
6413
6553
  pivotColumnDimensions,
6414
6554
  pivotTitle,
6415
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
6555
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
6556
+ dimensionLinkage
6416
6557
  ];
6417
6558
  const columnSpecPipeline = [
6418
6559
  pivotAdapter_pivotAdapter(column, pivotColumn)
@@ -6612,7 +6753,8 @@
6612
6753
  pivotRowDimensions,
6613
6754
  pivotColumnDimensions,
6614
6755
  pivotTitle,
6615
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
6756
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
6757
+ dimensionLinkage
6616
6758
  ];
6617
6759
  const columnParallelSpecPipeline = [
6618
6760
  pivotAdapter_pivotAdapter(columnParallel, pivotColumnParallel)
@@ -6709,7 +6851,8 @@
6709
6851
  pivotRowDimensions,
6710
6852
  pivotColumnDimensions,
6711
6853
  pivotTitle,
6712
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
6854
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
6855
+ dimensionLinkage
6713
6856
  ];
6714
6857
  const columnPercentSpecPipeline = [
6715
6858
  pivotAdapter_pivotAdapter(columnPercent, pivotColumnPercent)
@@ -6992,11 +7135,12 @@
6992
7135
  };
6993
7136
  const { advancedVSeed, vseed } = context;
6994
7137
  const { chartType } = vseed;
6995
- const { measures, dimensions, encoding } = advancedVSeed;
7138
+ const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed;
6996
7139
  const config = advancedVSeed.config?.[chartType]?.yAxis ?? {};
6997
7140
  if (!result.axes) result.axes = [];
6998
7141
  const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange } = config;
6999
7142
  const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
7143
+ const onlyMeasureId = 0 === (encoding.y || []).filter((v)=>v !== MeasureId).length;
7000
7144
  const bandAxis = {
7001
7145
  visible,
7002
7146
  type: 'band',
@@ -7066,6 +7210,14 @@
7066
7210
  0.1
7067
7211
  ]
7068
7212
  };
7213
+ if (onlyMeasureId && bandAxis.label) {
7214
+ const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
7215
+ const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
7216
+ ...prev,
7217
+ ...cur.unfoldInfo.colorIdMap
7218
+ }), {});
7219
+ bandAxis.label.formatMethod = (text)=>common_isArray(text) ? text : colorIdMap[String(text)]?.alias ?? text;
7220
+ }
7069
7221
  result.axes = [
7070
7222
  ...result.axes,
7071
7223
  bandAxis
@@ -7110,6 +7262,9 @@
7110
7262
  }
7111
7263
  }
7112
7264
  };
7265
+ const yAxisConfig = result.axes?.find((v)=>'left' === v.orient);
7266
+ const yAxisFormatter = yAxisConfig?.label?.formatMethod;
7267
+ if (yAxisFormatter) crosshair.yField.label.formatMethod = (text)=>yAxisFormatter(text);
7113
7268
  return result;
7114
7269
  };
7115
7270
  const bar = [
@@ -7159,7 +7314,8 @@
7159
7314
  pivotRowDimensions,
7160
7315
  pivotColumnDimensions,
7161
7316
  pivotTitle,
7162
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
7317
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
7318
+ dimensionLinkage
7163
7319
  ];
7164
7320
  const barSpecPipeline = [
7165
7321
  pivotAdapter_pivotAdapter(bar, pivotBar)
@@ -7273,7 +7429,8 @@
7273
7429
  pivotRowDimensions,
7274
7430
  pivotColumnDimensions,
7275
7431
  pivotTitle,
7276
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
7432
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
7433
+ dimensionLinkage
7277
7434
  ];
7278
7435
  const barParallelSpecPipeline = [
7279
7436
  pivotAdapter_pivotAdapter(barParallel, pivotBarParallel)
@@ -7360,7 +7517,8 @@
7360
7517
  pivotRowDimensions,
7361
7518
  pivotColumnDimensions,
7362
7519
  pivotTitle,
7363
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
7520
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
7521
+ dimensionLinkage
7364
7522
  ];
7365
7523
  const barPercentSpecPipeline = [
7366
7524
  pivotAdapter_pivotAdapter(barPercent, pivotBarPercent)
@@ -7557,7 +7715,8 @@
7557
7715
  pivotRowDimensions,
7558
7716
  pivotColumnDimensions,
7559
7717
  pivotTitle,
7560
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
7718
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
7719
+ dimensionLinkage
7561
7720
  ];
7562
7721
  const areaSpecPipeline = [
7563
7722
  pivotAdapter_pivotAdapter(area_area, pivotArea)
@@ -7649,7 +7808,8 @@
7649
7808
  pivotRowDimensions,
7650
7809
  pivotColumnDimensions,
7651
7810
  pivotTitle,
7652
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
7811
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
7812
+ dimensionLinkage
7653
7813
  ];
7654
7814
  const areaPercentSpecPipeline = [
7655
7815
  pivotAdapter_pivotAdapter(areaPercent, pivotAreaPercent)
@@ -7839,7 +7999,8 @@
7839
7999
  'yAxis',
7840
8000
  'sizeRange',
7841
8001
  'size',
7842
- 'crosshairLine'
8002
+ 'crosshairLine',
8003
+ 'dimensionLinkage'
7843
8004
  ]);
7844
8005
  const config = replaceNullToUndefined(pickedConfig);
7845
8006
  result.config = {
@@ -8205,6 +8366,9 @@
8205
8366
  }
8206
8367
  }
8207
8368
  };
8369
+ const yAxisConfig = result.axes?.find((v)=>'left' === v.orient);
8370
+ const yAxisFormatter = yAxisConfig?.label?.formatMethod;
8371
+ if (yAxisFormatter) crosshair.yField.label.formatMethod = (text)=>yAxisFormatter(text);
8208
8372
  return result;
8209
8373
  };
8210
8374
  function tricube(u) {
@@ -8214,7 +8378,8 @@
8214
8378
  return t * t * t;
8215
8379
  }
8216
8380
  function regressionLowess(data, x = (d)=>d.x, y = (d)=>d.y, options = {}) {
8217
- const span = options.span || .3, degree = 0 === options.degree ? 0 : 1, iterations = null == options.iterations ? 2 : options.iterations, ptsX = [], ptsY = [];
8381
+ var _a;
8382
+ 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 = [];
8218
8383
  visitPoints(data, x, y, (dx, dy)=>{
8219
8384
  ptsX.push(dx), ptsY.push(dy);
8220
8385
  });
@@ -8296,7 +8461,7 @@
8296
8461
  }
8297
8462
  return out;
8298
8463
  },
8299
- confidenceInterval: function(N = 50, alpha = .05) {
8464
+ confidenceInterval: function(N = 50) {
8300
8465
  const out = [];
8301
8466
  if (N <= 0) return out;
8302
8467
  if (0 === n) return out;
@@ -8335,8 +8500,8 @@
8335
8500
  };
8336
8501
  }
8337
8502
  function regressionLogistic(data, x = (d)=>d.x, y = (d)=>d.y, options) {
8338
- var _a, _b;
8339
- const maxIter = null != (_a = null == options ? void 0 : options.maxIteration) ? _a : 25, tol = null != (_b = null == options ? void 0 : options.tol) ? _b : 1e-6, xs = [], ys = [];
8503
+ var _a, _b, _c;
8504
+ const maxIter = null != (_a = null == options ? void 0 : options.maxIteration) ? _a : 25, tol = null != (_b = null == options ? void 0 : options.tol) ? _b : 1e-6, alpha = null != (_c = null == options ? void 0 : options.alpha) ? _c : .05, xs = [], ys = [];
8340
8505
  visitPoints(data, x, y, (dx, dy)=>{
8341
8506
  xs.push(dx), ys.push(dy ? 1 : 0);
8342
8507
  });
@@ -8403,7 +8568,7 @@
8403
8568
  }
8404
8569
  return out;
8405
8570
  },
8406
- confidenceInterval: function(N = 50, alpha = .05) {
8571
+ confidenceInterval: function(N = 50) {
8407
8572
  const out = [];
8408
8573
  if (N <= 0) return out;
8409
8574
  const comps = computeLinearCIComponents(data, x, y, predict);
@@ -8446,16 +8611,20 @@
8446
8611
  const lineTheme = advancedVSeed.config[chartType]?.regressionLine;
8447
8612
  if (!regressionLine || !regressionLine[type]) return result;
8448
8613
  const lineList = array_array(regressionLine[type]);
8449
- if (!result.customMark) result.customMark = [];
8614
+ if (!result.extensionMark) result.extensionMark = [];
8450
8615
  lineList.forEach((line, lineIndex)=>{
8616
+ if (false === line.enable) return;
8451
8617
  const theme = lineTheme.linearRegressionLine ?? {};
8452
8618
  const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight, confidenceIntervalOpacity, confidenceIntervalVisible = theme.confidenceIntervalVisible } = line;
8453
8619
  const childrenMarks = [];
8454
- result.customMark.push({
8620
+ result.extensionMark.push({
8455
8621
  type: 'group',
8456
8622
  interactive: false,
8457
8623
  zIndex: 500,
8458
8624
  name: `${type}-${lineIndex}`,
8625
+ layoutType: 'region-relative',
8626
+ dataId: spec.data?.id,
8627
+ animation: false,
8459
8628
  style: {
8460
8629
  data: (datum, ctx)=>{
8461
8630
  const vchart = ctx.vchart;
@@ -8465,8 +8634,7 @@
8465
8634
  const rect = s.getRegion().getLayoutRect();
8466
8635
  const segments = [];
8467
8636
  if (0 === rect.width || 0 === rect.height) return segments;
8468
- const start = s.getRegion().getLayoutStartPoint();
8469
- const yClamper = clamper(start.y, start.y + rect.height);
8637
+ const yClamper = clamper(0, rect.height);
8470
8638
  const colorAttrOptions = s.getColorAttribute();
8471
8639
  const groups = s.getSeriesKeys();
8472
8640
  const data = s.getViewData()?.latestData;
@@ -8475,42 +8643,59 @@
8475
8643
  if (!groups.length) groups.push(void 0);
8476
8644
  groups.forEach((group)=>{
8477
8645
  const groupData = data.filter((d)=>d[colorAttrOptions?.field] === group);
8478
- if (!groupData.length) return;
8646
+ if (groupData.length <= 2) return;
8479
8647
  const { confidenceInterval, evaluateGrid } = regressionFunction(groupData, (datum)=>datum?.[fieldX], (datum)=>datum?.[fieldY], getOptions?.(line));
8480
8648
  const N = Math.max(3, Math.floor(groupData.length / 4));
8481
8649
  const mainColor = color ?? colorAttrOptions?.scale?.scale(group);
8482
8650
  const lineData = evaluateGrid(N);
8483
- const linePoints = lineData.map((ld)=>{
8651
+ const linePoints = [];
8652
+ lineData.forEach((ld, index)=>{
8484
8653
  const d = {
8485
8654
  [fieldX]: ld.x,
8486
8655
  [fieldY]: ld.y
8487
8656
  };
8488
- return {
8489
- x: s.dataToPositionX(d) + start.x,
8490
- y: yClamper(s.dataToPositionY(d) + start.y)
8491
- };
8657
+ const x = s.dataToPositionX(d);
8658
+ const y = yClamper(s.dataToPositionY(d));
8659
+ if (segments.length && 0 === index) segments[segments.length - 1].linePoints.push({
8660
+ x,
8661
+ y: NaN
8662
+ });
8663
+ linePoints.push({
8664
+ x,
8665
+ y
8666
+ });
8492
8667
  });
8493
- segments.push({
8668
+ const segment = {
8494
8669
  color: mainColor,
8495
8670
  linePoints
8496
- });
8671
+ };
8497
8672
  if (confidenceIntervalVisible) {
8498
8673
  const intervalData = confidenceInterval(N);
8499
- const areaPoints = intervalData.map((datum)=>{
8674
+ const areaPoints = [];
8675
+ intervalData.map((datum, index)=>{
8500
8676
  const d = {
8501
8677
  [fieldX]: datum.x,
8502
8678
  [fieldY]: datum.lower
8503
8679
  };
8504
- return {
8505
- x: s.dataToPositionX(d) + start.x,
8506
- y: yClamper(s.dataToPositionY(d) + start.y),
8507
- y1: yClamper(s.dataToPositionY({
8508
- [fieldY]: datum.upper
8509
- }) + start.y)
8510
- };
8680
+ const x = s.dataToPositionX(d);
8681
+ const y = yClamper(s.dataToPositionY(d));
8682
+ const y1 = yClamper(s.dataToPositionY({
8683
+ [fieldY]: datum.upper
8684
+ }));
8685
+ if (segments.length && 0 === index) segments[segments.length - 1].areaPoints.push({
8686
+ x,
8687
+ y: NaN,
8688
+ y1: NaN
8689
+ });
8690
+ areaPoints.push({
8691
+ x,
8692
+ y,
8693
+ y1
8694
+ });
8511
8695
  });
8512
- segments[segments.length - 1].areaPoints = areaPoints;
8696
+ segment.areaPoints = areaPoints;
8513
8697
  }
8698
+ segments.push(segment);
8514
8699
  });
8515
8700
  return segments;
8516
8701
  }
@@ -8523,17 +8708,22 @@
8523
8708
  type: 'area',
8524
8709
  interactive: false,
8525
8710
  zIndex: 500,
8711
+ dataId: spec.data?.id,
8526
8712
  style: {
8713
+ stroke: false,
8527
8714
  lineWidth: lineWidth ?? theme.lineWidth,
8528
8715
  lineDash: lineDash ?? theme.lineDash,
8529
8716
  fillOpacity: confidenceIntervalOpacity ?? theme.confidenceIntervalOpacity,
8530
8717
  fill: 'red',
8531
8718
  segments: (datum, ctx, opt)=>{
8532
8719
  const parentNode = opt.mark?._product?.parent;
8533
- if (parentNode?.attribute?.data?.length) return parentNode.attribute.data.map((d)=>({
8534
- points: d.areaPoints ?? [],
8535
- fill: d.color
8536
- }));
8720
+ if (parentNode) {
8721
+ const data = parentNode.finalAttribute?.data ?? parentNode.attribute?.data;
8722
+ if (data?.length) return data.map((d)=>({
8723
+ points: d.areaPoints ?? [],
8724
+ fill: d.color
8725
+ }));
8726
+ }
8537
8727
  return [];
8538
8728
  }
8539
8729
  }
@@ -8542,16 +8732,21 @@
8542
8732
  type: 'line',
8543
8733
  interactive: false,
8544
8734
  zIndex: 500,
8735
+ animation: false,
8736
+ dataId: spec.data?.id,
8545
8737
  style: {
8546
8738
  lineWidth: lineWidth ?? theme.lineWidth,
8547
8739
  lineDash: lineDash ?? theme.lineDash,
8548
8740
  stroke: 'red',
8549
8741
  segments: (datum, ctx, opt)=>{
8550
8742
  const parentNode = opt.mark?._product?.parent;
8551
- if (parentNode?.attribute?.data?.length) return parentNode.attribute.data.map((d)=>({
8552
- points: d.linePoints,
8553
- stroke: d.color
8554
- }));
8743
+ if (parentNode) {
8744
+ const data = parentNode.finalAttribute?.data ?? parentNode.attribute?.data;
8745
+ if (data?.length) return data.map((d)=>({
8746
+ points: d.linePoints,
8747
+ stroke: d.color
8748
+ }));
8749
+ }
8555
8750
  return [];
8556
8751
  }
8557
8752
  }
@@ -8560,6 +8755,8 @@
8560
8755
  type: 'text',
8561
8756
  interactive: false,
8562
8757
  zIndex: 500,
8758
+ animation: false,
8759
+ dataId: spec.data?.id,
8563
8760
  style: {
8564
8761
  textAlign: 'end',
8565
8762
  fill: textColor ?? theme.textColor,
@@ -8650,7 +8847,8 @@
8650
8847
  pivotRowDimensions,
8651
8848
  pivotColumnDimensions,
8652
8849
  pivotTitle,
8653
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
8850
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
8851
+ dimensionLinkage
8654
8852
  ];
8655
8853
  const scatterSpecPipeline = [
8656
8854
  pivotAdapter_pivotAdapter(scatter, pivotScatter)
@@ -8973,7 +9171,8 @@
8973
9171
  'crosshairRect',
8974
9172
  'barGapInGroup',
8975
9173
  'barMaxWidth',
8976
- 'stackCornerRadius'
9174
+ 'stackCornerRadius',
9175
+ 'dimensionLinkage'
8977
9176
  ]);
8978
9177
  const config = replaceNullToUndefined(pickedConfig);
8979
9178
  result.config = {
@@ -9590,6 +9789,116 @@
9590
9789
  };
9591
9790
  return result;
9592
9791
  };
9792
+ const isObjectLike = (value)=>"object" == typeof value && null !== value;
9793
+ const common_isObjectLike = isObjectLike;
9794
+ const isPlainObject_isPlainObject = function(value) {
9795
+ if (!common_isObjectLike(value) || !isType(value, "Object")) return !1;
9796
+ if (null === Object.getPrototypeOf(value)) return !0;
9797
+ let proto = value;
9798
+ for(; null !== Object.getPrototypeOf(proto);)proto = Object.getPrototypeOf(proto);
9799
+ return Object.getPrototypeOf(value) === proto;
9800
+ };
9801
+ const isPlainObject = isPlainObject_isPlainObject;
9802
+ const isString = (value, fuzzy = !1)=>{
9803
+ const type = typeof value;
9804
+ return fuzzy ? "string" === type : "string" === type || isType(value, "String");
9805
+ };
9806
+ const common_isString = isString;
9807
+ function pickWithout(obj, keys) {
9808
+ if (!obj || !isPlainObject(obj)) return obj;
9809
+ const result = {};
9810
+ return Object.keys(obj).forEach((k)=>{
9811
+ const v = obj[k];
9812
+ let match = !1;
9813
+ keys.forEach((itKey)=>{
9814
+ (common_isString(itKey) && itKey === k || itKey instanceof RegExp && k.match(itKey)) && (match = !0);
9815
+ }), match || (result[k] = v);
9816
+ }), result;
9817
+ }
9818
+ const annotationPointOfDualAxis = (spec, context)=>{
9819
+ const { advancedVSeed, vseed } = context;
9820
+ const { annotation, config } = advancedVSeed;
9821
+ if (!annotation || !annotation.annotationPoint) return spec;
9822
+ const theme = config?.[vseed.chartType]?.annotation?.annotationPoint;
9823
+ const { annotationPoint } = annotation;
9824
+ const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
9825
+ annotationPoint
9826
+ ];
9827
+ const isHorizontalBar = isBarLikeChart(advancedVSeed);
9828
+ const defaultStyle = isHorizontalBar ? {
9829
+ textAlign: 'right',
9830
+ textBaseline: 'middle'
9831
+ } : {
9832
+ textAlign: 'center',
9833
+ textBaseline: 'top'
9834
+ };
9835
+ const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m)=>m.id);
9836
+ const markPoint = annotationPointList.flatMap((annotationPoint)=>{
9837
+ 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;
9838
+ const dataset = advancedVSeed.dataset.flat();
9839
+ const selectedData = selectorPoint ? dataset.reduce((res, d)=>{
9840
+ const pickedDatum = pickWithout(d, allMeasureIds.filter((id)=>id !== d[MeasureId]));
9841
+ if (selector_selector(pickedDatum, selectorPoint)) res.push(pickedDatum);
9842
+ return res;
9843
+ }, []) : [];
9844
+ const dx = -10 - (isHorizontalBar ? textFontSize : 0);
9845
+ const dy = isHorizontalBar ? 0 : textFontSize;
9846
+ const baseConfig = {
9847
+ zIndex: 1000,
9848
+ itemLine: {
9849
+ visible: false
9850
+ },
9851
+ itemContent: {
9852
+ offsetY,
9853
+ offsetX,
9854
+ confine: true,
9855
+ text: {
9856
+ text: text,
9857
+ style: {
9858
+ opacity: 0.95,
9859
+ visible: true,
9860
+ textAlign: textAlign,
9861
+ textBaseline: textBaseline,
9862
+ fill: textColor,
9863
+ stroke: textBackgroundColor,
9864
+ lineWidth: 1,
9865
+ fontSize: textFontSize,
9866
+ fontWeight: textFontWeight,
9867
+ dx,
9868
+ dy
9869
+ },
9870
+ labelBackground: {
9871
+ visible: textBackgroundVisible,
9872
+ padding: textBackgroundPadding,
9873
+ style: {
9874
+ opacity: 0.95,
9875
+ cornerRadius: textBackgroundBorderRadius ?? 4,
9876
+ fill: textBackgroundColor,
9877
+ stroke: textBackgroundBorderColor,
9878
+ lineWidth: textBackgroundBorderWidth,
9879
+ dx,
9880
+ dy
9881
+ }
9882
+ }
9883
+ }
9884
+ }
9885
+ };
9886
+ return spec.series?.reduce((res, s, index)=>{
9887
+ selectedData.forEach((datum)=>{
9888
+ res.push({
9889
+ ...baseConfig,
9890
+ relativeSeriesIndex: index,
9891
+ coordinate: (data)=>data.find((item)=>isSubset(datum, item, allMeasureIds.filter((id)=>id !== item[MeasureId])))
9892
+ });
9893
+ });
9894
+ return res;
9895
+ }, []);
9896
+ });
9897
+ return {
9898
+ ...spec,
9899
+ markPoint
9900
+ };
9901
+ };
9593
9902
  const dualAxis = [
9594
9903
  seriesDualAxis([
9595
9904
  initDualAxisPrimary,
@@ -9629,7 +9938,7 @@
9629
9938
  colorAdapter(discreteLegend, colorLegend),
9630
9939
  background_backgroundColor,
9631
9940
  verticalCrosshairRect,
9632
- annotationPoint_annotationPoint,
9941
+ annotationPointOfDualAxis,
9633
9942
  annotationVerticalLine_annotationVerticalLine,
9634
9943
  annotationHorizontalLine_annotationHorizontalLine,
9635
9944
  annotationAreaBand
@@ -9677,7 +9986,7 @@
9677
9986
  colorAdapter(color_color, linearColor),
9678
9987
  background_backgroundColor,
9679
9988
  verticalCrosshairRect,
9680
- annotationPoint_annotationPoint,
9989
+ annotationPointOfDualAxis,
9681
9990
  annotationVerticalLine_annotationVerticalLine,
9682
9991
  annotationHorizontalLine_annotationHorizontalLine,
9683
9992
  annotationAreaBand
@@ -9685,7 +9994,8 @@
9685
9994
  pivotRowDimensions,
9686
9995
  pivotColumnDimensions,
9687
9996
  pivotTitle,
9688
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
9997
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
9998
+ dimensionLinkage
9689
9999
  ];
9690
10000
  const dualAxisSpecPipeline = [
9691
10001
  pivotAdapter_pivotAdapter(dualAxis, pivotDualAxis)
@@ -11135,7 +11445,8 @@
11135
11445
  'xAxis',
11136
11446
  'yAxis',
11137
11447
  'crosshairRect',
11138
- 'whiskers'
11448
+ 'whiskers',
11449
+ 'dimensionLinkage'
11139
11450
  ]);
11140
11451
  const config = replaceNullToUndefined(pickedConfig);
11141
11452
  result.config = {
@@ -11263,26 +11574,15 @@
11263
11574
  const sorted = vals.slice().sort((a, b)=>a - b), count = sorted.length, dataMin = sorted[0], dataMax = sorted[sorted.length - 1];
11264
11575
  let sum = 0;
11265
11576
  for(let i = 0; i < sorted.length; i++)sum += sorted[i];
11266
- const mean = sum / count, q1 = quantileSorted(sorted, .25), median = quantileSorted(sorted, .5), q3 = quantileSorted(sorted, .75), iqr = q3 - q1, lowerBound = common_isArray(whiskers) ? quantileSorted(sorted, whiskers[0]) : q1 - whiskers * iqr, upperBound = common_isArray(whiskers) ? quantileSorted(sorted, whiskers[1]) : q3 + whiskers * iqr;
11267
- let lowerWhisker = dataMin;
11268
- for(let i = 0; i < sorted.length; i++)if (sorted[i] >= lowerBound) {
11269
- lowerWhisker = sorted[i];
11270
- break;
11271
- }
11272
- let upperWhisker = dataMax;
11273
- for(let i = sorted.length - 1; i >= 0; i--)if (sorted[i] <= upperBound) {
11274
- upperWhisker = sorted[i];
11275
- break;
11276
- }
11277
- const outliers = [];
11278
- for(let i = 0; i < sorted.length; i++)(sorted[i] < lowerWhisker || sorted[i] > upperWhisker) && outliers.push(sorted[i]);
11577
+ const mean = sum / count, q1 = quantileSorted(sorted, .25), median = quantileSorted(sorted, .5), q3 = quantileSorted(sorted, .75), iqr = q3 - q1, lowerBound = common_isArray(whiskers) ? quantileSorted(sorted, whiskers[0]) : q1 - whiskers * iqr, upperBound = common_isArray(whiskers) ? quantileSorted(sorted, whiskers[1]) : q3 + whiskers * iqr, outliers = [];
11578
+ for(let i = 0; i < sorted.length; i++)(sorted[i] < lowerBound || sorted[i] > upperBound) && outliers.push(sorted[i]);
11279
11579
  const obj = {}, representative = keyToGroup.get(key);
11280
11580
  if (null !== keyName) obj[keyName] = representative;
11281
11581
  else if (common_isArray(groupField)) {
11282
11582
  const groupObj = representative || {};
11283
11583
  for (const f of groupField)obj[f] = groupObj[f];
11284
11584
  }
11285
- obj[countName] = count, obj[meanName] = mean, obj[q1Name] = q1, obj[medianName] = median, obj[q3Name] = q3, obj[iqrName] = iqr, obj[minName] = dataMin, obj[maxName] = dataMax, obj[lowerWhiskerName] = lowerWhisker, obj[upperWhiskerName] = upperWhisker, obj[outliersName] = outliers, includeValues && (obj[valuesName] = rawValues.get(key) || []), out.push(obj);
11585
+ obj[countName] = count, obj[meanName] = mean, obj[q1Name] = q1, obj[medianName] = median, obj[q3Name] = q3, obj[iqrName] = iqr, obj[minName] = dataMin, obj[maxName] = dataMax, obj[lowerWhiskerName] = lowerBound, obj[upperWhiskerName] = upperBound, obj[outliersName] = outliers, includeValues && (obj[valuesName] = rawValues.get(key) || []), out.push(obj);
11286
11586
  }
11287
11587
  return out;
11288
11588
  };
@@ -11545,14 +11845,6 @@
11545
11845
  "__Q1__",
11546
11846
  LowerWhisker
11547
11847
  ];
11548
- const measureAliasMapping = {
11549
- [OutliersMeasureId]: intl.i18n`异常点`,
11550
- [UpperWhisker]: intl.i18n`上边界`,
11551
- ["__Q3__"]: intl.i18n`上四分位数`,
11552
- [MedianMeasureId]: intl.i18n`中位数`,
11553
- ["__Q1__"]: intl.i18n`下四分位数`,
11554
- [LowerWhisker]: intl.i18n`下边界`
11555
- };
11556
11848
  const VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
11557
11849
  const tooltipBoxplot = (spec, context)=>{
11558
11850
  const result = {
@@ -11568,6 +11860,14 @@
11568
11860
  const meas = findAllMeasures(vseed.measures);
11569
11861
  const valueMeasure = meas.find((item)=>'value' === item.encoding || chunk_JK3VNB42_n(item.encoding));
11570
11862
  const defaultFormatter = valueMeasure ? createFormatterByMeasure(valueMeasure) : (v)=>v;
11863
+ const measureAliasMapping = {
11864
+ [OutliersMeasureId]: intl.i18n`异常点`,
11865
+ [UpperWhisker]: intl.i18n`上边界`,
11866
+ ["__Q3__"]: intl.i18n`上四分位数`,
11867
+ [MedianMeasureId]: intl.i18n`中位数`,
11868
+ ["__Q1__"]: intl.i18n`下四分位数`,
11869
+ [LowerWhisker]: intl.i18n`下边界`
11870
+ };
11571
11871
  result.tooltip = {
11572
11872
  visible: enable,
11573
11873
  style: getTooltipStyle(tooltip),
@@ -11694,7 +11994,8 @@
11694
11994
  pivotRowDimensions,
11695
11995
  pivotColumnDimensions,
11696
11996
  pivotTitle,
11697
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
11997
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
11998
+ dimensionLinkage
11698
11999
  ];
11699
12000
  const boxplotSpecPipeline = [
11700
12001
  pivotAdapter_pivotAdapter(pipeline_boxplot_boxplot, pivotBoxplot)
@@ -11721,7 +12022,8 @@
11721
12022
  'crosshairRect',
11722
12023
  'binCount',
11723
12024
  'binStep',
11724
- 'binValueType'
12025
+ 'binValueType',
12026
+ 'dimensionLinkage'
11725
12027
  ]);
11726
12028
  let config = replaceNullToUndefined(pickedConfig);
11727
12029
  if (!hasColorEncoding && !config?.legend?.enable) config = {
@@ -11835,9 +12137,9 @@
11835
12137
  ]);
11836
12138
  };
11837
12139
  const subBin = (data, options)=>{
11838
- var _a, _b;
11839
- const { numBins: numBins, thresholds: thresholds, countName: countName, percentageName: percentageName, valuesName: valuesName, countField: countField, field: field, n: n, x0Name: x0Name, x1Name: x1Name } = options, out = [];
11840
- if (!options.groupField) for(let i = 0; i < numBins; i++){
12140
+ var _a, _b, _c, _d;
12141
+ const { numBins: numBins, thresholds: thresholds, countName: countName, percentageName: percentageName, valuesName: valuesName, countField: countField, field: field, n: n, x0Name: x0Name, x1Name: x1Name } = options, groupField = options.groupField, usingGroup = Array.isArray(groupField) ? groupField.length > 0 : !!groupField, out = [];
12142
+ if (!usingGroup) for(let i = 0; i < numBins; i++){
11841
12143
  const rec = {
11842
12144
  [x0Name]: thresholds[i],
11843
12145
  [x1Name]: thresholds[i + 1],
@@ -11845,7 +12147,7 @@
11845
12147
  };
11846
12148
  options.includeValues && (rec[valuesName] = []), out.push(rec);
11847
12149
  }
11848
- const groupField = options.groupField, usingGroup = !!groupField, binGroupCounts = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [], binGroupValues = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [], binGroupRepr = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [];
12150
+ const binGroupCounts = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [], binGroupValues = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [], groupKeyOrder = [], groupKeySet = new Set, groupRepr = new Map;
11849
12151
  for(let i = 0; i < n; i++){
11850
12152
  const v = data[i][field];
11851
12153
  if (null == v) continue;
@@ -11858,12 +12160,10 @@
11858
12160
  let gk;
11859
12161
  gk = common_isArray(groupField) ? groupField.map((f)=>String(data[i][f])).join("||") : String(data[i][groupField]);
11860
12162
  const m = binGroupCounts[j], prev = null != (_b = m.get(gk)) ? _b : 0;
11861
- m.set(gk, prev + datumCount);
11862
- const repMap = binGroupRepr[j];
11863
- if (repMap.has(gk) || (common_isArray(groupField) ? repMap.set(gk, Object.fromEntries(groupField.map((f)=>[
12163
+ if (m.set(gk, prev + datumCount), groupKeySet.has(gk) || (groupKeySet.add(gk), groupKeyOrder.push(gk), common_isArray(groupField) ? groupRepr.set(gk, Object.fromEntries(groupField.map((f)=>[
11864
12164
  f,
11865
12165
  data[i][f]
11866
- ]))) : repMap.set(gk, data[i][groupField])), options && options.includeValues) {
12166
+ ]))) : groupRepr.set(gk, data[i][groupField])), options && options.includeValues) {
11867
12167
  const vv = binGroupValues[j];
11868
12168
  vv.has(gk) || vv.set(gk, []);
11869
12169
  const arr = vv.get(gk);
@@ -11878,21 +12178,18 @@
11878
12178
  let totalCount = 0;
11879
12179
  const finalOut = [];
11880
12180
  if (usingGroup) {
11881
- for(let j = 0; j < numBins; j++){
11882
- const m = binGroupCounts[j];
11883
- for (const [gk, sum] of m){
11884
- totalCount += sum;
11885
- const rec = {
11886
- [x0Name]: thresholds[j],
11887
- [x1Name]: thresholds[j + 1],
11888
- [countName]: sum
11889
- }, repr = binGroupRepr[j].get(gk);
11890
- if (common_isArray(groupField)) for (const f of groupField)rec[f] = repr[f];
11891
- else rec[groupField] = repr;
11892
- options && options.includeValues && (rec[valuesName] = binGroupValues[j].get(gk) || []), finalOut.push(rec);
11893
- }
12181
+ for(let j = 0; j < numBins; j++)for (const gk of groupKeyOrder){
12182
+ const sum = null != (_c = binGroupCounts[j].get(gk)) ? _c : 0, rec = {
12183
+ [x0Name]: thresholds[j],
12184
+ [x1Name]: thresholds[j + 1],
12185
+ [countName]: sum
12186
+ }, repr = null != (_d = groupRepr.get(gk)) ? _d : {};
12187
+ if (common_isArray(groupField)) for (const f of groupField)rec[f] = repr[f];
12188
+ else groupField && (rec[groupField] = repr);
12189
+ options && options.includeValues && (rec[valuesName] = binGroupValues[j].get(gk) || []), finalOut.push(rec), totalCount += sum;
11894
12190
  }
11895
- for (const r of finalOut)r[percentageName] = totalCount > 0 ? r[countName] / totalCount : 0;
12191
+ const denominator = totalCount;
12192
+ for (const r of finalOut)r[percentageName] = denominator > 0 ? r[countName] / denominator : 0;
11896
12193
  } else {
11897
12194
  for(let i = 0, len = out.length; i < len; i++)totalCount += out[i][countName];
11898
12195
  for(let i = 0, len = out.length; i < len; i++)out[i][percentageName] = totalCount > 0 ? out[i][countName] / totalCount : 0, finalOut.push(out[i]);
@@ -11938,7 +12235,7 @@
11938
12235
  options.facetField
11939
12236
  ] : [], groupField = common_isArray(null == options ? void 0 : options.groupField) ? null == options ? void 0 : options.groupField : (null == options ? void 0 : options.groupField) ? [
11940
12237
  options.groupField
11941
- ] : [], subViewOptions = Object.assign(Object.assign({}, options), {
12238
+ ] : [], normalizedGroupField = groupField.length ? groupField : void 0, subViewOptions = Object.assign(Object.assign({}, options), {
11942
12239
  numBins: numBins,
11943
12240
  thresholds: thresholds,
11944
12241
  countName: countName,
@@ -11948,7 +12245,8 @@
11948
12245
  field: field,
11949
12246
  n: n,
11950
12247
  x0Name: x0Name,
11951
- x1Name: x1Name
12248
+ x1Name: x1Name,
12249
+ groupField: normalizedGroupField
11952
12250
  });
11953
12251
  if (!facetField.length) return subBin(data, subViewOptions);
11954
12252
  const subViewMap = {};
@@ -11957,13 +12255,16 @@
11957
12255
  subViewMap[subViewKey] ? subViewMap[subViewKey].push(dataItem) : subViewMap[subViewKey] = [
11958
12256
  dataItem
11959
12257
  ];
11960
- }), Object.values(subViewMap).map((subDataset)=>subBin(subDataset, Object.assign(Object.assign({}, subViewOptions), {
11961
- groupField: [
11962
- ...groupField,
11963
- ...facetField
11964
- ],
12258
+ }), Object.values(subViewMap).map((subDataset)=>{
12259
+ const combinedGroupField = [
12260
+ ...groupField,
12261
+ ...facetField
12262
+ ];
12263
+ return subBin(subDataset, Object.assign(Object.assign({}, subViewOptions), {
12264
+ groupField: combinedGroupField.length ? combinedGroupField : void 0,
11965
12265
  n: subDataset.length
11966
- }))).flat();
12266
+ }));
12267
+ }).flat();
11967
12268
  };
11968
12269
  const reshapeWithHistogramEncoding = (advancedVSeed, context)=>{
11969
12270
  const result = {
@@ -12452,16 +12753,18 @@
12452
12753
  if (!regressionLine || !regressionLine.kdeRegressionLine) return result;
12453
12754
  const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
12454
12755
  const lineList = array_array(regressionLine.kdeRegressionLine).filter((kdeLine)=>false !== kdeLine.enable);
12455
- if (!result.customMark) result.customMark = [];
12756
+ if (!result.extensionMark) result.extensionMark = [];
12456
12757
  lineList.forEach((line, lineIndex)=>{
12758
+ if (false === line.enable) return;
12457
12759
  const theme = lineTheme.kdeRegressionLine ?? {};
12458
12760
  const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight } = line;
12459
12761
  const childrenMarks = [];
12460
- result.customMark.push({
12762
+ result.extensionMark.push({
12461
12763
  type: 'group',
12462
12764
  interactive: false,
12463
12765
  zIndex: 500,
12464
12766
  name: `kdeRegressionLine-${lineIndex}`,
12767
+ dataId: spec.data?.id,
12465
12768
  style: {
12466
12769
  data: (datum, ctx)=>{
12467
12770
  const vchart = ctx.vchart;
@@ -12469,7 +12772,6 @@
12469
12772
  const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
12470
12773
  if (series && series.length) {
12471
12774
  const s = series[0];
12472
- const region = s.getRegion().getLayoutStartPoint();
12473
12775
  const fieldX = s.fieldX?.[0];
12474
12776
  const scaleY = s.getYAxisHelper().getScale?.(0);
12475
12777
  const viewData = s.getViewData()?.latestData;
@@ -12486,8 +12788,8 @@
12486
12788
  [fieldX]: ld.x
12487
12789
  };
12488
12790
  return {
12489
- x: s.dataToPositionX(d) + region.x,
12490
- y: scaleR(ld.y) + region.y
12791
+ x: s.dataToPositionX(d),
12792
+ y: scaleR(ld.y)
12491
12793
  };
12492
12794
  });
12493
12795
  return {
@@ -12504,6 +12806,7 @@
12504
12806
  type: 'line',
12505
12807
  interactive: false,
12506
12808
  zIndex: 500,
12809
+ dataId: spec.data?.id,
12507
12810
  style: {
12508
12811
  lineWidth: lineWidth ?? theme.lineWidth,
12509
12812
  lineDash: lineDash ?? theme.lineDash,
@@ -12519,6 +12822,7 @@
12519
12822
  type: 'text',
12520
12823
  interactive: false,
12521
12824
  zIndex: 500,
12825
+ dataId: spec.data?.id,
12522
12826
  style: {
12523
12827
  textAlign: 'end',
12524
12828
  fill: textColor ?? theme.textColor,
@@ -12588,16 +12892,18 @@
12588
12892
  if (!regressionLine || !regressionLine.ecdfRegressionLine) return result;
12589
12893
  const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
12590
12894
  const lineList = array_array(regressionLine.ecdfRegressionLine).filter((ecdfLine)=>false !== ecdfLine.enable);
12591
- if (!result.customMark) result.customMark = [];
12895
+ if (!result.extensionMark) result.extensionMark = [];
12592
12896
  lineList.forEach((line, lineIndex)=>{
12897
+ if (false === line.enable) return;
12593
12898
  const theme = lineTheme?.ecdfRegressionLine ?? {};
12594
12899
  const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight } = line;
12595
12900
  const childrenMarks = [];
12596
- result.customMark.push({
12901
+ result.extensionMark.push({
12597
12902
  type: 'group',
12598
12903
  interactive: false,
12599
12904
  zIndex: 500,
12600
12905
  name: `ecdfRegressionLine-${lineIndex}`,
12906
+ dataId: spec.data?.id,
12601
12907
  style: {
12602
12908
  data: (datum, ctx)=>{
12603
12909
  const vchart = ctx.vchart;
@@ -12605,7 +12911,6 @@
12605
12911
  const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
12606
12912
  if (series && series.length) {
12607
12913
  const s = series[0];
12608
- const region = s.getRegion().getLayoutStartPoint();
12609
12914
  const fieldX = s.fieldX?.[0];
12610
12915
  const scaleY = s.getYAxisHelper().getScale?.(0);
12611
12916
  const viewData = s.getViewData()?.latestData;
@@ -12623,8 +12928,8 @@
12623
12928
  [fieldX]: ld.x
12624
12929
  };
12625
12930
  return {
12626
- x: s.dataToPositionX(d) + region.x,
12627
- y: scaleR(ld.y) + region.y
12931
+ x: s.dataToPositionX(d),
12932
+ y: scaleR(ld.y)
12628
12933
  };
12629
12934
  });
12630
12935
  return {
@@ -12641,6 +12946,7 @@
12641
12946
  type: 'line',
12642
12947
  interactive: false,
12643
12948
  zIndex: 500,
12949
+ dataId: spec.data?.id,
12644
12950
  style: {
12645
12951
  lineWidth: lineWidth ?? theme.lineWidth,
12646
12952
  lineDash: lineDash ?? theme.lineDash,
@@ -12656,6 +12962,7 @@
12656
12962
  type: 'text',
12657
12963
  interactive: false,
12658
12964
  zIndex: 500,
12965
+ dataId: spec.data?.id,
12659
12966
  style: {
12660
12967
  textAlign: 'end',
12661
12968
  fill: textColor ?? theme.textColor,
@@ -12745,7 +13052,8 @@
12745
13052
  pivotRowDimensions,
12746
13053
  pivotColumnDimensions,
12747
13054
  pivotTitle,
12748
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
13055
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
13056
+ dimensionLinkage
12749
13057
  ];
12750
13058
  const histogramSpecPipeline = [
12751
13059
  pivotAdapter_pivotAdapter(histogram, pivotHistogram)
@@ -14075,7 +14383,7 @@
14075
14383
  return false;
14076
14384
  }
14077
14385
  });
14078
- function isPlainObject(o) {
14386
+ function util_isPlainObject(o) {
14079
14387
  if (false === util_isObject(o)) return false;
14080
14388
  const ctor = o.constructor;
14081
14389
  if (void 0 === ctor) return true;
@@ -14182,7 +14490,7 @@
14182
14490
  return clone(schema, def);
14183
14491
  }
14184
14492
  function extend(schema, shape) {
14185
- if (!isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
14493
+ if (!util_isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
14186
14494
  const def = mergeDefs(schema._zod.def, {
14187
14495
  get shape () {
14188
14496
  const _shape = {
@@ -15596,7 +15904,7 @@
15596
15904
  valid: true,
15597
15905
  data: a
15598
15906
  };
15599
- if (isPlainObject(a) && isPlainObject(b)) {
15907
+ if (util_isPlainObject(a) && util_isPlainObject(b)) {
15600
15908
  const bKeys = Object.keys(b);
15601
15909
  const sharedKeys = Object.keys(a).filter((key)=>-1 !== bKeys.indexOf(key));
15602
15910
  const newObj = {
@@ -15661,7 +15969,7 @@
15661
15969
  $ZodType.init(inst, def);
15662
15970
  inst._zod.parse = (payload, ctx)=>{
15663
15971
  const input = payload.value;
15664
- if (!isPlainObject(input)) {
15972
+ if (!util_isPlainObject(input)) {
15665
15973
  payload.issues.push({
15666
15974
  expected: "record",
15667
15975
  code: "invalid_type",
@@ -17913,6 +18221,11 @@
17913
18221
  chartGridColor: schemas_string().nullish(),
17914
18222
  axisLabelColor: schemas_string().nullish()
17915
18223
  });
18224
+ const zDimensionLinkage = schemas_object({
18225
+ enable: schemas_boolean().nullish(),
18226
+ showTooltip: schemas_boolean().nullish(),
18227
+ showLabel: schemas_boolean().nullish()
18228
+ });
17916
18229
  const zLineConfig = schemas_object({
17917
18230
  backgroundColor: zBackgroundColor.nullish(),
17918
18231
  label: zLabel.nullish(),
@@ -17923,7 +18236,8 @@
17923
18236
  yAxis: zYLinearAxis.nullish(),
17924
18237
  crosshairLine: zCrosshairLine.nullish(),
17925
18238
  pivotGrid: zPivotChartGridConfig.nullish(),
17926
- annotation: zAnnotationConfig.nullish()
18239
+ annotation: zAnnotationConfig.nullish(),
18240
+ dimensionLinkage: zDimensionLinkage.nullish()
17927
18241
  });
17928
18242
  const zStackCornerRadius = schemas_number().or(schemas_array(schemas_number())).default([
17929
18243
  3,
@@ -17975,7 +18289,8 @@
17975
18289
  barMaxWidth: zBarMaxWidth.nullish(),
17976
18290
  barGapInGroup: zBarGapInGroup.nullish(),
17977
18291
  pivotGrid: zPivotChartGridConfig.nullish(),
17978
- annotation: zAnnotationConfig.nullish()
18292
+ annotation: zAnnotationConfig.nullish(),
18293
+ dimensionLinkage: zDimensionLinkage.nullish()
17979
18294
  });
17980
18295
  const zColumnConfig = zColumnParallelConfig.extend({
17981
18296
  regressionLine: zRegressionLine.nullish()
@@ -17992,7 +18307,8 @@
17992
18307
  crosshairRect: zCrosshairRect.nullish(),
17993
18308
  stackCornerRadius: zStackCornerRadius.nullish(),
17994
18309
  pivotGrid: zPivotChartGridConfig.nullish(),
17995
- annotation: zAnnotationConfig.nullish()
18310
+ annotation: zAnnotationConfig.nullish(),
18311
+ dimensionLinkage: zDimensionLinkage.nullish()
17996
18312
  });
17997
18313
  const zBarParallelConfig = zBarConfig;
17998
18314
  const zBarPercentConfig = zBarConfig;
@@ -18006,7 +18322,8 @@
18006
18322
  yAxis: zYLinearAxis.nullish(),
18007
18323
  crosshairLine: zCrosshairLine.nullish(),
18008
18324
  pivotGrid: zPivotChartGridConfig.nullish(),
18009
- annotation: zAnnotationConfig.nullish()
18325
+ annotation: zAnnotationConfig.nullish(),
18326
+ dimensionLinkage: zDimensionLinkage.nullish()
18010
18327
  });
18011
18328
  const zAreaPercentConfig = zAreaConfig;
18012
18329
  const zScatterConfig = schemas_object({
@@ -18022,7 +18339,8 @@
18022
18339
  sizeRange: schemas_number().or(schemas_array(schemas_number())).nullish(),
18023
18340
  pivotGrid: zPivotChartGridConfig.nullish(),
18024
18341
  annotation: zAnnotationConfig.nullish(),
18025
- regressionLine: zRegressionLine.nullish()
18342
+ regressionLine: zRegressionLine.nullish(),
18343
+ dimensionLinkage: zDimensionLinkage.nullish()
18026
18344
  });
18027
18345
  const zDualAxisConfig = schemas_object({
18028
18346
  backgroundColor: zBackgroundColor.nullish(),
@@ -18037,7 +18355,8 @@
18037
18355
  xAxis: zXBandAxis.nullish(),
18038
18356
  crosshairRect: zCrosshairRect.nullish(),
18039
18357
  pivotGrid: zPivotChartGridConfig.nullish(),
18040
- annotation: zAnnotationConfig.nullish()
18358
+ annotation: zAnnotationConfig.nullish(),
18359
+ dimensionLinkage: zDimensionLinkage.nullish()
18041
18360
  });
18042
18361
  const zPieLabel = zLabel.extend({
18043
18362
  labelLayout: union([
@@ -18106,7 +18425,8 @@
18106
18425
  crosshairRect: zCrosshairRect.nullish(),
18107
18426
  pivotGrid: zPivotChartGridConfig.nullish(),
18108
18427
  annotation: zAnnotationConfig.nullish(),
18109
- whiskers: zWhiskersConfig.nullish()
18428
+ whiskers: zWhiskersConfig.nullish(),
18429
+ dimensionLinkage: zDimensionLinkage.nullish()
18110
18430
  });
18111
18431
  const zHistogramConfig = schemas_object({
18112
18432
  backgroundColor: zBackgroundColor.nullish(),
@@ -18123,7 +18443,8 @@
18123
18443
  binCount: schemas_number().positive().nullish(),
18124
18444
  binStep: schemas_number().positive().nullish(),
18125
18445
  binValueType: literal('count').or(literal('percentage')).nullish(),
18126
- regressionLine: zRegressionLine.nullish()
18446
+ regressionLine: zRegressionLine.nullish(),
18447
+ dimensionLinkage: zDimensionLinkage.nullish()
18127
18448
  });
18128
18449
  const zConfig = schemas_object({
18129
18450
  table: zTableConfig.nullish(),
@@ -18385,6 +18706,7 @@
18385
18706
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18386
18707
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18387
18708
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18709
+ dimensionLinkage: zDimensionLinkage.nullish(),
18388
18710
  locale: zLocale.nullish()
18389
18711
  });
18390
18712
  const zColumn = schemas_object({
@@ -18412,6 +18734,7 @@
18412
18734
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18413
18735
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18414
18736
  polynomialRegressionLine: schemas_array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).or(schemas_boolean()).nullish(),
18737
+ dimensionLinkage: zDimensionLinkage.nullish(),
18415
18738
  locale: zLocale.nullish()
18416
18739
  });
18417
18740
  const zColumnParallel = schemas_object({
@@ -18437,6 +18760,7 @@
18437
18760
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18438
18761
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18439
18762
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18763
+ dimensionLinkage: zDimensionLinkage.nullish(),
18440
18764
  locale: zLocale.nullish()
18441
18765
  });
18442
18766
  const zColumnPercent = schemas_object({
@@ -18461,6 +18785,7 @@
18461
18785
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18462
18786
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18463
18787
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18788
+ dimensionLinkage: zDimensionLinkage.nullish(),
18464
18789
  locale: zLocale.nullish()
18465
18790
  });
18466
18791
  const zBar = schemas_object({
@@ -18485,6 +18810,7 @@
18485
18810
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18486
18811
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18487
18812
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18813
+ dimensionLinkage: zDimensionLinkage.nullish(),
18488
18814
  locale: zLocale.nullish()
18489
18815
  });
18490
18816
  const zBarParallel = schemas_object({
@@ -18510,6 +18836,7 @@
18510
18836
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18511
18837
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18512
18838
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18839
+ dimensionLinkage: zDimensionLinkage.nullish(),
18513
18840
  locale: zLocale.nullish()
18514
18841
  });
18515
18842
  const zBarPercent = schemas_object({
@@ -18534,6 +18861,7 @@
18534
18861
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18535
18862
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18536
18863
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18864
+ dimensionLinkage: zDimensionLinkage.nullish(),
18537
18865
  locale: zLocale.nullish()
18538
18866
  });
18539
18867
  const zArea = schemas_object({
@@ -18558,6 +18886,7 @@
18558
18886
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18559
18887
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18560
18888
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18889
+ dimensionLinkage: zDimensionLinkage.nullish(),
18561
18890
  locale: zLocale.nullish()
18562
18891
  });
18563
18892
  const zAreaPercent = schemas_object({
@@ -18582,6 +18911,7 @@
18582
18911
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18583
18912
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18584
18913
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18914
+ dimensionLinkage: zDimensionLinkage.nullish(),
18585
18915
  locale: zLocale.nullish()
18586
18916
  });
18587
18917
  const zScatter = schemas_object({
@@ -18611,6 +18941,7 @@
18611
18941
  lowessRegressionLine: schemas_array(zLowessRegressionLine).or(zLowessRegressionLine).or(schemas_boolean()).nullish(),
18612
18942
  polynomialRegressionLine: schemas_array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).or(schemas_boolean()).nullish(),
18613
18943
  logisticRegressionLine: schemas_array(zLogisticRegressionLine).or(zLogisticRegressionLine).or(schemas_boolean()).nullish(),
18944
+ dimensionLinkage: zDimensionLinkage.nullish(),
18614
18945
  locale: zLocale.nullish()
18615
18946
  });
18616
18947
  const zDualAxis = schemas_object({
@@ -18643,6 +18974,7 @@
18643
18974
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18644
18975
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18645
18976
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18977
+ dimensionLinkage: zDimensionLinkage.nullish(),
18646
18978
  locale: zLocale.nullish()
18647
18979
  });
18648
18980
  const zHistogram = schemas_object({
@@ -18670,6 +19002,7 @@
18670
19002
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
18671
19003
  ecdfRegressionLine: schemas_array(zEcdfRegressionLine).or(zEcdfRegressionLine).nullish(),
18672
19004
  kdeRegressionLine: schemas_array(zKdeRegressionLine).or(zKdeRegressionLine).nullish(),
19005
+ dimensionLinkage: zDimensionLinkage.nullish(),
18673
19006
  locale: zLocale.nullish()
18674
19007
  });
18675
19008
  const zRose = schemas_object({
@@ -18791,6 +19124,7 @@
18791
19124
  annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
18792
19125
  annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
18793
19126
  annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
19127
+ dimensionLinkage: zDimensionLinkage.nullish(),
18794
19128
  locale: zLocale.nullish()
18795
19129
  });
18796
19130
  const zVSeed = discriminatedUnion('chartType', [
@@ -18824,6 +19158,7 @@
18824
19158
  chartType: zChartType,
18825
19159
  dataset: zDataset,
18826
19160
  datasetReshapeInfo: zDatasetReshapeInfo,
19161
+ pivotAllDatasetReshapeInfo: zDatasetReshapeInfo,
18827
19162
  dimensions: zDimensionTree,
18828
19163
  measures: zMeasureTree,
18829
19164
  reshapeMeasures: zMeasureTree.optional(),