@visactor/vchart 2.0.7-alpha.4 → 2.0.7-alpha.6

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 (70) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +195 -12
  3. package/build/index.js +196 -11
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/chart/box-plot/box-plot.js +3 -2
  7. package/cjs/chart/box-plot/box-plot.js.map +1 -1
  8. package/cjs/component/crosshair/base.d.ts +1 -1
  9. package/cjs/component/crosshair/base.js +10 -6
  10. package/cjs/component/crosshair/base.js.map +1 -1
  11. package/cjs/component/geo/geo-coordinate.js.map +1 -1
  12. package/cjs/component/legend/discrete/util.js +5 -1
  13. package/cjs/component/legend/discrete/util.js.map +1 -1
  14. package/cjs/core/index.d.ts +1 -1
  15. package/cjs/core/index.js +1 -1
  16. package/cjs/core/index.js.map +1 -1
  17. package/cjs/core/vchart.js +2 -1
  18. package/cjs/core/vchart.js.map +1 -1
  19. package/cjs/layout/base-layout.d.ts +2 -2
  20. package/cjs/layout/base-layout.js +12 -7
  21. package/cjs/layout/base-layout.js.map +1 -1
  22. package/cjs/layout/interface.d.ts +1 -0
  23. package/cjs/layout/interface.js.map +1 -1
  24. package/cjs/plugin/chart/index.d.ts +1 -0
  25. package/cjs/plugin/chart/index.js +2 -1
  26. package/cjs/plugin/chart/index.js.map +1 -1
  27. package/cjs/plugin/chart/interface.d.ts +2 -0
  28. package/cjs/plugin/chart/interface.js.map +1 -1
  29. package/cjs/plugin/chart/plugin-service.d.ts +1 -0
  30. package/cjs/plugin/chart/plugin-service.js +5 -0
  31. package/cjs/plugin/chart/plugin-service.js.map +1 -1
  32. package/cjs/plugin/chart/resize-zoom/index.d.ts +1 -0
  33. package/cjs/plugin/chart/resize-zoom/index.js +21 -0
  34. package/cjs/plugin/chart/resize-zoom/index.js.map +1 -0
  35. package/cjs/plugin/chart/resize-zoom/zoom.d.ts +21 -0
  36. package/cjs/plugin/chart/resize-zoom/zoom.js +62 -0
  37. package/cjs/plugin/chart/resize-zoom/zoom.js.map +1 -0
  38. package/esm/chart/box-plot/box-plot.js +4 -1
  39. package/esm/chart/box-plot/box-plot.js.map +1 -1
  40. package/esm/component/crosshair/base.d.ts +1 -1
  41. package/esm/component/crosshair/base.js +10 -6
  42. package/esm/component/crosshair/base.js.map +1 -1
  43. package/esm/component/geo/geo-coordinate.js.map +1 -1
  44. package/esm/component/legend/discrete/util.js +5 -2
  45. package/esm/component/legend/discrete/util.js.map +1 -1
  46. package/esm/core/index.d.ts +1 -1
  47. package/esm/core/index.js +1 -1
  48. package/esm/core/index.js.map +1 -1
  49. package/esm/core/vchart.js +2 -1
  50. package/esm/core/vchart.js.map +1 -1
  51. package/esm/layout/base-layout.d.ts +2 -2
  52. package/esm/layout/base-layout.js +12 -7
  53. package/esm/layout/base-layout.js.map +1 -1
  54. package/esm/layout/interface.d.ts +1 -0
  55. package/esm/layout/interface.js.map +1 -1
  56. package/esm/plugin/chart/index.d.ts +1 -0
  57. package/esm/plugin/chart/index.js +2 -0
  58. package/esm/plugin/chart/index.js.map +1 -1
  59. package/esm/plugin/chart/interface.d.ts +2 -0
  60. package/esm/plugin/chart/interface.js.map +1 -1
  61. package/esm/plugin/chart/plugin-service.d.ts +1 -0
  62. package/esm/plugin/chart/plugin-service.js +5 -0
  63. package/esm/plugin/chart/plugin-service.js.map +1 -1
  64. package/esm/plugin/chart/resize-zoom/index.d.ts +1 -0
  65. package/esm/plugin/chart/resize-zoom/index.js +2 -0
  66. package/esm/plugin/chart/resize-zoom/index.js.map +1 -0
  67. package/esm/plugin/chart/resize-zoom/zoom.d.ts +21 -0
  68. package/esm/plugin/chart/resize-zoom/zoom.js +59 -0
  69. package/esm/plugin/chart/resize-zoom/zoom.js.map +1 -0
  70. package/package.json +5 -5
