@visactor/vseed 0.0.30 → 0.0.32

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 (36) hide show
  1. package/dist/builder/builder/builder.d.ts +36 -0
  2. package/dist/index.cjs +350 -103
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.ts +2 -1
  5. package/dist/index.js +197 -66
  6. package/dist/index.js.map +1 -1
  7. package/dist/pipeline/spec/chart/pipes/tooltip/index.d.ts +2 -0
  8. package/dist/pipeline/spec/chart/pipes/tooltip/tooltipAreaRange.d.ts +2 -0
  9. package/dist/pipeline/spec/chart/pipes/tooltip/tooltipDisable.d.ts +2 -0
  10. package/dist/types/advancedVSeed.d.ts +12 -0
  11. package/dist/types/chartType/area/area.d.ts +16 -4
  12. package/dist/types/chartType/areaPercent/areaPercent.d.ts +16 -4
  13. package/dist/types/chartType/areaRange/areaRange.d.ts +16 -4
  14. package/dist/types/chartType/bar/bar.d.ts +16 -4
  15. package/dist/types/chartType/barParallel/barParallel.d.ts +16 -4
  16. package/dist/types/chartType/barPercent/barPercent.d.ts +16 -4
  17. package/dist/types/chartType/column/column.d.ts +16 -4
  18. package/dist/types/chartType/columnParallel/columnParallel.d.ts +16 -4
  19. package/dist/types/chartType/columnPercent/columnPercent.d.ts +16 -4
  20. package/dist/types/chartType/line/line.d.ts +17 -5
  21. package/dist/types/chartType/scatter/scatter.d.ts +12 -0
  22. package/dist/types/properties/analysis/analysis.d.ts +1 -1
  23. package/dist/types/properties/analysis/index.d.ts +1 -1
  24. package/dist/types/properties/analysis/{sortAxis.d.ts → sort.d.ts} +2 -2
  25. package/dist/types/properties/annotation/annotation.d.ts +12 -0
  26. package/dist/types/properties/annotation/annotationArea.d.ts +14 -17
  27. package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +27 -46
  28. package/dist/types/properties/annotation/annotationPoint.d.ts +0 -14
  29. package/dist/types/properties/annotation/annotationVerticalLine.d.ts +28 -50
  30. package/dist/types/properties/config/axes/axis.d.ts +1 -1
  31. package/dist/types/properties/config/legend/legend.d.ts +9 -10
  32. package/dist/types/properties/measures/measures.d.ts +6 -1
  33. package/dist/types/vseed.d.ts +133 -1
  34. package/dist/umd/index.js +273 -7958
  35. package/dist/umd/index.js.map +1 -1
  36. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,14 +1,5 @@
1
1
  "use strict";
