@visactor/vchart 2.0.22-alpha.4 → 2.0.22

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 (46) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +95 -30
  3. package/build/index.js +95 -30
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/component/interface/theme.d.ts +2 -2
  7. package/cjs/component/interface/theme.js.map +1 -1
  8. package/cjs/component/tooltip/tooltip-transformer.js +11 -9
  9. package/cjs/component/tooltip/tooltip-transformer.js.map +1 -1
  10. package/cjs/core/index.d.ts +1 -1
  11. package/cjs/core/index.js +2 -2
  12. package/cjs/core/index.js.map +1 -1
  13. package/cjs/core/instance-manager.js +1 -1
  14. package/cjs/core/vchart.js +4 -3
  15. package/cjs/core/vchart.js.map +1 -1
  16. package/cjs/data/initialize.js +1 -1
  17. package/cjs/data/register.js +1 -1
  18. package/cjs/series/bar/bar.js +14 -9
  19. package/cjs/series/bar/bar.js.map +1 -1
  20. package/cjs/series/map/map.js +18 -6
  21. package/cjs/series/map/map.js.map +1 -1
  22. package/cjs/series/sankey/tooltip-helper.js +1 -1
  23. package/cjs/series/sankey/tooltip-helper.js.map +1 -1
  24. package/cjs/series/scatter/scatter.js +9 -3
  25. package/cjs/series/scatter/scatter.js.map +1 -1
  26. package/esm/component/interface/theme.d.ts +2 -2
  27. package/esm/component/interface/theme.js.map +1 -1
  28. package/esm/component/tooltip/tooltip-transformer.js +11 -8
  29. package/esm/component/tooltip/tooltip-transformer.js.map +1 -1
  30. package/esm/core/index.d.ts +1 -1
  31. package/esm/core/index.js +2 -2
  32. package/esm/core/index.js.map +1 -1
  33. package/esm/core/instance-manager.js +1 -1
  34. package/esm/core/vchart.js +4 -3
  35. package/esm/core/vchart.js.map +1 -1
  36. package/esm/data/initialize.js +1 -1
  37. package/esm/data/register.js +1 -1
  38. package/esm/series/bar/bar.js +14 -8
  39. package/esm/series/bar/bar.js.map +1 -1
  40. package/esm/series/map/map.js +18 -6
  41. package/esm/series/map/map.js.map +1 -1
  42. package/esm/series/sankey/tooltip-helper.js +2 -2
  43. package/esm/series/sankey/tooltip-helper.js.map +1 -1
  44. package/esm/series/scatter/scatter.js +10 -4
  45. package/esm/series/scatter/scatter.js.map +1 -1
  46. package/package.json +4 -4