package/build/index.js CHANGED
@@ -6171,6 +6171,87 @@
6171
6171
  return out;
6172
6172
  };
6173
6173
 
6174
+ const boxplot = (data, options) => {
6175
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
6176
+ const field = null == options ? void 0 : options.field;
6177
+ if (!field) return [];
6178
+ const groupField = null == options ? void 0 : options.groupField;
6179
+ let whiskers = null !== (_a = null == options ? void 0 : options.whiskers) && void 0 !== _a ? _a : 1.5;
6180
+ const includeValues = !!(null == options ? void 0 : options.includeValues),
6181
+ names = null !== (_b = null == options ? void 0 : options.outputNames) && void 0 !== _b ? _b : {},
6182
+ keyName = null !== (_c = names.key) && void 0 !== _c ? _c : isArray$1(groupField) ? null : null !== (_d = groupField) && void 0 !== _d ? _d : "key",
6183
+ countName = null !== (_e = names.count) && void 0 !== _e ? _e : "count",
6184
+ meanName = null !== (_f = names.mean) && void 0 !== _f ? _f : "mean",
6185
+ q1Name = null !== (_g = names.q1) && void 0 !== _g ? _g : "q1",
6186
+ medianName = null !== (_h = names.median) && void 0 !== _h ? _h : "median",
6187
+ q3Name = null !== (_j = names.q3) && void 0 !== _j ? _j : "q3",
6188
+ iqrName = null !== (_k = names.iqr) && void 0 !== _k ? _k : "iqr",
6189
+ minName = null !== (_l = names.min) && void 0 !== _l ? _l : "min",
6190
+ maxName = null !== (_m = names.max) && void 0 !== _m ? _m : "max",
6191
+ lowerWhiskerName = null !== (_o = names.lowerWhisker) && void 0 !== _o ? _o : "lowerWhisker",
6192
+ upperWhiskerName = null !== (_p = names.upperWhisker) && void 0 !== _p ? _p : "upperWhisker",
6193
+ outliersName = null !== (_q = names.outliers) && void 0 !== _q ? _q : "outliers",
6194
+ valuesName = null !== (_r = names.values) && void 0 !== _r ? _r : "values",
6195
+ groups = new Map(),
6196
+ rawValues = new Map(),
6197
+ keyToGroup = new Map(),
6198
+ n = data.length;
6199
+ for (let i = 0; i < n; i++) {
6200
+ const d = data[i],
6201
+ v = d[field];
6202
+ if (isNil$1(v)) continue;
6203
+ const num = +v;
6204
+ if (!Number.isFinite(num)) continue;
6205
+ let key;
6206
+ key = isArray$1(groupField) ? groupField.map(f => String(d[f])).join("||") : groupField ? String(d[groupField]) : "___all", groups.has(key) || (groups.set(key, []), includeValues && rawValues.set(key, []), isArray$1(groupField) ? keyToGroup.set(key, Object.fromEntries(groupField.map(f => [f, d[f]]))) : keyToGroup.set(key, groupField ? d[groupField] : null));
6207
+ const arr = groups.get(key);
6208
+ if (arr && arr.push(num), includeValues) {
6209
+ const rv = rawValues.get(key);
6210
+ rv && rv.push(d);
6211
+ }
6212
+ }
6213
+ if (isArray$1(whiskers)) {
6214
+ whiskers = [clamp$1(Math.min.apply(null, whiskers), 0, 1), clamp$1(Math.max.apply(null, whiskers), 0, 1)];
6215
+ }
6216
+ const out = [];
6217
+ for (const [key, vals] of groups) {
6218
+ if (!vals || 0 === vals.length) continue;
6219
+ const sorted = vals.slice().sort((a, b) => a - b),
6220
+ count = sorted.length,
6221
+ dataMin = sorted[0],
6222
+ dataMax = sorted[sorted.length - 1];
6223
+ let sum = 0;
6224
+ for (let i = 0; i < sorted.length; i++) sum += sorted[i];
6225
+ const mean = sum / count,
6226
+ q1 = quantileSorted(sorted, .25),
6227
+ median = quantileSorted(sorted, .5),
6228
+ q3 = quantileSorted(sorted, .75),
6229
+ iqr = q3 - q1,
6230
+ lowerBound = isArray$1(whiskers) ? quantileSorted(sorted, whiskers[0]) : q1 - whiskers * iqr,
6231
+ upperBound = isArray$1(whiskers) ? quantileSorted(sorted, whiskers[1]) : q3 + whiskers * iqr;
6232
+ let lowerWhisker = dataMin;
6233
+ for (let i = 0; i < sorted.length; i++) if (sorted[i] >= lowerBound) {
6234
+ lowerWhisker = sorted[i];
6235
+ break;
6236
+ }
6237
+ let upperWhisker = dataMax;
6238
+ for (let i = sorted.length - 1; i >= 0; i--) if (sorted[i] <= upperBound) {
6239
+ upperWhisker = sorted[i];
6240
+ break;
6241
+ }
6242
+ const outliers = [];
6243
+ for (let i = 0; i < sorted.length; i++) (sorted[i] < lowerWhisker || sorted[i] > upperWhisker) && outliers.push(sorted[i]);
6244
+ const obj = {},
6245
+ representative = keyToGroup.get(key);
6246
+ if (null !== keyName) obj[keyName] = representative;else if (isArray$1(groupField)) {
6247
+ const groupObj = representative || {};
6248
+ for (const f of groupField) obj[f] = groupObj[f];
6249
+ }
6250
+ 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);
6251
+ }
6252
+ return out;
6253
+ };
6254
+
6174
6255
  var EOL = {},