2
2
  var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.n = (module)=>{
5
- var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
- __webpack_require__.d(getter, {
7
- a: getter
8
- });
9
- return getter;
10
- };
11
- })();
12
3
  (()=>{
13
4
  __webpack_require__.d = (exports1, definition)=>{
14
5
  for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
@@ -33,20 +24,28 @@ var __webpack_require__ = {};
33
24
  var __webpack_exports__ = {};
34
25
  __webpack_require__.r(__webpack_exports__);
35
26
  __webpack_require__.d(__webpack_exports__, {
27
+ funnelAdvancedPipeline: ()=>funnelAdvancedPipeline,
36
28
  zHeatmapConfig: ()=>zHeatmapConfig,
37
- zPie: ()=>zPie,
38
29
  zBar: ()=>zBar,
30
+ pieAdvancedPipeline: ()=>pieAdvancedPipeline,
39
31
  execPipeline: ()=>execPipeline,
32
+ areaSpecPipeline: ()=>areaSpecPipeline,
40
33
  isTable: ()=>isTable,
41
34
  zDonut: ()=>zDonut,
35
+ zPie: ()=>zPie,
42
36
  zRoseConfig: ()=>zRoseConfig,
43
37
  findFirstMeasure: ()=>findFirstMeasure,
38
+ scatterAdvancedPipeline: ()=>scatterAdvancedPipeline,
39
+ updateSpec: ()=>updateSpec,
44
40
  zCrosshairRect: ()=>zCrosshairRect,
41
+ scatterSpecPipeline: ()=>scatterSpecPipeline,
45
42
  intl: ()=>intl,
43
+ columnPercentAdvancedPipeline: ()=>columnPercentAdvancedPipeline,
46
44
  zColumnConfig: ()=>zColumnConfig,
47
45
  zAnnotation: ()=>zAnnotation,
48
46
  selector: ()=>selector_selector,
49
47
  zSortLegend: ()=>zSortLegend,
48
+ pivotTableAdvancedPipeline: ()=>pivotTableAdvancedPipeline,
50
49
  zYBandAxis: ()=>zYBandAxis,
51
50
  dataReshapeFor1D2M: ()=>dataReshapeFor1D2M,
52
51
  zAnnotationHorizontalLine: ()=>zAnnotationHorizontalLine,
@@ -54,14 +53,17 @@ __webpack_require__.d(__webpack_exports__, {
54
53
  registerFunnel: ()=>registerFunnel,
55
54
  Separator: ()=>Separator,
56
55
  zYLinearAxis: ()=>zYLinearAxis,
56
+ columnAdvancedPipeline: ()=>columnAdvancedPipeline,
57
57
  zLabel: ()=>zLabel,
58
58
  registerColumn: ()=>registerColumn,
59
59
  findAllMeasures: ()=>findAllMeasures,
60
+ funnelSpecPipeline: ()=>funnelSpecPipeline,
60
61
  isDimensionSelector: ()=>isDimensionSelector,
61
62
  zAnalysis: ()=>zAnalysis,
62
63
  zColorLegend: ()=>zColorLegend,
63
64
  preorderTraverse: ()=>preorderTraverse,
64
65
  zDimensionTree: ()=>zDimensionTree,
66
+ roseParallelSpecPipeline: ()=>roseParallelSpecPipeline,
65
67
  zLineStyle: ()=>zLineStyle,
66
68
  dataReshapeFor1D1M: ()=>dataReshapeFor1D1M,
67
69
  registerArea: ()=>registerArea,
@@ -69,8 +71,9 @@ __webpack_require__.d(__webpack_exports__, {
69
71
  zDataset: ()=>zDataset,
70
72
  UnfoldDimensionGroupId: ()=>UnfoldDimensionGroupId,
71
73
  zNumFormat: ()=>zNumFormat,
72
- findDimensionById: ()=>findDimensionById,
74
+ barPercentAdvancedPipeline: ()=>barPercentAdvancedPipeline,
73
75
  findAllDimensions: ()=>findAllDimensions,
76
+ findDimensionById: ()=>findDimensionById,
74
77
  zAreaRangeConfig: ()=>zAreaRangeConfig,
75
78
  zPivotTableConfig: ()=>zPivotTableConfig,
76
79
  zArea: ()=>zArea,
@@ -79,51 +82,58 @@ __webpack_require__.d(__webpack_exports__, {
79
82
  zLegend: ()=>zLegend,
80
83
  FoldMeasureId: ()=>FoldMeasureId,
81
84
  zColumnParallelConfig: ()=>zColumnParallelConfig,
82
- zHeatmap: ()=>zHeatmap,
85
+ donutSpecPipeline: ()=>donutSpecPipeline,
83
86
  registerAreaPercent: ()=>registerAreaPercent,
84
- zTheme: ()=>zTheme,
87
+ zHeatmap: ()=>zHeatmap,
85
88
  zBarPercent: ()=>zBarPercent,
89
+ zTheme: ()=>zTheme,
86
90
  zDatum: ()=>zDatum,
91
+ barAdvancedPipeline: ()=>barAdvancedPipeline,
87
92
  zCustomThemeConfig: ()=>zCustomThemeConfig,
88
93
  registerColumnPercent: ()=>registerColumnPercent,
89
- zCrosshairLine: ()=>zCrosshairLine,
94
+ registerHeatmap: ()=>registerHeatmap,
90
95
  registerAreaRange: ()=>registerAreaRange,
91
- registerBarPercent: ()=>registerBarPercent,
96
+ roseSpecPipeline: ()=>roseSpecPipeline,
92
97
  dataReshapeFor2D1M0Name: ()=>dataReshapeFor2D1M0Name,
93
- registerHeatmap: ()=>registerHeatmap,
98
+ registerBarPercent: ()=>registerBarPercent,
94
99
  registerLightTheme: ()=>registerLightTheme,
95
- zPivotTable: ()=>zPivotTable,
100
+ roseAdvancedPipeline: ()=>roseAdvancedPipeline,
96
101
  zBarParallel: ()=>zBarParallel,
97
- zChartType: ()=>zChartType,
98
102
  isPartialDatumSelector: ()=>isPartialDatumSelector,
99
- registerDarkTheme: ()=>registerDarkTheme,
100
103
  registerPivotTable: ()=>registerPivotTable,
104
+ tableAdvancedPipeline: ()=>tableAdvancedPipeline,
105
+ pieSpecPipeline: ()=>pieSpecPipeline,
106
+ registerDarkTheme: ()=>registerDarkTheme,
101
107
  zAnnotationVerticalLine: ()=>zAnnotationVerticalLine,
102
- zMeasureTree: ()=>zMeasureTree,
103
- zSortAxis: ()=>zSortAxis,
104
- zStackCornerRadius: ()=>zStackCornerRadius,
108
+ zChartType: ()=>zChartType,
109
+ barSpecPipeline: ()=>barSpecPipeline,
110
+ zCrosshairLine: ()=>zCrosshairLine,
105
111
  registerRose: ()=>registerRose,
106
- zRose: ()=>zRose,
112
+ zMeasureTree: ()=>zMeasureTree,
107
113
  unfoldDimensions: ()=>unfoldDimensions,
108
- zPieConfig: ()=>zPieConfig,
114
+ roseParallelAdvancedPipeline: ()=>roseParallelAdvancedPipeline,
109
115
  registerTable: ()=>registerTable,
110
116
  Builder: ()=>Builder,
111
117
  autoFormatter: ()=>autoFormatter,
112
118
  findFirstDimension: ()=>findFirstDimension,
113
- registerBar: ()=>registerBar,
114
119
  registerAll: ()=>registerAll,
120
+ registerBar: ()=>registerBar,
115
121
  isVChart: ()=>isVChart,
122
+ radarSpecPipeline: ()=>radarSpecPipeline,
123
+ zPieConfig: ()=>zPieConfig,
124
+ zPivotTable: ()=>zPivotTable,
116
125
  zRadar: ()=>zRadar,
117
- zTable: ()=>zTable,
126
+ zRose: ()=>zRose,
118
127
  registerLine: ()=>registerLine,
119
128
  registerCustomTheme: ()=>registerCustomTheme,
120
129
  zColor: ()=>zColor,
121
130
  registerRoseParallel: ()=>registerRoseParallel,
122
131
  registerDonut: ()=>registerDonut,
132
+ heatmapSpecPipeline: ()=>heatmapSpecPipeline,
133
+ heatmapAdvancedPipeline: ()=>heatmapAdvancedPipeline,
123
134
  zDonutConfig: ()=>zDonutConfig,
124
- zMeasureGroup: ()=>zMeasureGroup,
125
- zUnfoldInfo: ()=>zUnfoldInfo,
126
135
  zFunnelConfig: ()=>zFunnelConfig,
136
+ zMeasureGroup: ()=>zMeasureGroup,
127
137
  zMeasures: ()=>zMeasures,
128
138
  FoldMeasureName: ()=>FoldMeasureName,
129
139
  zRadarConfig: ()=>zRadarConfig,
@@ -132,20 +142,27 @@ __webpack_require__.d(__webpack_exports__, {
132
142
  zAreaConfig: ()=>zAreaConfig,
133
143
  zAxis: ()=>zAxis,
134
144
  isVTable: ()=>isVTable,
145
+ zTable: ()=>zTable,
146
+ zUnfoldInfo: ()=>zUnfoldInfo,
135
147
  zLine: ()=>zLine,
136
- zFoldInfo: ()=>zFoldInfo,
148
+ columnSpecPipeline: ()=>columnSpecPipeline,
137
149
  UnfoldDimensionGroup: ()=>UnfoldDimensionGroup,
138
150
  zDatasetReshapeInfo: ()=>zDatasetReshapeInfo,
151
+ zFoldInfo: ()=>zFoldInfo,
139
152
  zLinearColor: ()=>zLinearColor,
140
153
  zAreaStyle: ()=>zAreaStyle,
141
154
  ORIGINAL_DATA: ()=>ORIGINAL_DATA,
155
+ zStackCornerRadius: ()=>zStackCornerRadius,
142
156
  zAnnotationArea: ()=>zAnnotationArea,
157
+ columnParallelSpecPipeline: ()=>columnParallelSpecPipeline,
143
158
  i18n: ()=>i18n,
144
159
  zPointStyle: ()=>zPointStyle,
145
160
  zAnnotationPoint: ()=>zAnnotationPoint,
146
161
  lightTheme: ()=>lightTheme,
147
162
  registerColumnParallel: ()=>registerColumnParallel,
163
+ updateAdvanced: ()=>updateAdvanced,
148
164
  zDimension: ()=>zDimension,
165
+ zSort: ()=>zSort,
149
166
  isPivotChart: ()=>isPivotChart,
150
167
  zDualAxisConfig: ()=>zDualAxisConfig,
151
168
  zColumn: ()=>zColumn,
@@ -157,38 +174,54 @@ __webpack_require__.d(__webpack_exports__, {
157
174
  zColumnPercentConfig: ()=>zColumnPercentConfig,
158
175
  findMeasureById: ()=>findMeasureById,
159
176
  zVSeed: ()=>zVSeed,
177
+ areaPercentAdvancedPipeline: ()=>areaPercentAdvancedPipeline,
178
+ radarAdvancedPipeline: ()=>radarAdvancedPipeline,
160
179
  zBackgroundColor: ()=>zBackgroundColor,
161
180
  zAreaPercentConfig: ()=>zAreaPercentConfig,
162
181
  registerBarParallel: ()=>registerBarParallel,
163
182
  registerRadar: ()=>registerRadar,
164
183
  zLocale: ()=>zLocale,
184
+ pivotTableSpecPipeline: ()=>pivotTableSpecPipeline,
165
185
  zMeasure: ()=>zMeasure,
186
+ areaRangeSpecPipeline: ()=>areaRangeSpecPipeline,
187
+ areaRangeAdvancedPipeline: ()=>areaRangeAdvancedPipeline,
166
188
  zAreaRange: ()=>zAreaRange,
167
189
  registerScatter: ()=>registerScatter,
168
190
  zEncoding: ()=>zEncoding,
169
191
  autoNumFormatter: ()=>autoNumFormatter,
170
192
  zAdvancedVSeed: ()=>zAdvancedVSeed,
171
- zXLinearAxis: ()=>zXLinearAxis,
193
+ tableSpecPipeline: ()=>tableSpecPipeline,
172
194
  zConfig: ()=>zConfig,
173
195
  zRoseParallelConfig: ()=>zRoseParallelConfig,
174
196
  zBarStyle: ()=>zBarStyle,
197
+ zXLinearAxis: ()=>zXLinearAxis,
175
198
  zAreaPercent: ()=>zAreaPercent,
199
+ columnParallelAdvancedPipeline: ()=>columnParallelAdvancedPipeline,
176
200
  isValueSelector: ()=>isValueSelector,
201
+ donutAdvancedPipeline: ()=>donutAdvancedPipeline,
177
202
  zColumnPercent: ()=>zColumnPercent,
178
- zScatter: ()=>zScatter,
179
- zScatterConfig: ()=>zScatterConfig,
180
- foldMeasures: ()=>foldMeasures,
203
+ registerPie: ()=>registerPie,
181
204
  dataReshapeFor2D1M: ()=>dataReshapeFor2D1M,
205
+ foldMeasures: ()=>foldMeasures,
182
206
  isPivotTable: ()=>isPivotTable,
183
- registerPie: ()=>registerPie,
184
207
  zFunnel: ()=>zFunnel,
185
- zTooltip: ()=>zTooltip,
208
+ zScatter: ()=>zScatter,
186
209
  zBarParallelConfig: ()=>zBarParallelConfig,
210
+ barParallelAdvancedPipeline: ()=>barParallelAdvancedPipeline,
187
211
  FoldMeasureValue: ()=>FoldMeasureValue,
212
+ barPercentSpecPipeline: ()=>barPercentSpecPipeline,
213
+ lineAdvancedPipeline: ()=>lineAdvancedPipeline,
188
214
  zBarPercentConfig: ()=>zBarPercentConfig,
189
- zDimensionGroup: ()=>zDimensionGroup,
215
+ lineSpecPipeline: ()=>lineSpecPipeline,
216
+ zScatterConfig: ()=>zScatterConfig,
217
+ zTooltip: ()=>zTooltip,
190
218
  createFormatter: ()=>createFormatter,
219
+ zDimensionGroup: ()=>zDimensionGroup,
191
220
  isMeasureSelector: ()=>isMeasureSelector,
221
+ columnPercentSpecPipeline: ()=>columnPercentSpecPipeline,
222
+ areaAdvancedPipeline: ()=>areaAdvancedPipeline,
223
+ areaPercentSpecPipeline: ()=>areaPercentSpecPipeline,
224
+ barParallelSpecPipeline: ()=>barParallelSpecPipeline,
192
225
  zBarConfig: ()=>zBarConfig
193
226
  });
194
227
  const execPipeline = (pipeline, context, initialValue = {})=>{
@@ -1398,7 +1431,7 @@ const encodingXY = (advancedVSeed)=>{
1398
1431
  };
1399
1432
  const { datasetReshapeInfo, dimensions } = advancedVSeed;
1400
1433
  if (!datasetReshapeInfo || !dimensions) return result;
1401
- const xDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
1434
+ const xDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
1402
1435
  const isZeroDimension = 0 === dimensions.length;
1403
1436
  const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
1404
1437
  const { foldInfo, unfoldInfo } = cur;
@@ -1434,7 +1467,7 @@ const sortXBandAxis = (advancedVSeed, context)=>{
1434
1467
  ...advancedVSeed
1435
1468
  };
1436
1469
  const { vseed } = context;
1437
- const { sortAxis, dataset } = vseed;
1470
+ const { sort: sortAxis, dataset } = vseed;
1438
1471
  const { encoding } = advancedVSeed;
1439
1472
  const xField = encoding?.[0]?.x?.[0];
1440
1473
  if (!sortAxis || !xField) return advancedVSeed;
@@ -1449,7 +1482,7 @@ const sortYBandAxis = (advancedVSeed, context)=>{
1449
1482
  ...advancedVSeed
1450
1483
  };
1451
1484
  const { vseed } = context;
1452
- const { sortAxis, dataset } = vseed;
1485
+ const { sort: sortAxis, dataset } = vseed;
1453
1486
  const { encoding } = advancedVSeed;
1454
1487
  const yField = encoding?.[0]?.y?.[0];
1455
1488
  if (!sortAxis || !yField) return advancedVSeed;
@@ -1486,10 +1519,10 @@ const sort_sortLegend = (advancedVSeed, context)=>{
1486
1519
  result.analysis.orderMapping[groupField] = orderRes;
1487
1520
  return result;
1488
1521
  };
1489
- const calcOrder = (sortAxis, id, dataset)=>{
1490
- if (sortAxis.customOrder) return sortAxis.customOrder;
1491
- const order = sortAxis.order || 'asc';
1492
- const orderBy = sortAxis.orderBy;
1522
+ const calcOrder = (sortConfig, id, dataset)=>{
1523
+ if (sortConfig.customOrder) return sortConfig.customOrder;
1524
+ const order = sortConfig.order || 'asc';
1525
+ const orderBy = sortConfig.orderBy;
1493
1526
  const res = (0, external_remeda_namespaceObject.sort)(dataset, (a, b)=>{
1494
1527
  const aValue = a[orderBy || id];
1495
1528
  const bValue = b[orderBy || id];
@@ -1768,13 +1801,13 @@ const xBand = (spec, context)=>{
1768
1801
  ];
1769
1802
  return result;
1770
1803
  }
1771
- const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength, labelAutoRotate, labelAutoRotateAngleRange } = config;
1804
+ const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange } = config;
1772
1805
  const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
1773
1806
  const bandAxis = {
1774
1807
  visible,
1775
1808
  type: 'band',
1776
1809
  orient: 'bottom',
1777
- maxHeight: labelAutoLimitLength,
1810
+ maxHeight: labelAutoLimitLength + 60,
1778
1811
  sampling,
1779
1812
  hover: true,
1780
1813
  label: {
@@ -2024,24 +2057,35 @@ const tooltip_tooltip = (spec, context)=>{
2024
2057
  ...spec
2025
2058
  };
2026
2059
  const { advancedVSeed } = context;
2027
- const { measures, datasetReshapeInfo, chartType, locale } = advancedVSeed;
2060
+ const { measures, datasetReshapeInfo, chartType, locale, dimensions } = advancedVSeed;
2028
2061
  const baseConfig = advancedVSeed.config[chartType];
2029
2062
  const { tooltip = {
2030
2063
  enable: true
2031
2064
  } } = baseConfig;
2032
2065
  const { enable } = tooltip;
2033
- const { measureId, measureValue } = datasetReshapeInfo[0].foldInfo;
2066
+ const { measureId, measureValue, measureName } = datasetReshapeInfo[0].foldInfo;
2034
2067
  const { groupName } = datasetReshapeInfo[0].unfoldInfo;
2035
2068
  result.tooltip = {
2036
2069
  visible: enable,
2037
2070
  mark: {
2038
2071
  title: {
2039
- value: (datum)=>datum && datum[groupName] || ''
2072
+ visible: true
2040
2073
  },
2041
2074
  content: [
2075
+ ...dimensions.map((item)=>({
2076
+ visible: true,
2077
+ hasShape: true,
2078
+ shapeType: 'rectRound',
2079
+ key: (datum)=>{
2080
+ if (item.alias || item.id) return item.alias || item.id;
2081
+ return datum && datum[item.id];
2082
+ },
2083
+ value: (datum)=>datum && datum[item.id]
2084
+ })),
2042
2085
  {
2043
2086
  visible: true,
2044
- key: (datum)=>datum && datum[groupName] || '',
2087
+ hasShape: true,
2088
+ key: (datum)=>datum && datum[measureName || groupName] || '',
2045
2089
  value: (datum)=>{
2046
2090
  if (!datum) return '';
2047
2091
  const value = datum[measureValue];
@@ -2077,7 +2121,8 @@ const tooltip_tooltip = (spec, context)=>{
2077
2121
  }
2078
2122
  if (autoFormat) return autoFormatter(value, locale);
2079
2123
  return String(value);
2080
- }
2124
+ },
2125
+ shapeType: 'rectRound'
2081
2126
  }
2082
2127
  ]
2083
2128
  }
@@ -2134,7 +2179,7 @@ const discreteLegend = (spec, context)=>{
2134
2179
  const baseConfig = advancedVSeed.config[chartType];
2135
2180
  if (!baseConfig || !baseConfig.legend) return result;
2136
2181
  const { legend } = baseConfig;
2137
- const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight, maxSize, border, shapeType = 'rectRound' } = legend || {};
2182
+ const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight, maxSize = 1, border, shapeType = 'rectRound' } = legend || {};
2138
2183
  const orient = [
2139
2184
  'bottom',
2140
2185
  'bottomLeft',
@@ -2176,8 +2221,8 @@ const discreteLegend = (spec, context)=>{
2176
2221
  result.legends = {
2177
2222
  type: 'discrete',
2178
2223
  visible: enable,
2179
- maxCol: maxSize,
2180
- maxRow: maxSize,
2224
+ maxCol: Math.max(1, maxSize),
2225
+ maxRow: Math.max(1, maxSize),
2181
2226
  autoPage: true,
2182
2227
  orient,
2183
2228
  position: legendPosition,
@@ -2191,6 +2236,7 @@ const discreteLegend = (spec, context)=>{
2191
2236
  }) : void 0,
2192
2237
  item: {
2193
2238
  focus: true,
2239
+ maxWidth: '30%',
2194
2240
  focusIconStyle: {
2195
2241
  size: labelFontSize + 2,
2196
2242
  fill: labelFontColor,
@@ -2219,7 +2265,8 @@ const discreteLegend = (spec, context)=>{
2219
2265
  }
2220
2266
  }
2221
2267
  }
2222
- }
2268
+ },
2269
+ padding: 0
2223
2270
  };
2224
2271
  return result;
2225
2272
  };
@@ -2326,7 +2373,7 @@ const pointStyle_pointStyle = (spec, context)=>{
2326
2373
  pointStyle
2327
2374
  ];
2328
2375
  const customMap = pointStyles.reduce((result, style, index)=>{
2329
- const { pointBorderColor, pointBorderStyle, pointBorderWidth, pointColor, pointColorOpacity, pointSize } = style;
2376
+ const { pointBorderColor, pointBorderStyle, pointBorderWidth = 1, pointColor, pointColorOpacity, pointSize } = style;
2330
2377
  const lineDash = 'dashed' === pointBorderStyle ? [
2331
2378
  5,
2332
2379
  2
@@ -2504,12 +2551,14 @@ const annotationPoint_annotationPoint = (spec, context)=>{
2504
2551
  offsetY,
2505
2552
  offsetX,
2506
2553
  text: {
2507
- visible: true,
2508
2554
  text: text,
2509
2555
  style: {
2556
+ visible: true,
2510
2557
  textAlign: textAlign,
2511
2558
  textBaseline: textBaseline,
2512
2559
  fill: textColor,
2560
+ stroke: backgroundColor,
2561
+ lineWidth: 1,
2513
2562
  fontSize: textFontSize,
2514
2563
  fontWeight: textFontWeight
2515
2564
  },
@@ -2520,7 +2569,7 @@ const annotationPoint_annotationPoint = (spec, context)=>{
2520
2569
  cornerRadius: backgroundBorderRadius ?? 4,
2521
2570
  fill: backgroundColor,
2522
2571
  stroke: backgroundBorderColor,
2523
- strokeWidth: backgroundBorderWidth
2572
+ lineWidth: backgroundBorderWidth
2524
2573
  }
2525
2574
  }
2526
2575
  }
@@ -2549,14 +2598,16 @@ const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
2549
2598
  insideEnd: 'insideEndTop'
2550
2599
  };
2551
2600
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
2552
- const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 2, backgroundVisible = true, lineColor = '#212121', lineStyle = 'dashed', lineVisible = true, lineWidth = 1 } = annotationVerticalLine;
2601
+ const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 2, backgroundVisible = true, lineColor = '#212121', lineStyle = 'dashed', lineVisible = true, lineWidth = 1, offsetX = 0, offsetY = 0 } = annotationVerticalLine;
2553
2602
  const dataset = advancedVSeed.dataset.flat();
2554
2603
  const generateOneMarkLine = (x)=>({
2555
2604
  x: x,
2556
2605
  zIndex: ANNOTATION_Z_INDEX,
2606
+ offsetX,
2607
+ offsetY,
2557
2608
  line: {
2558
- visible: lineVisible,
2559
2609
  style: {
2610
+ visible: lineVisible,
2560
2611
  stroke: lineColor,
2561
2612
  lineStyle: lineStyle,
2562
2613
  lineWidth: lineWidth,
@@ -2576,26 +2627,32 @@ const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
2576
2627
  position: positionMap[textPosition],
2577
2628
  style: {
2578
2629
  visible: true,
2630
+ stroke: backgroundColor,
2631
+ lineWidth: 1,
2579
2632
  textAlign: textAlign,
2580
2633
  textBaseline: textBaseline,
2581
2634
  fill: textColor,
2582
2635
  fontSize: textFontSize,
2583
- fontWeight: textFontWeight
2636
+ fontWeight: textFontWeight,
2637
+ dy: textFontSize
2584
2638
  },
2585
2639
  labelBackground: {
2586
2640
  visible: backgroundVisible,
2587
2641
  padding: backgroundPadding,
2588
2642
  style: {
2643
+ dy: textFontSize,
2589
2644
  cornerRadius: backgroundBorderRadius ?? 4,
2590
2645
  fill: backgroundColor,
2591
2646
  stroke: backgroundBorderColor,
2592
- strokeWidth: backgroundBorderWidth
2647
+ lineWidth: backgroundBorderWidth
2593
2648
  }
2594
2649
  }
2595
2650
  },
2596
2651
  endSymbol: {
2597
2652
  visible: true,
2653
+ size: 10 + lineWidth,
2598
2654
  style: {
2655
+ dy: 4,
2599
2656
  fill: lineColor
2600
2657
  }
2601
2658
  }
@@ -2640,14 +2697,16 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2640
2697
  insideEnd: 'insideEndTop'
2641
2698
  };
2642
2699
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
2643
- const { selector: selectorPoint, yValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'bottom', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 2, backgroundVisible = true, lineColor = '#212121', lineStyle = 'dashed', lineVisible = true, lineWidth = 1 } = annotationVerticalLine;
2700
+ const { selector: selectorPoint, yValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 2, backgroundVisible = true, lineColor = '#212121', lineStyle = 'dashed', lineVisible = true, lineWidth = 1, offsetX = 0, offsetY = 0 } = annotationVerticalLine;
2644
2701
  const dataset = advancedVSeed.dataset.flat();
2645
2702
  const generateOneMarkLine = (y)=>({
2646
2703
  y,
2704
+ offsetX,
2705
+ offsetY,
2647
2706
  zIndex: ANNOTATION_Z_INDEX,
2648
2707
  line: {
2649
- visible: lineVisible,
2650
2708
  style: {
2709
+ visible: lineVisible,
2651
2710
  stroke: lineColor,
2652
2711
  lineStyle: lineStyle,
2653
2712
  lineWidth: lineWidth,
@@ -2667,6 +2726,9 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2667
2726
  position: positionMap[textPosition],
2668
2727
  style: {
2669
2728
  visible: true,
2729
+ dy: textFontSize,
2730
+ stroke: backgroundColor,
2731
+ lineWidth: 1,
2670
2732
  textAlign: textAlign,
2671
2733
  textBaseline: textBaseline,
2672
2734
  fill: textColor,
@@ -2677,16 +2739,19 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2677
2739
  visible: backgroundVisible,
2678
2740
  padding: backgroundPadding,
2679
2741
  style: {
2742
+ dy: textFontSize,
2680
2743
  cornerRadius: backgroundBorderRadius ?? 4,
2681
2744
  fill: backgroundColor,
2682
2745
  stroke: backgroundBorderColor,
2683
- strokeWidth: backgroundBorderWidth
2746
+ lineWidth: backgroundBorderWidth
2684
2747
  }
2685
2748
  }
2686
2749
  },
2687
2750
  endSymbol: {
2688
2751
  visible: true,
2752
+ size: 10 + lineWidth,
2689
2753
  style: {
2754
+ dx: -4,
2690
2755
  fill: lineColor
2691
2756
  }
2692
2757
  }
@@ -2733,12 +2798,14 @@ const annotationArea_annotationArea = (spec, context)=>{
2733
2798
  right: 'insideRight'
2734
2799
  };
2735
2800
  const markArea = annotationAreaList.flatMap((annotationArea)=>{
2736
- const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#191d24', backgroundPadding = 10, backgroundVisible = true, outerPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor, areaBorderRadius, areaBorderWidth } = annotationArea;
2801
+ const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#191d24', backgroundPadding = 10, backgroundVisible = true, outerPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor, areaBorderRadius, areaBorderWidth, offsetX = 0, offsetY = 0 } = annotationArea;
2737
2802
  const dataset = advancedVSeed.dataset.flat();
2738
2803
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
2739
2804
  return {
2740
2805
  zIndex: ANNOTATION_Z_INDEX,
2741
2806
  regionRelative: true,
2807
+ offsetX,
2808
+ offsetY,
2742
2809
  positions: (data, context)=>{
2743
2810
  const positionData = data.filter((item)=>selectedData.some((datum)=>isSubset(datum, item)));
2744
2811
  const xyList = positionData.map((datum)=>context.dataToPosition(datum));
@@ -2804,6 +2871,8 @@ const annotationArea_annotationArea = (spec, context)=>{
2804
2871
  textAlign: textAlign,
2805
2872
  textBaseline: textBaseline,
2806
2873
  fill: textColor,
2874
+ stroke: backgroundColor,
2875
+ lineWidth: 1,
2807
2876
  fontSize: textFontSize,
2808
2877
  fontWeight: textFontWeight
2809
2878
  },
@@ -2814,7 +2883,7 @@ const annotationArea_annotationArea = (spec, context)=>{
2814
2883
  cornerRadius: backgroundBorderRadius ?? 4,
2815
2884
  fill: backgroundColor,
2816
2885
  stroke: backgroundBorderColor,
2817
- strokeWidth: backgroundBorderWidth
2886
+ lineWidth: backgroundBorderWidth
2818
2887
  }
2819
2888
  }
2820
2889
  },
@@ -2824,7 +2893,7 @@ const annotationArea_annotationArea = (spec, context)=>{
2824
2893
  fill: areaColor,
2825
2894
  fillOpacity: areaColorOpacity,
2826
2895
  stroke: areaBorderColor,
2827
- strokeWidth: areaBorderWidth,
2896
+ lineWidth: areaBorderWidth,
2828
2897
  cornerRadius: areaBorderRadius
2829
2898
  }
2830
2899
  }
@@ -3104,7 +3173,7 @@ const pivotDiscreteLegend = (spec, context)=>{
3104
3173
  }), {});
3105
3174
  const { legend, color } = baseConfig;
3106
3175
  const { colorScheme } = color;
3107
- const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight = 400, maxSize, border, shapeType = 'rectRound' } = legend || {};
3176
+ const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight = 400, maxSize = 1, border, shapeType = 'rectRound' } = legend || {};
3108
3177
  const orient = [
3109
3178
  'bottom',
3110
3179
  'bottomLeft',
@@ -3148,8 +3217,8 @@ const pivotDiscreteLegend = (spec, context)=>{
3148
3217
  type: 'discrete',
3149
3218
  orient,
3150
3219
  position: legendPosition,
3151
- maxCol: maxSize,
3152
- maxRow: maxSize,
3220
+ maxCol: Math.max(1, maxSize),
3221
+ maxRow: Math.max(1, maxSize),
3153
3222
  data: colorItems.map((d, index)=>({
3154
3223
  label: d,
3155
3224
  shape: {
@@ -3163,6 +3232,7 @@ const pivotDiscreteLegend = (spec, context)=>{
3163
3232
  })),
3164
3233
  item: {
3165
3234
  focus: true,
3235
+ maxWidth: '30%',
3166
3236
  focusIconStyle: {
3167
3237
  size: labelFontSize + 2,
3168
3238
  fill: labelFontColor,
@@ -3504,7 +3574,7 @@ const barStyle_barStyle = (spec, context)=>{
3504
3574
  barStyle
3505
3575
  ];
3506
3576
  const customMap = barStyles.reduce((result, style, index)=>{
3507
- const { barBorderColor, barBorderStyle, barBorderWidth, barColor, barColorOpacity, barRadius } = style;
3577
+ const { barBorderColor, barBorderStyle, barBorderWidth = 1, barColor, barColorOpacity, barRadius } = style;
3508
3578
  const lineDash = 'dashed' === barBorderStyle ? [
3509
3579
  5,
3510
3580
  2
@@ -3565,12 +3635,14 @@ const annotationAreaBand = (spec, context)=>{
3565
3635
  right: 'insideRight'
3566
3636
  };
3567
3637
  const markArea = annotationAreaList.flatMap((annotationArea)=>{
3568
- const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#191d24', backgroundPadding = 4, backgroundVisible = true, outerPadding = 8, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor, areaBorderRadius, areaBorderWidth } = annotationArea;
3638
+ const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#191d24', backgroundPadding = 4, backgroundVisible = true, outerPadding = 8, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor, areaBorderRadius, areaBorderWidth, offsetX, offsetY } = annotationArea;
3569
3639
  const dataset = advancedVSeed.dataset.flat();
3570
3640
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
3571
3641
  return {
3572
3642
  zIndex: ANNOTATION_Z_INDEX,
3573
3643
  regionRelative: true,
3644
+ offsetX,
3645
+ offsetY,
3574
3646
  positions: (data, context)=>{
3575
3647
  const positionData = data.filter((item)=>selectedData.some((datum)=>isSubset(datum, item)));
3576
3648
  const xyList = positionData.map((datum)=>context.dataToPosition(datum));
@@ -3639,6 +3711,8 @@ const annotationAreaBand = (spec, context)=>{
3639
3711
  style: {
3640
3712
  textAlign: textAlign,
3641
3713
  textBaseline: textBaseline,
3714
+ stroke: backgroundColor,
3715
+ lineWidth: 1,
3642
3716
  fill: textColor,
3643
3717
  fontSize: textFontSize,
3644
3718
  fontWeight: textFontWeight
@@ -3650,7 +3724,7 @@ const annotationAreaBand = (spec, context)=>{
3650
3724
  cornerRadius: backgroundBorderRadius ?? 4,
3651
3725
  fill: backgroundColor,
3652
3726
  stroke: backgroundBorderColor,
3653
- strokeWidth: backgroundBorderWidth
3727
+ lineWidth: backgroundBorderWidth
3654
3728
  }
3655
3729
  }
3656
3730
  },
@@ -3660,7 +3734,7 @@ const annotationAreaBand = (spec, context)=>{
3660
3734
  fill: areaColor,
3661
3735
  fillOpacity: areaColorOpacity,
3662
3736
  stroke: areaBorderColor,
3663
- strokeWidth: areaBorderWidth,
3737
+ lineWidth: areaBorderWidth,
3664
3738
  cornerRadius: areaBorderRadius
3665
3739
  }
3666
3740
  }
@@ -3908,7 +3982,7 @@ const encodingYX = (advancedVSeed)=>{
3908
3982
  };
3909
3983
  const { datasetReshapeInfo, dimensions } = advancedVSeed;
3910
3984
  if (!datasetReshapeInfo || !dimensions) return result;
3911
- const yDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
3985
+ const yDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
3912
3986
  const isZeroDimension = 0 === dimensions.length;
3913
3987
  const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
3914
3988
  const { foldInfo, unfoldInfo } = cur;
@@ -4121,13 +4195,13 @@ const yBand = (spec, context)=>{
4121
4195
  ];
4122
4196
  return result;
4123
4197
  }
4124
- const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength, labelAutoRotate, labelAutoRotateAngleRange } = config;
4198
+ const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange } = config;
4125
4199
  const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
4126
4200
  const bandAxis = {
4127
4201
  visible,
4128
4202
  type: 'band',
4129
4203
  orient: 'left',
4130
- maxWidth: labelAutoLimitLength,
4204
+ maxWidth: labelAutoLimitLength + 60,
4131
4205
  sampling,
4132
4206
  hover: true,
4133
4207
  label: {
@@ -4828,8 +4902,8 @@ const encodingXYY = (advancedVSeed)=>{
4828
4902
  const result = {
4829
4903
  ...advancedVSeed
4830
4904
  };
4831
- const { datasetReshapeInfo, dimensions, measures } = advancedVSeed;
4832
- if (!datasetReshapeInfo || !dimensions || !measures) return result;
4905
+ const { datasetReshapeInfo, measures } = advancedVSeed;
4906
+ if (!datasetReshapeInfo || !measures) return result;
4833
4907
  const encoding = datasetReshapeInfo.reduce((prev, cur, index)=>{
4834
4908
  const measure = measures[index];
4835
4909
  if ('children' in measure) {
@@ -5005,6 +5079,79 @@ const initAreaRangeLine2 = (spec, context)=>{
5005
5079
  };
5006
5080
  return result;
5007
5081
  };
5082
+ const tooltipDisable = (spec)=>{
5083
+ const result = {
5084
+ ...spec
5085
+ };
5086
+ result.tooltip = {
5087
+ visible: false
5088
+ };
5089
+ return result;
5090
+ };
5091
+ const tooltipAreaRange = (spec, context)=>{
5092
+ const result = {
5093
+ ...spec
5094
+ };
5095
+ const { advancedVSeed } = context;
5096
+ const { measures, datasetReshapeInfo, chartType, locale, encoding } = advancedVSeed;
5097
+ const baseConfig = advancedVSeed.config[chartType];
5098
+ const { tooltip = {
5099
+ enable: true
5100
+ } } = baseConfig;
5101
+ const { enable } = tooltip;
5102
+ const { groupName } = datasetReshapeInfo[0].unfoldInfo;
5103
+ const y = encoding[0]?.y || [];
5104
+ result.tooltip = {
5105
+ visible: enable,
5106
+ dimension: {
5107
+ content: [
5108
+ {
5109
+ visible: true,
5110
+ key: (datum)=>datum && datum[groupName] || '',
5111
+ value: (datum)=>{
5112
+ if (!datum) return '';
5113
+ const text = y.map((id)=>{
5114
+ const value = datum[id];
5115
+ const measure = findMeasureById(measures, id);
5116
+ if (!measure) return String(value);
5117
+ const { format = {}, autoFormat = true } = measure;
5118
+ if (!(0, external_remeda_namespaceObject.isEmpty)(format)) {
5119
+ const formatter = createFormatter(format);
5120
+ return formatter(value);
5121
+ }
5122
+ if (autoFormat) return autoFormatter(value, locale);
5123
+ return String(value);
5124
+ });
5125
+ return text.join(' ~ ');
5126
+ },
5127
+ shapeType: 'rectRound'
5128
+ },
5129
+ ...y.map((id)=>{
5130
+ const measure = findMeasureById(measures, id);
5131
+ return {
5132
+ visible: true,
5133
+ key: measure?.alias || id,
5134
+ value: (datum)=>{
5135
+ if (!datum) return '';
5136
+ const value = datum[id];
5137
+ const measure = findMeasureById(measures, id);
5138
+ if (!measure) return String(value);
5139
+ const { format = {}, autoFormat = true } = measure;
5140
+ if (!(0, external_remeda_namespaceObject.isEmpty)(format)) {
5141
+ const formatter = createFormatter(format);
5142
+ return formatter(value);
5143
+ }
5144
+ if (autoFormat) return autoFormatter(value, locale);
5145
+ return String(value);
5146
+ },
5147
+ shapeType: 'rectRound'
5148
+ };
5149
+ })
5150
+ ]
5151
+ }
5152
+ };
5153
+ return result;
5154
+ };
5008
5155
  const areaRange = [
5009
5156
  series([
5010
5157
  initAreaRange,
@@ -5013,12 +5160,14 @@ const areaRange = [
5013
5160
  initAreaRangeLine1,
5014
5161
  lineStyle_lineStyle,
5015
5162
  pointStyle_pointStyle,
5016
- pointStateDimensionHover
5163
+ pointStateDimensionHover,
5164
+ tooltipDisable
5017
5165
  ], [
5018
5166
  initAreaRangeLine2,
5019
5167
  lineStyle_lineStyle,
5020
5168
  pointStyle_pointStyle,
5021
- pointStateDimensionHover
5169
+ pointStateDimensionHover,
5170
+ tooltipDisable
5022
5171
  ]),
5023
5172
  datasetXY,
5024
5173
  progressive,
@@ -5026,6 +5175,7 @@ const areaRange = [
5026
5175
  xBand,
5027
5176
  yLinear,
5028
5177
  label_label,
5178
+ tooltipAreaRange,
5029
5179
  verticalCrosshairLine,
5030
5180
  annotationPoint_annotationPoint,
5031
5181
  annotationVerticalLine_annotationVerticalLine,
@@ -5045,12 +5195,14 @@ const pivotAreaRange = [
5045
5195
  initAreaRangeLine1,
5046
5196
  lineStyle_lineStyle,
5047
5197
  pointStyle_pointStyle,
5048
- pointStateDimensionHover
5198
+ pointStateDimensionHover,
5199
+ tooltipDisable
5049
5200
  ], [
5050
5201
  initAreaRangeLine2,
5051
5202
  lineStyle_lineStyle,
5052
5203
  pointStyle_pointStyle,
5053
- pointStateDimensionHover
5204
+ pointStateDimensionHover,
5205
+ tooltipDisable
5054
5206
  ]),
5055
5207
  background_backgroundColor,
5056
5208
  datasetXY,
@@ -5058,6 +5210,7 @@ const pivotAreaRange = [
5058
5210
  xBand,
5059
5211
  yLinear,
5060
5212
  label_label,
5213
+ tooltipAreaRange,
5061
5214
  verticalCrosshairLine,
5062
5215
  annotationPoint_annotationPoint,
5063
5216
  annotationVerticalLine_annotationVerticalLine,
@@ -5485,8 +5638,8 @@ const encodingPie = (advancedVSeed)=>{
5485
5638
  const result = {
5486
5639
  ...advancedVSeed
5487
5640
  };
5488
- const { datasetReshapeInfo, dimensions } = advancedVSeed;
5489
- if (!datasetReshapeInfo || !dimensions) return result;
5641
+ const { datasetReshapeInfo } = advancedVSeed;
5642
+ if (!datasetReshapeInfo) return result;
5490
5643
  const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
5491
5644
  const { foldInfo, unfoldInfo } = cur;
5492
5645
  const radius = [
@@ -5558,7 +5711,6 @@ const initPie = (spec, context)=>{
5558
5711
  },
5559
5712
  state: {
5560
5713
  hover: {
5561
- centerOffset: 5,
5562
5714
  outerRadius: 1.1 * result.outerRadius
5563
5715
  }
5564
5716
  }
@@ -5706,7 +5858,7 @@ const encodingRose = (advancedVSeed)=>{
5706
5858
  };
5707
5859
  const { datasetReshapeInfo, dimensions, measures } = advancedVSeed;
5708
5860
  if (!datasetReshapeInfo || !dimensions || !measures) return result;
5709
- const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
5861
+ const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
5710
5862
  const is1D1M = 1 === dimensions.length && 1 === measures.length;
5711
5863
  const isZeroDimension = 0 === dimensions.length;
5712
5864
  const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
@@ -6020,7 +6172,7 @@ const encodingAR = (advancedVSeed)=>{
6020
6172
  };
6021
6173
  const { datasetReshapeInfo, dimensions, measures } = advancedVSeed;
6022
6174
  if (!datasetReshapeInfo || !dimensions || !measures) return result;
6023
- const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
6175
+ const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
6024
6176
  const isZeroDimension = 0 === dimensions.length;
6025
6177
  const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
6026
6178
  const { foldInfo, unfoldInfo } = cur;
@@ -6193,8 +6345,8 @@ const encodingFunnel = (advancedVSeed)=>{
6193
6345
  const result = {
6194
6346
  ...advancedVSeed
6195
6347
  };
6196
- const { datasetReshapeInfo, dimensions } = advancedVSeed;
6197
- if (!datasetReshapeInfo || !dimensions) return result;
6348
+ const { datasetReshapeInfo } = advancedVSeed;
6349
+ if (!datasetReshapeInfo) return result;
6198
6350
  const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
6199
6351
  const { foldInfo, unfoldInfo } = cur;
6200
6352
  const size = [
@@ -6406,7 +6558,7 @@ const encodingMatrix = (advancedVSeed)=>{
6406
6558
  };
6407
6559
  const { datasetReshapeInfo, dimensions } = advancedVSeed;
6408
6560
  if (!datasetReshapeInfo || !dimensions) return result;
6409
- const xDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
6561
+ const xDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
6410
6562
  const isZeroDimension = 0 === dimensions.length;
6411
6563
  const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
6412
6564
  const { foldInfo, unfoldInfo } = cur;
@@ -6592,7 +6744,7 @@ const lightTheme = ()=>{
6592
6744
  labelAutoHide: true,
6593
6745
  labelAutoHideGap: 4,
6594
6746
  labelAutoLimit: true,
6595
- labelAutoLimitLength: 100,
6747
+ labelAutoLimitLength: 80,
6596
6748
  labelAutoRotate: false,
6597
6749
  labelAutoRotateAngleRange: [
6598
6750
  0,
@@ -6914,7 +7066,7 @@ const darkTheme = ()=>{
6914
7066
  labelAutoHide: true,
6915
7067
  labelAutoHideGap: 4,
6916
7068
  labelAutoLimit: true,
6917
- labelAutoLimitLength: 100,
7069
+ labelAutoLimitLength: 80,
6918
7070
  labelAutoRotate: false,
6919
7071
  labelAutoRotateAngleRange: [
6920
7072
  0,
@@ -7220,8 +7372,13 @@ const registerAll = ()=>{
7220
7372
  registerLightTheme();
7221
7373
  registerDarkTheme();
7222
7374
  };
7375
+ const updateAdvanced = (chartType, advancedPipe)=>{
7376
+ Builder._customAdvancedPipe[chartType] = advancedPipe;
7377
+ };
7378
+ const updateSpec = (chartType, specPipe)=>{
7379
+ Builder._customSpecPipe[chartType] = specPipe;
7380
+ };
7223
7381
  const external_zod_namespaceObject = require("zod");
7224
- var external_zod_default = /*#__PURE__*/ __webpack_require__.n(external_zod_namespaceObject);
7225
7382
  const zChartType = external_zod_namespaceObject.z["enum"]([
7226
7383
  'table',
7227
7384
  'pivotTable',
@@ -7912,7 +8069,9 @@ const zAnnotationVerticalLine = external_zod_namespaceObject.z.object({
7912
8069
  backgroundBorderColor: external_zod_namespaceObject.z.string().optional(),
7913
8070
  backgroundBorderWidth: external_zod_namespaceObject.z.number().default(1).optional(),
7914
8071
  backgroundBorderRadius: external_zod_namespaceObject.z.number().default(4).optional(),
7915
- backgroundPadding: external_zod_namespaceObject.z.number().optional()
8072
+ backgroundPadding: external_zod_namespaceObject.z.number().optional(),
8073
+ offsetX: external_zod_namespaceObject.z.number().default(0),
8074
+ offsetY: external_zod_namespaceObject.z.number().default(0)
7916
8075
  });
7917
8076
  const zAnnotationHorizontalLine = external_zod_namespaceObject.z.object({
7918
8077
  selector: external_zod_namespaceObject.z.union([
@@ -7962,7 +8121,9 @@ const zAnnotationHorizontalLine = external_zod_namespaceObject.z.object({
7962
8121
  backgroundBorderColor: external_zod_namespaceObject.z.string().optional(),
7963
8122
  backgroundBorderWidth: external_zod_namespaceObject.z.number().default(1).optional(),
7964
8123
  backgroundBorderRadius: external_zod_namespaceObject.z.number().default(4).optional(),
7965
- backgroundPadding: external_zod_namespaceObject.z.number().optional()
8124
+ backgroundPadding: external_zod_namespaceObject.z.number().optional(),
8125
+ offsetX: external_zod_namespaceObject.z.number().default(0),
8126
+ offsetY: external_zod_namespaceObject.z.number().default(0)
7966
8127
  });
7967
8128
  const zAnnotationArea = external_zod_namespaceObject.z.object({
7968
8129
  selector: external_zod_namespaceObject.z.union([
@@ -8004,7 +8165,9 @@ const zAnnotationArea = external_zod_namespaceObject.z.object({
8004
8165
  areaBorderColor: external_zod_namespaceObject.z.number().optional(),
8005
8166
  areaBorderWidth: external_zod_namespaceObject.z.number().default(2).optional(),
8006
8167
  areaBorderRadius: external_zod_namespaceObject.z.number().default(4).optional(),
8007
- outerPadding: external_zod_namespaceObject.z.number().optional()
8168
+ outerPadding: external_zod_namespaceObject.z.number().optional(),
8169
+ offsetX: external_zod_namespaceObject.z.number().optional(),
8170
+ offsetY: external_zod_namespaceObject.z.number().optional()
8008
8171
  });
8009
8172
  const zAnnotation = external_zod_namespaceObject.z.object({
8010
8173
  annotationPoint: zAnnotationPoint.or(external_zod_namespaceObject.z.array(zAnnotationPoint)).optional(),
@@ -8012,7 +8175,7 @@ const zAnnotation = external_zod_namespaceObject.z.object({
8012
8175
  annotationHorizontalLine: zAnnotationHorizontalLine.or(external_zod_namespaceObject.z.array(zAnnotationHorizontalLine)).optional(),
8013
8176
  annotationArea: zAnnotationArea.or(external_zod_namespaceObject.z.array(zAnnotationArea)).optional()
8014
8177
  });
8015
- const zSortAxis = external_zod_namespaceObject.z.object({
8178
+ const zSort = external_zod_namespaceObject.z.object({
8016
8179
  order: external_zod_namespaceObject.z["enum"]([
8017
8180
  'asc',
8018
8181
  'desc'
@@ -8028,8 +8191,8 @@ const zSortLegend = external_zod_namespaceObject.z.object({
8028
8191
  orderBy: external_zod_namespaceObject.z.string().optional(),
8029
8192
  customOrder: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.any()).optional()
8030
8193
  });
8031
- const zAnalysis = external_zod_default().object({
8032
- orderMapping: external_zod_default().record(external_zod_default().string(), external_zod_default().array(external_zod_default().string())).optional()
8194
+ const zAnalysis = external_zod_namespaceObject.z.object({
8195
+ orderMapping: external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string())).optional()
8033
8196
  });
8034
8197
  const zLocale = external_zod_namespaceObject.z["enum"]([
8035
8198
  'zh-CN',
@@ -8066,7 +8229,7 @@ const zLine = external_zod_namespaceObject.z.object({
8066
8229
  xAxis: zXBandAxis.optional(),
8067
8230
  yAxis: zYLinearAxis.optional(),
8068
8231
  crosshairLine: zCrosshairLine.optional(),
8069
- sortAxis: zSortAxis.optional(),
8232
+ sort: zSort.optional(),
8070
8233
  sortLegend: zSortLegend.optional(),
8071
8234
  theme: zTheme.optional(),
8072
8235
  pointStyle: external_zod_namespaceObject.z.array(zPointStyle).or(zPointStyle).optional(),
@@ -8432,8 +8595,26 @@ exports.ORIGINAL_DATA = __webpack_exports__.ORIGINAL_DATA;
8432
8595
  exports.Separator = __webpack_exports__.Separator;
8433
8596
  exports.UnfoldDimensionGroup = __webpack_exports__.UnfoldDimensionGroup;
8434
8597
  exports.UnfoldDimensionGroupId = __webpack_exports__.UnfoldDimensionGroupId;
8598
+ exports.areaAdvancedPipeline = __webpack_exports__.areaAdvancedPipeline;
8599
+ exports.areaPercentAdvancedPipeline = __webpack_exports__.areaPercentAdvancedPipeline;
8600
+ exports.areaPercentSpecPipeline = __webpack_exports__.areaPercentSpecPipeline;
8601
+ exports.areaRangeAdvancedPipeline = __webpack_exports__.areaRangeAdvancedPipeline;
8602
+ exports.areaRangeSpecPipeline = __webpack_exports__.areaRangeSpecPipeline;
8603
+ exports.areaSpecPipeline = __webpack_exports__.areaSpecPipeline;
8435
8604
  exports.autoFormatter = __webpack_exports__.autoFormatter;
8436
8605
  exports.autoNumFormatter = __webpack_exports__.autoNumFormatter;
8606
+ exports.barAdvancedPipeline = __webpack_exports__.barAdvancedPipeline;
8607
+ exports.barParallelAdvancedPipeline = __webpack_exports__.barParallelAdvancedPipeline;
8608
+ exports.barParallelSpecPipeline = __webpack_exports__.barParallelSpecPipeline;
8609
+ exports.barPercentAdvancedPipeline = __webpack_exports__.barPercentAdvancedPipeline;
8610
+ exports.barPercentSpecPipeline = __webpack_exports__.barPercentSpecPipeline;
8611
+ exports.barSpecPipeline = __webpack_exports__.barSpecPipeline;
8612
+ exports.columnAdvancedPipeline = __webpack_exports__.columnAdvancedPipeline;
8613
+ exports.columnParallelAdvancedPipeline = __webpack_exports__.columnParallelAdvancedPipeline;
8614
+ exports.columnParallelSpecPipeline = __webpack_exports__.columnParallelSpecPipeline;
8615
+ exports.columnPercentAdvancedPipeline = __webpack_exports__.columnPercentAdvancedPipeline;
8616
+ exports.columnPercentSpecPipeline = __webpack_exports__.columnPercentSpecPipeline;
8617
+ exports.columnSpecPipeline = __webpack_exports__.columnSpecPipeline;
8437
8618
  exports.createFormatter = __webpack_exports__.createFormatter;
8438
8619
  exports.createNumFormatter = __webpack_exports__.createNumFormatter;
8439
8620
  exports.darkTheme = __webpack_exports__.darkTheme;
@@ -8442,6 +8623,8 @@ exports.dataReshapeFor1D1M = __webpack_exports__.dataReshapeFor1D1M;
8442
8623
  exports.dataReshapeFor1D2M = __webpack_exports__.dataReshapeFor1D2M;
8443
8624
  exports.dataReshapeFor2D1M = __webpack_exports__.dataReshapeFor2D1M;
8444
8625
  exports.dataReshapeFor2D1M0Name = __webpack_exports__.dataReshapeFor2D1M0Name;
8626
+ exports.donutAdvancedPipeline = __webpack_exports__.donutAdvancedPipeline;
8627
+ exports.donutSpecPipeline = __webpack_exports__.donutSpecPipeline;
8445
8628
  exports.execPipeline = __webpack_exports__.execPipeline;
8446
8629
  exports.findAllDimensions = __webpack_exports__.findAllDimensions;
8447
8630
  exports.findAllMeasures = __webpack_exports__.findAllMeasures;
@@ -8450,6 +8633,10 @@ exports.findFirstDimension = __webpack_exports__.findFirstDimension;
8450
8633
  exports.findFirstMeasure = __webpack_exports__.findFirstMeasure;
8451
8634
  exports.findMeasureById = __webpack_exports__.findMeasureById;
8452
8635
  exports.foldMeasures = __webpack_exports__.foldMeasures;
8636
+ exports.funnelAdvancedPipeline = __webpack_exports__.funnelAdvancedPipeline;
8637
+ exports.funnelSpecPipeline = __webpack_exports__.funnelSpecPipeline;
8638
+ exports.heatmapAdvancedPipeline = __webpack_exports__.heatmapAdvancedPipeline;
8639
+ exports.heatmapSpecPipeline = __webpack_exports__.heatmapSpecPipeline;
8453
8640
  exports.i18n = __webpack_exports__.i18n;
8454
8641
  exports.intl = __webpack_exports__.intl;
8455
8642
  exports.isDimensionSelector = __webpack_exports__.isDimensionSelector;
@@ -8462,7 +8649,15 @@ exports.isVChart = __webpack_exports__.isVChart;
8462
8649
  exports.isVTable = __webpack_exports__.isVTable;
8463
8650
  exports.isValueSelector = __webpack_exports__.isValueSelector;
8464
8651
  exports.lightTheme = __webpack_exports__.lightTheme;
8652
+ exports.lineAdvancedPipeline = __webpack_exports__.lineAdvancedPipeline;
8653
+ exports.lineSpecPipeline = __webpack_exports__.lineSpecPipeline;
8654
+ exports.pieAdvancedPipeline = __webpack_exports__.pieAdvancedPipeline;
8655
+ exports.pieSpecPipeline = __webpack_exports__.pieSpecPipeline;
8656
+ exports.pivotTableAdvancedPipeline = __webpack_exports__.pivotTableAdvancedPipeline;
8657
+ exports.pivotTableSpecPipeline = __webpack_exports__.pivotTableSpecPipeline;
8465
8658
  exports.preorderTraverse = __webpack_exports__.preorderTraverse;
8659
+ exports.radarAdvancedPipeline = __webpack_exports__.radarAdvancedPipeline;
8660
+ exports.radarSpecPipeline = __webpack_exports__.radarSpecPipeline;
8466
8661
  exports.registerAll = __webpack_exports__.registerAll;
8467
8662
  exports.registerArea = __webpack_exports__.registerArea;
8468
8663
  exports.registerAreaPercent = __webpack_exports__.registerAreaPercent;
@@ -8487,8 +8682,18 @@ exports.registerRose = __webpack_exports__.registerRose;
8487
8682
  exports.registerRoseParallel = __webpack_exports__.registerRoseParallel;
8488
8683
  exports.registerScatter = __webpack_exports__.registerScatter;
8489
8684
  exports.registerTable = __webpack_exports__.registerTable;
8685
+ exports.roseAdvancedPipeline = __webpack_exports__.roseAdvancedPipeline;
8686
+ exports.roseParallelAdvancedPipeline = __webpack_exports__.roseParallelAdvancedPipeline;
8687
+ exports.roseParallelSpecPipeline = __webpack_exports__.roseParallelSpecPipeline;
8688
+ exports.roseSpecPipeline = __webpack_exports__.roseSpecPipeline;
8689
+ exports.scatterAdvancedPipeline = __webpack_exports__.scatterAdvancedPipeline;
8690
+ exports.scatterSpecPipeline = __webpack_exports__.scatterSpecPipeline;
8490
8691
  exports.selector = __webpack_exports__.selector;
8692
+ exports.tableAdvancedPipeline = __webpack_exports__.tableAdvancedPipeline;
8693
+ exports.tableSpecPipeline = __webpack_exports__.tableSpecPipeline;
8491
8694
  exports.unfoldDimensions = __webpack_exports__.unfoldDimensions;
8695
+ exports.updateAdvanced = __webpack_exports__.updateAdvanced;
8696
+ exports.updateSpec = __webpack_exports__.updateSpec;
8492
8697
  exports.zAdvancedVSeed = __webpack_exports__.zAdvancedVSeed;
8493
8698
  exports.zAnalysis = __webpack_exports__.zAnalysis;
8494
8699
  exports.zAnnotation = __webpack_exports__.zAnnotation;
@@ -8568,7 +8773,7 @@ exports.zRoseParallel = __webpack_exports__.zRoseParallel;
8568
8773
  exports.zRoseParallelConfig = __webpack_exports__.zRoseParallelConfig;
8569
8774
  exports.zScatter = __webpack_exports__.zScatter;
8570
8775
  exports.zScatterConfig = __webpack_exports__.zScatterConfig;
8571
- exports.zSortAxis = __webpack_exports__.zSortAxis;
8776
+ exports.zSort = __webpack_exports__.zSort;
8572
8777
  exports.zSortLegend = __webpack_exports__.zSortLegend;
8573
8778
  exports.zStackCornerRadius = __webpack_exports__.zStackCornerRadius;
8574
8779
  exports.zTable = __webpack_exports__.zTable;
@@ -8590,8 +8795,26 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
8590
8795
  "Separator",
8591
8796
  "UnfoldDimensionGroup",
8592
8797
  "UnfoldDimensionGroupId",
8798
+ "areaAdvancedPipeline",
8799
+ "areaPercentAdvancedPipeline",
8800
+ "areaPercentSpecPipeline",
8801
+ "areaRangeAdvancedPipeline",
8802
+ "areaRangeSpecPipeline",
8803
+ "areaSpecPipeline",
8593
8804
  "autoFormatter",
8594
8805
  "autoNumFormatter",
8806
+ "barAdvancedPipeline",
8807
+ "barParallelAdvancedPipeline",
8808
+ "barParallelSpecPipeline",
8809
+ "barPercentAdvancedPipeline",
8810
+ "barPercentSpecPipeline",
8811
+ "barSpecPipeline",
8812
+ "columnAdvancedPipeline",
8813
+ "columnParallelAdvancedPipeline",
8814
+ "columnParallelSpecPipeline",
8815
+ "columnPercentAdvancedPipeline",
8816
+ "columnPercentSpecPipeline",
8817
+ "columnSpecPipeline",
8595
8818
  "createFormatter",
8596
8819
  "createNumFormatter",
8597
8820
  "darkTheme",
@@ -8600,6 +8823,8 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
8600
8823
  "dataReshapeFor1D2M",
8601
8824
  "dataReshapeFor2D1M",
8602
8825
  "dataReshapeFor2D1M0Name",
8826
+ "donutAdvancedPipeline",
8827
+ "donutSpecPipeline",
8603
8828
  "execPipeline",
8604
8829
  "findAllDimensions",
8605
8830
  "findAllMeasures",
@@ -8608,6 +8833,10 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
8608
8833
  "findFirstMeasure",
8609
8834
  "findMeasureById",
8610
8835
  "foldMeasures",
8836
+ "funnelAdvancedPipeline",
8837
+ "funnelSpecPipeline",
8838
+ "heatmapAdvancedPipeline",
8839
+ "heatmapSpecPipeline",
8611
8840
  "i18n",
8612
8841
  "intl",
8613
8842
  "isDimensionSelector",
@@ -8620,7 +8849,15 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
8620
8849
  "isVTable",
8621
8850
  "isValueSelector",
8622
8851
  "lightTheme",
8852
+ "lineAdvancedPipeline",
8853
+ "lineSpecPipeline",
8854
+ "pieAdvancedPipeline",
8855
+ "pieSpecPipeline",
8856
+ "pivotTableAdvancedPipeline",
8857
+ "pivotTableSpecPipeline",
8623
8858
  "preorderTraverse",
8859
+ "radarAdvancedPipeline",
8860
+ "radarSpecPipeline",
8624
8861
  "registerAll",
8625
8862
  "registerArea",
8626
8863
  "registerAreaPercent",
@@ -8645,8 +8882,18 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
8645
8882
  "registerRoseParallel",
8646
8883
  "registerScatter",
8647
8884
  "registerTable",
8885
+ "roseAdvancedPipeline",
8886
+ "roseParallelAdvancedPipeline",
8887
+ "roseParallelSpecPipeline",
8888
+ "roseSpecPipeline",
8889
+ "scatterAdvancedPipeline",
8890
+ "scatterSpecPipeline",
8648
8891
  "selector",
8892
+ "tableAdvancedPipeline",
8893
+ "tableSpecPipeline",
8649
8894
  "unfoldDimensions",
8895
+ "updateAdvanced",
8896
+ "updateSpec",
8650
8897
  "zAdvancedVSeed",
8651
8898
  "zAnalysis",
8652
8899
  "zAnnotation",
@@ -8726,7 +8973,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
8726
8973
  "zRoseParallelConfig",
8727
8974
  "zScatter",
8728
8975
  "zScatterConfig",
8729
- "zSortAxis",
8976
+ "zSort",
8730
8977
  "zSortLegend",
8731
8978
  "zStackCornerRadius",
8732
8979
  "zTable",