package/build/index.es.js CHANGED
@@ -60939,7 +60939,7 @@ class VChart {
60939
60939
  this._compiler.updateLayoutTag();
60940
60940
  this._setFontFamilyTheme(this.getTheme('fontFamily'));
60941
60941
  this._initDataSet(this._option.dataSet);
60942
- this._autoSize = isTrueBrowseEnv ? (_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true : false;
60942
+ this._autoSize = isTrueBrowseEnv ? ((_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true) : false;
60943
60943
  this._bindResizeEvent();
60944
60944
  this._bindViewEvent();
60945
60945
  this._initChartPlugin();
@@ -61124,7 +61124,7 @@ class VChart {
61124
61124
  (_b = this._compiler) === null || _b === void 0 ? void 0 : _b.setBackground(this._getBackground());
61125
61125
  }
61126
61126
  if (updateResult.reMake) {
61127
- (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.releaseGrammar();
61127
+ (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.releaseGrammar(true);
61128
61128
  this._userEvents.forEach(e => { var _a; return (_a = this._event) === null || _a === void 0 ? void 0 : _a.on(e.eType, e.query, e.handler); });
61129
61129
  }
61130
61130
  else if (updateResult.reCompile) {
@@ -61589,7 +61589,7 @@ class VChart {
61589
61589
  resize = true;
61590
61590
  }
61591
61591
  const lasAutoSize = this._autoSize;
61592
- this._autoSize = isTrueBrowser(this._option.mode) ? (_b = (_a = this._spec.autoFit) !== null && _a !== void 0 ? _a : this._option.autoFit) !== null && _b !== void 0 ? _b : true : false;
61592
+ this._autoSize = isTrueBrowser(this._option.mode) ? ((_b = (_a = this._spec.autoFit) !== null && _a !== void 0 ? _a : this._option.autoFit) !== null && _b !== void 0 ? _b : true) : false;
61593
61593
  if (this._autoSize !== lasAutoSize) {
61594
61594
  resize = true;
61595
61595
  }
@@ -61784,9 +61784,10 @@ class VChart {
61784
61784
  (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setLayout(layout);
61785
61785
  }
61786
61786
  reLayout() {
61787
- var _a;
61788
- this._chart.resetLayoutItemTag();
61789
- (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setLayoutTag(true);
61787
+ var _a, _b, _c;
61788
+ (_a = this._chart) === null || _a === void 0 ? void 0 : _a.resetLayoutItemTag();
61789
+ (_b = this._chart) === null || _b === void 0 ? void 0 : _b.setLayoutTag(true, null, false);
61790
+ (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.render();
61790
61791
  }
61791
61792
  getCompiler() {
61792
61793
  return this._compiler;
@@ -62175,7 +62176,7 @@ const lookup = (data, opt) => {
62175
62176
  });
62176
62177
  };
62177
62178
 
62178
- const version = "2.0.21";
62179
+ const version = "2.0.22";
62179
62180
 
62180
62181
  const addVChartProperty = (data, op) => {
62181
62182
  const context = op.beforeCall();
@@ -73421,13 +73422,20 @@ class BarSeries extends CartesianSeries {
73421
73422
  }
73422
73423
  const xScale = (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0);
73423
73424
  const yScale = (_d = (_c = this._yAxisHelper) === null || _c === void 0 ? void 0 : _c.getScale) === null || _d === void 0 ? void 0 : _d.call(_c, 0);
73425
+ const isVertical = this.direction === "vertical";
73424
73426
  this._barMark.setMarkConfig({
73425
73427
  clip: true,
73426
73428
  clipPath: () => {
73429
+ const usePreCalculatedRect = !!this._shouldDoPreCalculate();
73430
+ if (usePreCalculatedRect) {
73431
+ this._calculateStackRectPosition(isVertical);
73432
+ }
73427
73433
  const rectPaths = [];
73428
73434
  this._forEachStackGroup(node => {
73429
73435
  let min = Infinity;
73430
73436
  let max = -Infinity;
73437
+ let rectMin = Infinity;
73438
+ let rectMax = -Infinity;
73431
73439
  let hasPercent = false;
73432
73440
  let minPercent = Infinity;
73433
73441
  let maxPercent = -Infinity;
@@ -73438,6 +73446,12 @@ class BarSeries extends CartesianSeries {
73438
73446
  const endPercent = datum[STACK_FIELD_END_PERCENT];
73439
73447
  min = Math.min(min, start, end);
73440
73448
  max = Math.max(max, start, end);
73449
+ if (usePreCalculatedRect) {
73450
+ const rectStart = datum[isVertical ? RECT_Y : RECT_X];
73451
+ const rectEnd = datum[isVertical ? RECT_Y1 : RECT_X1];
73452
+ rectMin = Math.min(rectMin, rectStart, rectEnd);
73453
+ rectMax = Math.max(rectMax, rectStart, rectEnd);
73454
+ }
73441
73455
  if (isValid$1(startPercent) && isValid$1(endPercent)) {
73442
73456
  hasPercent = true;
73443
73457
  minPercent = Math.min(minPercent, startPercent, endPercent);
@@ -73452,14 +73466,14 @@ class BarSeries extends CartesianSeries {
73452
73466
  : undefined));
73453
73467
  const rectAttr = this.direction === "horizontal"
73454
73468
  ? {
73455
- x: this._getBarXStart(mockDatum, xScale),
73456
- x1: this._getBarXEnd(mockDatum, xScale),
73469
+ x: usePreCalculatedRect ? rectMin : this._getBarXStart(mockDatum, xScale),
73470
+ x1: usePreCalculatedRect ? rectMax : this._getBarXEnd(mockDatum, xScale),
73457
73471
  y: this._getPosition(this.direction, mockDatum),
73458
73472
  height: this._getBarWidth(this._yAxisHelper)
73459
73473
  }
73460
73474
  : {
73461
- y: this._getBarYStart(mockDatum, yScale),
73462
- y1: this._getBarYEnd(mockDatum, yScale),
73475
+ y: usePreCalculatedRect ? rectMin : this._getBarYStart(mockDatum, yScale),
73476
+ y1: usePreCalculatedRect ? rectMax : this._getBarYEnd(mockDatum, yScale),
73463
73477
  x: this._getPosition(this.direction, mockDatum),
73464
73478
  width: this._getBarWidth(this._xAxisHelper)
73465
73479
  };
@@ -74010,7 +74024,7 @@ class ScatterSeries extends CartesianSeries {
74010
74024
  }
74011
74025
  }
74012
74026
  handleZoom(e) {
74013
- var _a, _b;
74027
+ var _a, _b, _c, _d;
74014
74028
  this.getMarksWithoutRoot().forEach(mark => {
74015
74029
  if (!mark) {
74016
74030
  return;
@@ -74028,10 +74042,23 @@ class ScatterSeries extends CartesianSeries {
74028
74042
  }
74029
74043
  });
74030
74044
  });
74031
- const vgrammarLabel = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getProduct();
74032
- if (vgrammarLabel) {
74045
+ const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
74046
+ if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
74047
+ labelComponent.renderInner();
74048
+ }
74049
+ const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
74050
+ if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
74033
74051
  vgrammarLabel.evaluate(null, null);
74034
74052
  }
74053
+ const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
74054
+ if (labelGroup && (e === null || e === void 0 ? void 0 : e.scale) && (e === null || e === void 0 ? void 0 : e.scaleCenter)) {
74055
+ if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
74056
+ labelGroup.setAttributes({
74057
+ postMatrix: new Matrix()
74058
+ });
74059
+ }
74060
+ labelGroup.scale(e.scale, e.scale, e.scaleCenter);
74061
+ }
74035
74062
  }
74036
74063
  handlePan(e) {
74037
74064
  this.handleZoom(e);
@@ -75293,7 +75320,7 @@ class MapSeries extends GeoSeries {
75293
75320
  this._mapViewData = null;
75294
75321
  }
75295
75322
  handleZoom(e) {
75296
- var _a;
75323
+ var _a, _b, _c, _d;
75297
75324
  const { scale, scaleCenter } = e;
75298
75325
  if (scale === 1) {
75299
75326
  return;
@@ -75307,13 +75334,26 @@ class MapSeries extends GeoSeries {
75307
75334
  }
75308
75335
  pathGroup.scale(scale, scale, scaleCenter);
75309
75336
  }
75310
- const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75311
- if (vgrammarLabel) {
75312
- vgrammarLabel.renderInner();
75337
+ const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75338
+ if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
75339
+ labelComponent.renderInner();
75340
+ }
75341
+ const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
75342
+ if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
75343
+ vgrammarLabel.evaluate(null, null);
75344
+ }
75345
+ const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
75346
+ if (labelGroup && scale && scaleCenter) {
75347
+ if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
75348
+ labelGroup.setAttributes({
75349
+ postMatrix: new Matrix()
75350
+ });
75351
+ }
75352
+ labelGroup.scale(scale, scale, scaleCenter);
75313
75353
  }
75314
75354
  }
75315
75355
  handlePan(e) {
75316
- var _a;
75356
+ var _a, _b, _c, _d;
75317
75357
  const { delta } = e;
75318
75358
  if (delta[0] === 0 && delta[1] === 0) {
75319
75359
  return;
@@ -75327,9 +75367,22 @@ class MapSeries extends GeoSeries {
75327
75367
  }
75328
75368
  pathGroup.translate(delta[0], delta[1]);
75329
75369
  }
75330
- const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75331
- if (vgrammarLabel) {
75332
- vgrammarLabel.renderInner();
75370
+ const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75371
+ if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
75372
+ labelComponent.renderInner();
75373
+ }
75374
+ const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
75375
+ if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
75376
+ vgrammarLabel.evaluate(null, null);
75377
+ }
75378
+ const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
75379
+ if (labelGroup && delta) {
75380
+ if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
75381
+ labelGroup.setAttributes({
75382
+ postMatrix: new Matrix()
75383
+ });
75384
+ }
75385
+ labelGroup.translate(delta[0], delta[1]);
75333
75386
  }
75334
75387
  }
75335
75388
  getDatumCenter(datum) {
@@ -89377,7 +89430,7 @@ class SankeySeriesTooltipHelper extends BaseSeriesTooltipHelper {
89377
89430
  constructor() {
89378
89431
  super(...arguments);
89379
89432
  this._getDimensionData = (datum) => {
89380
- if (datum.source) {
89433
+ if (!isNil$1(datum === null || datum === void 0 ? void 0 : datum.source) && !isNil$1(datum === null || datum === void 0 ? void 0 : datum.target)) {
89381
89434
  if (isNumber$1(datum.source)) {
89382
89435
  const seriesKeys = this.series.getSeriesKeys();
89383
89436
  return seriesKeys[datum.source] + ' => ' + seriesKeys[datum.target];
@@ -96604,19 +96657,31 @@ const getMarkInfoList = (datum, region) => {
96604
96657
  const isMarkInfo = (info) => isValid$1(info) && !isArray$1(info);
96605
96658
  const isDimensionInfo = (info) => isValid$1(info) && isArray$1(info);
96606
96659
 
96660
+ const TOOLTIP_STYLE_THEME_KEYS = [
96661
+ 'panel',
96662
+ 'shape',
96663
+ 'titleLabel',
96664
+ 'keyLabel',
96665
+ 'valueLabel',
96666
+ 'spaceRow',
96667
+ 'maxContentHeight',
96668
+ 'align'
96669
+ ];
96607
96670
  class TooltipSpecTransformer extends BaseComponentSpecTransformer {
96608
96671
  _shouldMergeThemeToSpec() {
96609
96672
  return false;
96610
96673
  }
96611
96674
  _initTheme(spec, chartSpec) {
96612
- var _a, _b, _c;
96613
96675
  const { spec: newSpec, theme } = super._initTheme(spec, chartSpec);
96614
- newSpec.style = mergeSpec({}, this._theme, newSpec.style);
96615
- newSpec.offset = mergeSpec({}, theme.offset, spec.offset);
96616
- newSpec.transitionDuration = (_a = spec.transitionDuration) !== null && _a !== void 0 ? _a : theme.transitionDuration;
96617
- newSpec.trigger = (_b = spec.trigger) !== null && _b !== void 0 ? _b : theme.trigger;
96618
- newSpec.triggerOff = (_c = spec.triggerOff) !== null && _c !== void 0 ? _c : theme.triggerOff;
96619
- return { spec: newSpec, theme };
96676
+ const themeStyle = mergeSpec({}, ...TOOLTIP_STYLE_THEME_KEYS.map(key => ((theme === null || theme === void 0 ? void 0 : theme[key]) !== undefined ? { [key]: theme[key] } : undefined)), theme === null || theme === void 0 ? void 0 : theme.style);
96677
+ const themeSpec = mergeSpec({}, theme);
96678
+ TOOLTIP_STYLE_THEME_KEYS.forEach(key => {
96679
+ delete themeSpec[key];
96680
+ });
96681
+ delete themeSpec.style;
96682
+ const mergedSpec = mergeSpec({}, themeSpec, newSpec);
96683
+ mergedSpec.style = mergeSpec({}, themeStyle, mergedSpec.style);
96684
+ return { spec: mergedSpec, theme };
96620
96685
  }
96621
96686
  _transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo) {
96622
96687
  var _a, _b, _c, _d, _e, _f, _g;
package/build/index.js CHANGED
@@ -60945,7 +60945,7 @@
60945
60945
  this._compiler.updateLayoutTag();
60946
60946
  this._setFontFamilyTheme(this.getTheme('fontFamily'));
60947
60947
  this._initDataSet(this._option.dataSet);
60948
- this._autoSize = isTrueBrowseEnv ? (_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true : false;
60948
+ this._autoSize = isTrueBrowseEnv ? ((_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true) : false;
60949
60949
  this._bindResizeEvent();
60950
60950
  this._bindViewEvent();
60951
60951
  this._initChartPlugin();
@@ -61130,7 +61130,7 @@
61130
61130
  (_b = this._compiler) === null || _b === void 0 ? void 0 : _b.setBackground(this._getBackground());
61131
61131
  }
61132
61132
  if (updateResult.reMake) {
61133
- (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.releaseGrammar();
61133
+ (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.releaseGrammar(true);
61134
61134
  this._userEvents.forEach(e => { var _a; return (_a = this._event) === null || _a === void 0 ? void 0 : _a.on(e.eType, e.query, e.handler); });
61135
61135
  }
61136
61136
  else if (updateResult.reCompile) {
@@ -61595,7 +61595,7 @@
61595
61595
  resize = true;
61596
61596
  }
61597
61597
  const lasAutoSize = this._autoSize;
61598
- this._autoSize = isTrueBrowser(this._option.mode) ? (_b = (_a = this._spec.autoFit) !== null && _a !== void 0 ? _a : this._option.autoFit) !== null && _b !== void 0 ? _b : true : false;
61598
+ this._autoSize = isTrueBrowser(this._option.mode) ? ((_b = (_a = this._spec.autoFit) !== null && _a !== void 0 ? _a : this._option.autoFit) !== null && _b !== void 0 ? _b : true) : false;
61599
61599
  if (this._autoSize !== lasAutoSize) {
61600
61600
  resize = true;
61601
61601
  }
@@ -61790,9 +61790,10 @@
61790
61790
  (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setLayout(layout);
61791
61791
  }
61792
61792
  reLayout() {
61793
- var _a;
61794
- this._chart.resetLayoutItemTag();
61795
- (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setLayoutTag(true);
61793
+ var _a, _b, _c;
61794
+ (_a = this._chart) === null || _a === void 0 ? void 0 : _a.resetLayoutItemTag();
61795
+ (_b = this._chart) === null || _b === void 0 ? void 0 : _b.setLayoutTag(true, null, false);
61796
+ (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.render();
61796
61797
  }
61797
61798
  getCompiler() {
61798
61799
  return this._compiler;
@@ -62181,7 +62182,7 @@
62181
62182
  });
62182
62183
  };
62183
62184
 
62184
- const version = "2.0.21";
62185
+ const version = "2.0.22";
62185
62186
 
62186
62187
  const addVChartProperty = (data, op) => {
62187
62188
  const context = op.beforeCall();
@@ -73427,13 +73428,20 @@
73427
73428
  }
73428
73429
  const xScale = (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0);
73429
73430
  const yScale = (_d = (_c = this._yAxisHelper) === null || _c === void 0 ? void 0 : _c.getScale) === null || _d === void 0 ? void 0 : _d.call(_c, 0);
73431
+ const isVertical = this.direction === "vertical";
73430
73432
  this._barMark.setMarkConfig({
73431
73433
  clip: true,
73432
73434
  clipPath: () => {
73435
+ const usePreCalculatedRect = !!this._shouldDoPreCalculate();
73436
+ if (usePreCalculatedRect) {
73437
+ this._calculateStackRectPosition(isVertical);
73438
+ }
73433
73439
  const rectPaths = [];
73434
73440
  this._forEachStackGroup(node => {
73435
73441
  let min = Infinity;
73436
73442
  let max = -Infinity;
73443
+ let rectMin = Infinity;
73444
+ let rectMax = -Infinity;
73437
73445
  let hasPercent = false;
73438
73446
  let minPercent = Infinity;
73439
73447
  let maxPercent = -Infinity;
@@ -73444,6 +73452,12 @@
73444
73452
  const endPercent = datum[STACK_FIELD_END_PERCENT];
73445
73453
  min = Math.min(min, start, end);
73446
73454
  max = Math.max(max, start, end);
73455
+ if (usePreCalculatedRect) {
73456
+ const rectStart = datum[isVertical ? RECT_Y : RECT_X];
73457
+ const rectEnd = datum[isVertical ? RECT_Y1 : RECT_X1];
73458
+ rectMin = Math.min(rectMin, rectStart, rectEnd);
73459
+ rectMax = Math.max(rectMax, rectStart, rectEnd);
73460
+ }
73447
73461
  if (isValid$1(startPercent) && isValid$1(endPercent)) {
73448
73462
  hasPercent = true;
73449
73463
  minPercent = Math.min(minPercent, startPercent, endPercent);
@@ -73458,14 +73472,14 @@
73458
73472
  : undefined));
73459
73473
  const rectAttr = this.direction === "horizontal"
73460
73474
  ? {
73461
- x: this._getBarXStart(mockDatum, xScale),
73462
- x1: this._getBarXEnd(mockDatum, xScale),
73475
+ x: usePreCalculatedRect ? rectMin : this._getBarXStart(mockDatum, xScale),
73476
+ x1: usePreCalculatedRect ? rectMax : this._getBarXEnd(mockDatum, xScale),
73463
73477
  y: this._getPosition(this.direction, mockDatum),
73464
73478
  height: this._getBarWidth(this._yAxisHelper)
73465
73479
  }
73466
73480
  : {
73467
- y: this._getBarYStart(mockDatum, yScale),
73468
- y1: this._getBarYEnd(mockDatum, yScale),
73481
+ y: usePreCalculatedRect ? rectMin : this._getBarYStart(mockDatum, yScale),
73482
+ y1: usePreCalculatedRect ? rectMax : this._getBarYEnd(mockDatum, yScale),
73469
73483
  x: this._getPosition(this.direction, mockDatum),
73470
73484
  width: this._getBarWidth(this._xAxisHelper)
73471
73485
  };
@@ -74016,7 +74030,7 @@
74016
74030
  }
74017
74031
  }
74018
74032
  handleZoom(e) {
74019
- var _a, _b;
74033
+ var _a, _b, _c, _d;
74020
74034
  this.getMarksWithoutRoot().forEach(mark => {
74021
74035
  if (!mark) {
74022
74036
  return;
@@ -74034,10 +74048,23 @@
74034
74048
  }
74035
74049
  });
74036
74050
  });
74037
- const vgrammarLabel = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getProduct();
74038
- if (vgrammarLabel) {
74051
+ const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
74052
+ if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
74053
+ labelComponent.renderInner();
74054
+ }
74055
+ const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
74056
+ if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
74039
74057
  vgrammarLabel.evaluate(null, null);
74040
74058
  }
74059
+ const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
74060
+ if (labelGroup && (e === null || e === void 0 ? void 0 : e.scale) && (e === null || e === void 0 ? void 0 : e.scaleCenter)) {
74061
+ if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
74062
+ labelGroup.setAttributes({
74063
+ postMatrix: new Matrix()
74064
+ });
74065
+ }
74066
+ labelGroup.scale(e.scale, e.scale, e.scaleCenter);
74067
+ }
74041
74068
  }
74042
74069
  handlePan(e) {
74043
74070
  this.handleZoom(e);
@@ -75299,7 +75326,7 @@
75299
75326
  this._mapViewData = null;
75300
75327
  }
75301
75328
  handleZoom(e) {
75302
- var _a;
75329
+ var _a, _b, _c, _d;
75303
75330
  const { scale, scaleCenter } = e;
75304
75331
  if (scale === 1) {
75305
75332
  return;
@@ -75313,13 +75340,26 @@
75313
75340
  }
75314
75341
  pathGroup.scale(scale, scale, scaleCenter);
75315
75342
  }
75316
- const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75317
- if (vgrammarLabel) {
75318
- vgrammarLabel.renderInner();
75343
+ const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75344
+ if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
75345
+ labelComponent.renderInner();
75346
+ }
75347
+ const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
75348
+ if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
75349
+ vgrammarLabel.evaluate(null, null);
75350
+ }
75351
+ const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
75352
+ if (labelGroup && scale && scaleCenter) {
75353
+ if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
75354
+ labelGroup.setAttributes({
75355
+ postMatrix: new Matrix()
75356
+ });
75357
+ }
75358
+ labelGroup.scale(scale, scale, scaleCenter);
75319
75359
  }
75320
75360
  }
75321
75361
  handlePan(e) {
75322
- var _a;
75362
+ var _a, _b, _c, _d;
75323
75363
  const { delta } = e;
75324
75364
  if (delta[0] === 0 && delta[1] === 0) {
75325
75365
  return;
@@ -75333,9 +75373,22 @@
75333
75373
  }
75334
75374
  pathGroup.translate(delta[0], delta[1]);
75335
75375
  }
75336
- const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75337
- if (vgrammarLabel) {
75338
- vgrammarLabel.renderInner();
75376
+ const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75377
+ if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
75378
+ labelComponent.renderInner();
75379
+ }
75380
+ const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
75381
+ if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
75382
+ vgrammarLabel.evaluate(null, null);
75383
+ }
75384
+ const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
75385
+ if (labelGroup && delta) {
75386
+ if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
75387
+ labelGroup.setAttributes({
75388
+ postMatrix: new Matrix()
75389
+ });
75390
+ }
75391
+ labelGroup.translate(delta[0], delta[1]);
75339
75392
  }
75340
75393
  }
75341
75394
  getDatumCenter(datum) {
@@ -89383,7 +89436,7 @@
89383
89436
  constructor() {
89384
89437
  super(...arguments);
89385
89438
  this._getDimensionData = (datum) => {
89386
- if (datum.source) {
89439
+ if (!isNil$1(datum === null || datum === void 0 ? void 0 : datum.source) && !isNil$1(datum === null || datum === void 0 ? void 0 : datum.target)) {
89387
89440
  if (isNumber$1(datum.source)) {
89388
89441
  const seriesKeys = this.series.getSeriesKeys();
89389
89442
  return seriesKeys[datum.source] + ' => ' + seriesKeys[datum.target];
@@ -96610,19 +96663,31 @@
96610
96663
  const isMarkInfo = (info) => isValid$1(info) && !isArray$1(info);
96611
96664
  const isDimensionInfo = (info) => isValid$1(info) && isArray$1(info);
96612
96665
 
96666
+ const TOOLTIP_STYLE_THEME_KEYS = [
96667
+ 'panel',
96668
+ 'shape',
96669
+ 'titleLabel',
96670
+ 'keyLabel',
96671
+ 'valueLabel',
96672
+ 'spaceRow',
96673
+ 'maxContentHeight',
96674
+ 'align'
96675
+ ];
96613
96676
  class TooltipSpecTransformer extends BaseComponentSpecTransformer {
96614
96677
  _shouldMergeThemeToSpec() {
96615
96678
  return false;
96616
96679
  }
96617
96680
  _initTheme(spec, chartSpec) {
96618
- var _a, _b, _c;
96619
96681
  const { spec: newSpec, theme } = super._initTheme(spec, chartSpec);
96620
- newSpec.style = mergeSpec({}, this._theme, newSpec.style);
96621
- newSpec.offset = mergeSpec({}, theme.offset, spec.offset);
96622
- newSpec.transitionDuration = (_a = spec.transitionDuration) !== null && _a !== void 0 ? _a : theme.transitionDuration;
96623
- newSpec.trigger = (_b = spec.trigger) !== null && _b !== void 0 ? _b : theme.trigger;
96624
- newSpec.triggerOff = (_c = spec.triggerOff) !== null && _c !== void 0 ? _c : theme.triggerOff;
96625
- return { spec: newSpec, theme };
96682
+ const themeStyle = mergeSpec({}, ...TOOLTIP_STYLE_THEME_KEYS.map(key => ((theme === null || theme === void 0 ? void 0 : theme[key]) !== undefined ? { [key]: theme[key] } : undefined)), theme === null || theme === void 0 ? void 0 : theme.style);
96683
+ const themeSpec = mergeSpec({}, theme);
96684
+ TOOLTIP_STYLE_THEME_KEYS.forEach(key => {
96685
+ delete themeSpec[key];
96686
+ });
96687
+ delete themeSpec.style;
96688
+ const mergedSpec = mergeSpec({}, themeSpec, newSpec);
96689
+ mergedSpec.style = mergeSpec({}, themeStyle, mergedSpec.style);
96690
+ return { spec: mergedSpec, theme };
96626
96691
  }
96627
96692
  _transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo) {
96628
96693
  var _a, _b, _c, _d, _e, _f, _g;