6175
6256
  EOF = {},
6176
6257
  QUOTE = 34,
@@ -54183,11 +54264,13 @@
54183
54264
  };
54184
54265
  }
54185
54266
  layoutItems(_chart, items, chartLayoutRect, chartViewBox) {
54267
+ var _a, _b, _c;
54186
54268
  this._layoutInit(_chart, items, chartLayoutRect, chartViewBox);
54187
54269
  const recompute = {
54188
54270
  recomputeWidth: this.recomputeWidth,
54189
54271
  recomputeHeight: this.recomputeHeight
54190
54272
  };
54273
+ const secondLayoutLeftRight = (_c = (_b = (_a = _chart === null || _chart === void 0 ? void 0 : _chart.getSpec()) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.secondLayoutLeftRight) !== null && _c !== void 0 ? _c : false;
54191
54274
  this._layoutNormalItems(items, recompute);
54192
54275
  const layoutTemp = {
54193
54276
  left: this.leftCurrent,
@@ -54196,8 +54279,8 @@
54196
54279
  bottom: this.bottomCurrent
54197
54280
  };
54198
54281
  const { regionItems, relativeItems, relativeOverlapItems, allRelatives, overlapItems } = this._groupItems(items);
54199
- this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems, recompute);
54200
- this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp, recompute);
54282
+ this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems, recompute, secondLayoutLeftRight);
54283
+ this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp, recompute, secondLayoutLeftRight);
54201
54284
  this.layoutAbsoluteItems(items.filter(x => x.layoutType === 'absolute'));
54202
54285
  items.forEach(item => {
54203
54286
  item.clearWillLayoutTag();
@@ -54209,7 +54292,7 @@
54209
54292
  top: { items: [], rect: { width: 0, height: 0 } },
54210
54293
  bottom: { items: [], rect: { width: 0, height: 0 } },
54211
54294
  z: { items: [], rect: { width: 0, height: 0 } }
54212
- }, allRelatives, layoutTemp, recompute) {
54295
+ }, allRelatives, layoutTemp, recompute, secondLayoutLeftRight = false) {
54213
54296
  if (allRelatives.some(i => i.autoIndent)) {
54214
54297
  const { top, bottom, left, right } = this._checkAutoIndent(allRelatives, layoutTemp);
54215
54298
  if (top || bottom || left || right) {
@@ -54217,7 +54300,7 @@
54217
54300
  this.bottomCurrent = layoutTemp.bottom - bottom;
54218
54301
  this.leftCurrent = layoutTemp.left + left;
54219
54302
  this.rightCurrent = layoutTemp.right - right;
54220
- this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems, recompute);
54303
+ this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems, recompute, secondLayoutLeftRight);
54221
54304
  }
54222
54305
  }
54223
54306
  }
@@ -54370,7 +54453,9 @@
54370
54453
  top: { items: [], rect: { width: 0, height: 0 } },
54371
54454
  bottom: { items: [], rect: { width: 0, height: 0 } },
54372
54455
  z: { items: [], rect: { width: 0, height: 0 } }
54373
- }, recompute) {
54456
+ }, recompute, secondLayoutLeftRight = false) {
54457
+ const leftBeforeLayout = this.leftCurrent;
54458
+ const rightBeforeLayout = this.rightCurrent;
54374
54459
  let regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
54375
54460
  let regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
54376
54461
  regionRelativeItems
@@ -54389,6 +54474,16 @@
54389
54474
  this._layoutRelativeOverlap('top', overlapItems.top, recompute);
54390
54475
  this._layoutRelativeOverlap('bottom', overlapItems.bottom, recompute);
54391
54476
  regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
54477
+ if (secondLayoutLeftRight) {
54478
+ this.leftCurrent = leftBeforeLayout;
54479
+ this.rightCurrent = rightBeforeLayout;
54480
+ regionRelativeItems
54481
+ .filter(x => x.layoutOrient === 'left' || x.layoutOrient === 'right')
54482
+ .forEach(item => {
54483
+ this._layoutRelativeItem(item, recompute);
54484
+ });
54485
+ regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
54486
+ }
54392
54487
  const { regionWidth, regionHeight } = this._layoutRegionItem(regionItems, regionRelativeTotalWidth, regionRelativeTotalHeight);
54393
54488
  regionRelativeItems.concat(regionRelativeOverlapItems).forEach(item => {
54394
54489
  if (['left', 'right'].includes(item.layoutOrient)) {
@@ -56702,6 +56797,11 @@
56702
56797
  plugin.onBeforeInitChart && plugin.onBeforeInitChart(this, chartSpec, actionSource);
56703
56798
  });
56704
56799
  }
56800
+ onAfterInitChart(chartSpec, actionSource) {
56801
+ this._plugins.forEach(plugin => {
56802
+ plugin.onAfterInitChart && plugin.onAfterInitChart(this, chartSpec, actionSource);
56803
+ });
56804
+ }
56705
56805
  releaseAll() {
56706
56806
  super.releaseAll();
56707
56807
  this.globalInstance = null;
@@ -57789,6 +57889,7 @@
57789
57889
  if (!this._chart || !this._compiler) {
57790
57890
  return false;
57791
57891
  }
57892
+ this._chartPluginApply('onAfterInitChart', this._spec, actionSource);
57792
57893
  (_f = (_e = this._option.performanceHook) === null || _e === void 0 ? void 0 : _e.beforeCompileToVGrammar) === null || _f === void 0 ? void 0 : _f.call(_e, this);
57793
57894
  this._compiler.compile({ chart: this._chart, vChart: this }, option);
57794
57895
  (_h = (_g = this._option.performanceHook) === null || _g === void 0 ? void 0 : _g.afterCompileToVGrammar) === null || _h === void 0 ? void 0 : _h.call(_g, this);
@@ -58771,7 +58872,7 @@
58771
58872
  });
58772
58873
  };
58773
58874
 
58774
- const version = "2.0.7-alpha.4";
58875
+ const version = "2.0.7-alpha.6";
58775
58876
 
58776
58877
  const addVChartProperty = (data, op) => {
58777
58878
  const context = op.beforeCall();
@@ -90028,6 +90129,7 @@
90028
90129
  registerDimensionEvents();
90029
90130
  registerDimensionHover();
90030
90131
  registerBoxplotSeries();
90132
+ Factory.registerTransform('boxplot', boxplot);
90031
90133
  Factory.registerChart(BoxPlotChart.type, BoxPlotChart);
90032
90134
  };
90033
90135
 
@@ -90262,7 +90364,12 @@
90262
90364
  }
90263
90365
 
90264
90366
  function getLegendAttributes(spec, rect) {
90265
- const { title = {}, item = {}, pager = {}, background = {}, type, id, visible, orient, position, data, filter, regionId, regionIndex, seriesIndex, seriesId, padding } = spec, restSpec = __rest$e(spec, ["title", "item", "pager", "background", "type", "id", "visible", "orient", "position", "data", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding"]);
90367
+ const restSpec = __rest$e(spec, ["title", "item", "pager", "background", "type", "id", "visible", "orient", "position", "data", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding"]);
90368
+ let { title = {}, item = {}, pager = {}, background = {} } = spec;
90369
+ title = cloneDeep(title);
90370
+ item = cloneDeep(item);
90371
+ pager = cloneDeep(pager);
90372
+ background = cloneDeep(background);
90266
90373
  const attrs = restSpec;
90267
90374
  if (title.visible) {
90268
90375
  attrs.title = transformLegendTitleAttributes(title);
@@ -92262,7 +92369,7 @@
92262
92369
  return;
92263
92370
  }
92264
92371
  this.clearOutEvent();
92265
- this.hide();
92372
+ this.hideCrosshair();
92266
92373
  };
92267
92374
  this._handleTooltipShow = (params) => {
92268
92375
  const tooltipData = params.tooltipData;
@@ -92284,7 +92391,7 @@
92284
92391
  };
92285
92392
  this._handleTooltipHideOrRelease = () => {
92286
92393
  this.clearOutEvent();
92287
- this.hide();
92394
+ this.hideCrosshair();
92288
92395
  };
92289
92396
  this.enable = true;
92290
92397
  this.showDefault = true;
@@ -92352,17 +92459,20 @@
92352
92459
  return this._limitBounds;
92353
92460
  }
92354
92461
  _showDefaultCrosshairBySpec() {
92462
+ let hasDefaultCrosshair = false;
92355
92463
  Object.keys(this._stateByField).forEach(field => {
92356
92464
  const fieldSpec = this._spec[field];
92357
92465
  if (fieldSpec && fieldSpec.visible && fieldSpec.defaultSelect) {
92358
92466
  const { axisIndex = 0, datum } = fieldSpec.defaultSelect;
92359
92467
  const axis = this._option.getComponentsByKey('axes').find(c => c.getSpecIndex() === axisIndex);
92360
92468
  if (axis) {
92469
+ hasDefaultCrosshair = true;
92361
92470
  this._stateByField[field].currentValue.clear();
92362
92471
  this._stateByField[field].currentValue.set(axisIndex, { axis, datum });
92363
92472
  }
92364
92473
  }
92365
92474
  });
92475
+ return hasDefaultCrosshair;
92366
92476
  }
92367
92477
  _updateVisibleCrosshair() {
92368
92478
  let hasVisible = false;
@@ -92381,8 +92491,8 @@
92381
92491
  }
92382
92492
  _showDefaultCrosshair() {
92383
92493
  if (this.showDefault) {
92384
- this._showDefaultCrosshairBySpec();
92385
- this.layoutByValue(false);
92494
+ const hasDefault = this._showDefaultCrosshairBySpec();
92495
+ hasDefault && this.layoutByValue(false);
92386
92496
  }
92387
92497
  else {
92388
92498
  this._updateVisibleCrosshair();
@@ -101916,6 +102026,79 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
101916
102026
  registerChartPlugin(MediaQuery);
101917
102027
  };
101918
102028
 
102029
+ const MIN_ZOOM = 0.1;
102030
+ const MAX_ZOOM = 10;
102031
+ class ChartResizeZoomPlugin extends BasePlugin {
102032
+ constructor() {
102033
+ super(ChartResizeZoomPlugin.type);
102034
+ this.type = 'ChartResizeZoomPlugin';
102035
+ this._zoom = 1;
102036
+ this._onWheel = (e) => {
102037
+ e.preventDefault();
102038
+ e.stopImmediatePropagation();
102039
+ const zoom = Math.pow(1.005, -e.deltaY * Math.pow(16, e.deltaMode) * 0.2 * this._rate);
102040
+ const center = { x: e.offsetX, y: e.offsetY };
102041
+ this.zoom(zoom, center);
102042
+ };
102043
+ }
102044
+ onAfterInitChart(service, chartSpec) {
102045
+ var _a, _b, _c, _d, _e;
102046
+ const chart = service.globalInstance;
102047
+ const spec = (_b = (_a = chart.getSpec()) === null || _a === void 0 ? void 0 : _a[ChartResizeZoomPlugin.specKey]) !== null && _b !== void 0 ? _b : { enabled: false };
102048
+ if (spec.enabled !== true) {
102049
+ return;
102050
+ }
102051
+ this._minZoom = (_c = spec.min) !== null && _c !== void 0 ? _c : MIN_ZOOM;
102052
+ this._maxZoom = (_d = spec.max) !== null && _d !== void 0 ? _d : MAX_ZOOM;
102053
+ this._rate = (_e = spec.rate) !== null && _e !== void 0 ? _e : 0.1;
102054
+ this._container = chart.getContainer();
102055
+ this._triggerEvent = getDefaultTriggerEventByMode(service.globalInstance.getChart().getOption().mode).zoom;
102056
+ if (this._container && this._triggerEvent) {
102057
+ this._container.addEventListener(this._triggerEvent, this._onWheel);
102058
+ }
102059
+ }
102060
+ zoom(zoom, pointerPos) {
102061
+ const vchart = this.service.globalInstance;
102062
+ if (!vchart) {
102063
+ return;
102064
+ }
102065
+ const oldZoom = this._zoom;
102066
+ let tempZoom = this._zoom * zoom;
102067
+ if ((tempZoom <= this._minZoom && zoom < 1) || (tempZoom >= this._maxZoom && zoom > 1)) {
102068
+ if (tempZoom <= this._minZoom && this._zoom > this._minZoom) {
102069
+ tempZoom = this._minZoom;
102070
+ }
102071
+ else if (tempZoom >= this._maxZoom && this._zoom < this._maxZoom) {
102072
+ tempZoom = this._maxZoom;
102073
+ }
102074
+ else {
102075
+ return;
102076
+ }
102077
+ }
102078
+ if (tempZoom === oldZoom) {
102079
+ return;
102080
+ }
102081
+ const actualZoomRatio = tempZoom / oldZoom;
102082
+ this._zoom = tempZoom;
102083
+ vchart.resize(vchart.getCurrentSize().width * this._zoom, vchart.getCurrentSize().height * this._zoom);
102084
+ if (pointerPos && this._container) {
102085
+ const { scrollLeft, scrollTop } = this._container;
102086
+ this._container.scrollLeft = scrollLeft + pointerPos.x * (actualZoomRatio - 1);
102087
+ this._container.scrollTop = scrollTop + pointerPos.y * (actualZoomRatio - 1);
102088
+ }
102089
+ }
102090
+ release() {
102091
+ if (this._container && this._triggerEvent) {
102092
+ this._container.removeEventListener(this._triggerEvent, this._onWheel);
102093
+ }
102094
+ }
102095
+ }
102096
+ ChartResizeZoomPlugin.specKey = 'resizeZoom';
102097
+ ChartResizeZoomPlugin.type = 'ChartResizeZoomPlugin';
102098
+ const registerChartResizeZoomPlugin = () => {
102099
+ registerChartPlugin(ChartResizeZoomPlugin);
102100
+ };
102101
+
101919
102102
  function registerStateTransition() {
101920
102103
  const animationTransitionRegistry = AnimationTransitionRegistry.getInstance();
101921
102104
  animationTransitionRegistry.registerTransition('update', '*', () => ({
@@ -102345,6 +102528,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
102345
102528
  exports.CartesianSeries = CartesianSeries;
102346
102529
  exports.CartesianSymlogAxis = CartesianSymlogAxis;
102347
102530
  exports.CartesianTimeAxis = CartesianTimeAxis;
102531
+ exports.ChartResizeZoomPlugin = ChartResizeZoomPlugin;
102348
102532
  exports.CirclePackingChart = CirclePackingChart;
102349
102533
  exports.CirclePackingSeries = CirclePackingSeries;
102350
102534
  exports.CircularProgressChart = CircularProgressChart;
@@ -102596,6 +102780,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
102596
102780
  exports.registerCartesianSymlogAxis = registerCartesianSymlogAxis;
102597
102781
  exports.registerCartesianTimeAxis = registerCartesianTimeAxis;
102598
102782
  exports.registerChartPlugin = registerChartPlugin;
102783
+ exports.registerChartResizeZoomPlugin = registerChartResizeZoomPlugin;
102599
102784
  exports.registerCirclePackingChart = registerCirclePackingChart;
102600
102785
  exports.registerCirclePackingSeries = registerCirclePackingSeries;
102601
102786
  exports.registerCircularProgressChart = registerCircularProgressChart;