@visactor/vchart 1.13.14-alpha.0 → 1.13.15

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 (40) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +13 -9
  3. package/build/index.js +13 -9
  4. package/build/index.min.js +1 -1
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/constant/funnel.js +1 -2
  7. package/cjs/constant/sunburst.js +2 -1
  8. package/cjs/core/index.d.ts +1 -1
  9. package/cjs/core/index.js +1 -1
  10. package/cjs/core/index.js.map +1 -1
  11. package/cjs/core/interface.js +1 -2
  12. package/cjs/core/vchart.js +8 -3
  13. package/cjs/core/vchart.js.map +1 -1
  14. package/cjs/env/env.js +1 -1
  15. package/cjs/env/index.js +1 -1
  16. package/cjs/event/event-dispatcher.js +1 -1
  17. package/cjs/event/event.js +1 -1
  18. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -1
  19. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +4 -3
  20. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
  21. package/cjs/series/sankey/interface.d.ts +1 -1
  22. package/cjs/series/sankey/interface.js.map +1 -1
  23. package/esm/constant/funnel.js +1 -2
  24. package/esm/constant/sunburst.js +2 -1
  25. package/esm/core/index.d.ts +1 -1
  26. package/esm/core/index.js +1 -1
  27. package/esm/core/index.js.map +1 -1
  28. package/esm/core/interface.js +1 -2
  29. package/esm/core/vchart.js +8 -3
  30. package/esm/core/vchart.js.map +1 -1
  31. package/esm/env/env.js +1 -1
  32. package/esm/env/index.js +1 -1
  33. package/esm/event/event-dispatcher.js +1 -1
  34. package/esm/event/event.js +1 -1
  35. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -1
  36. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +4 -3
  37. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
  38. package/esm/series/sankey/interface.d.ts +1 -1
  39. package/esm/series/sankey/interface.js.map +1 -1
  40. package/package.json +10 -10
package/build/index.es.js CHANGED
@@ -63321,7 +63321,7 @@ class VChart {
63321
63321
  return this._beforeRender(option);
63322
63322
  }
63323
63323
  _reCompile(updateResult, morphConfig) {
63324
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
63324
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
63325
63325
  if (updateResult.reMake) {
63326
63326
  this._releaseData();
63327
63327
  this._initDataSet();
@@ -63352,8 +63352,9 @@ class VChart {
63352
63352
  }
63353
63353
  if (updateResult.reSize) {
63354
63354
  const { width, height } = this.getCurrentSize();
63355
- this._chart.onResize(width, height, false);
63356
- this._compiler.resize(width, height, false);
63355
+ this._currentSize = { width, height };
63356
+ (_l = this._chart) === null || _l === void 0 ? void 0 : _l.onResize(width, height, false);
63357
+ (_m = this._compiler) === null || _m === void 0 ? void 0 : _m.resize(width, height, false);
63357
63358
  }
63358
63359
  }
63359
63360
  }
@@ -64240,7 +64241,7 @@ const registerVChartCore = () => {
64240
64241
  };
64241
64242
  registerVChartCore();
64242
64243
 
64243
- const version = "1.13.14-alpha.0";
64244
+ const version = "1.13.15";
64244
64245
 
64245
64246
  const addVChartProperty = (data, op) => {
64246
64247
  const context = op.beforeCall();
@@ -86099,7 +86100,7 @@ class SankeyLayout {
86099
86100
  }
86100
86101
  const isStartGap = "start" === this.options.gapPosition,
86101
86102
  isMiddleGap = !isStartGap && "end" !== this.options.gapPosition,
86102
- getNodeHeight = isNumber$1(this.options.nodeHeight) ? (node, columns) => this.options.nodeHeight : isFunction$1(this.options.nodeHeight) ? this.options.nodeHeight : forceNodeHeight > 0 ? (node, columns) => forceNodeHeight : node => Math.max(node.value * ky, 0),
86103
+ getNodeHeight = isNumber$1(this.options.nodeHeight) ? node => this.options.nodeHeight : isFunction$1(this.options.nodeHeight) ? this.options.nodeHeight : forceNodeHeight > 0 ? node => forceNodeHeight : node => Math.max(node.value * ky, 0),
86103
86104
  getLinkHeight = isNumber$1(this.options.linkHeight) ? () => this.options.linkHeight : isFunction$1(this.options.linkHeight) ? this.options.linkHeight : (link, sourceNode, sourceNodeHeight) => Math.min(Math.max(sourceNode.value ? sourceNodeHeight * linkClampe(link.value / sourceNode.value) : 0, minLinkHeight, 0), maxLinkHeight);
86104
86105
  for (let i = 0, columnCount = columns.length; i < columnCount; i++) {
86105
86106
  const nodes = columns[i];
@@ -86110,7 +86111,7 @@ class SankeyLayout {
86110
86111
  calculatedNodeHeight = 0;
86111
86112
  for (let j = 0, len = nodes.length; j < len; j++) {
86112
86113
  const node = nodes[j];
86113
- gapY = getGapY(node), isStartGap && (y += gapY), calculatedNodeHeight = getNodeHeight(node, columns), nodeHeight = Math.min(Math.max(calculatedNodeHeight, minNodeHeight), maxNodeHeight), node.y0 = y, node.y1 = y + nodeHeight, y = isStartGap ? node.y1 : node.y1 + gapY;
86114
+ gapY = getGapY(node), isStartGap && (y += gapY), calculatedNodeHeight = getNodeHeight(node), nodeHeight = Math.min(Math.max(calculatedNodeHeight, minNodeHeight), maxNodeHeight), node.y0 = y, node.y1 = y + nodeHeight, y = isStartGap ? node.y1 : node.y1 + gapY;
86114
86115
  for (let k = 0, linkLen = node.sourceLinks.length; k < linkLen; k++) {
86115
86116
  const link = node.sourceLinks[k];
86116
86117
  link.thickness = getLinkHeight(link, node, calculatedNodeHeight);
@@ -103244,7 +103245,7 @@ class DomTooltipHandler extends BaseTooltipHandler {
103244
103245
  if (!changePositionOnly) {
103245
103246
  this._updateDomStringByCol(actualTooltip);
103246
103247
  }
103247
- this._updateDomStyle('height');
103248
+ this._updateDomStyle('height', changePositionOnly);
103248
103249
  const rect = (_a = this._rootDom) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
103249
103250
  return {
103250
103251
  width: rect === null || rect === void 0 ? void 0 : rect.width,
@@ -103389,7 +103390,7 @@ class DomTooltipHandler extends BaseTooltipHandler {
103389
103390
  contentDom.parentNode.removeChild(contentDom);
103390
103391
  }
103391
103392
  }
103392
- _updateDomStyle(sizeKey = 'width') {
103393
+ _updateDomStyle(sizeKey = 'width', refreshSize) {
103393
103394
  var _a, _b, _c, _d, _e;
103394
103395
  const rootDom = this._rootDom;
103395
103396
  const contentDom = [...rootDom.children].find(child => child.className.includes(TOOLTIP_CONTENT_BOX_CLASS_NAME));
@@ -103432,6 +103433,9 @@ class DomTooltipHandler extends BaseTooltipHandler {
103432
103433
  const row = rows[i];
103433
103434
  const cols = (_d = row.children) !== null && _d !== void 0 ? _d : [];
103434
103435
  for (let j = 0; j < cols.length; j++) {
103436
+ if (refreshSize) {
103437
+ cols[j].style[sizeKey] = 'initial';
103438
+ }
103435
103439
  const width = cols[j].getBoundingClientRect()[sizeKey];
103436
103440
  if (widthByCol[j] === undefined || widthByCol[j] < width) {
103437
103441
  widthByCol[j] = width;
@@ -103463,7 +103467,7 @@ class DomTooltipHandler extends BaseTooltipHandler {
103463
103467
  }
103464
103468
  if (this.getVisibility()) {
103465
103469
  this._updateDomStringByCol(this._tooltipActual);
103466
- this._updateDomStyle('height');
103470
+ this._updateDomStyle('height', false);
103467
103471
  }
103468
103472
  }
103469
103473
  _updatePosition({ x, y }) {
package/build/index.js CHANGED
@@ -63327,7 +63327,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
63327
63327
  return this._beforeRender(option);
63328
63328
  }
63329
63329
  _reCompile(updateResult, morphConfig) {
63330
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
63330
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
63331
63331
  if (updateResult.reMake) {
63332
63332
  this._releaseData();
63333
63333
  this._initDataSet();
@@ -63358,8 +63358,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
63358
63358
  }
63359
63359
  if (updateResult.reSize) {
63360
63360
  const { width, height } = this.getCurrentSize();
63361
- this._chart.onResize(width, height, false);
63362
- this._compiler.resize(width, height, false);
63361
+ this._currentSize = { width, height };
63362
+ (_l = this._chart) === null || _l === void 0 ? void 0 : _l.onResize(width, height, false);
63363
+ (_m = this._compiler) === null || _m === void 0 ? void 0 : _m.resize(width, height, false);
63363
63364
  }
63364
63365
  }
63365
63366
  }
@@ -64246,7 +64247,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64246
64247
  };
64247
64248
  registerVChartCore();
64248
64249
 
64249
- const version = "1.13.14-alpha.0";
64250
+ const version = "1.13.15";
64250
64251
 
64251
64252
  const addVChartProperty = (data, op) => {
64252
64253
  const context = op.beforeCall();
@@ -86105,7 +86106,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86105
86106
  }
86106
86107
  const isStartGap = "start" === this.options.gapPosition,
86107
86108
  isMiddleGap = !isStartGap && "end" !== this.options.gapPosition,
86108
- getNodeHeight = isNumber$1(this.options.nodeHeight) ? (node, columns) => this.options.nodeHeight : isFunction$1(this.options.nodeHeight) ? this.options.nodeHeight : forceNodeHeight > 0 ? (node, columns) => forceNodeHeight : node => Math.max(node.value * ky, 0),
86109
+ getNodeHeight = isNumber$1(this.options.nodeHeight) ? node => this.options.nodeHeight : isFunction$1(this.options.nodeHeight) ? this.options.nodeHeight : forceNodeHeight > 0 ? node => forceNodeHeight : node => Math.max(node.value * ky, 0),
86109
86110
  getLinkHeight = isNumber$1(this.options.linkHeight) ? () => this.options.linkHeight : isFunction$1(this.options.linkHeight) ? this.options.linkHeight : (link, sourceNode, sourceNodeHeight) => Math.min(Math.max(sourceNode.value ? sourceNodeHeight * linkClampe(link.value / sourceNode.value) : 0, minLinkHeight, 0), maxLinkHeight);
86110
86111
  for (let i = 0, columnCount = columns.length; i < columnCount; i++) {
86111
86112
  const nodes = columns[i];
@@ -86116,7 +86117,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86116
86117
  calculatedNodeHeight = 0;
86117
86118
  for (let j = 0, len = nodes.length; j < len; j++) {
86118
86119
  const node = nodes[j];
86119
- gapY = getGapY(node), isStartGap && (y += gapY), calculatedNodeHeight = getNodeHeight(node, columns), nodeHeight = Math.min(Math.max(calculatedNodeHeight, minNodeHeight), maxNodeHeight), node.y0 = y, node.y1 = y + nodeHeight, y = isStartGap ? node.y1 : node.y1 + gapY;
86120
+ gapY = getGapY(node), isStartGap && (y += gapY), calculatedNodeHeight = getNodeHeight(node), nodeHeight = Math.min(Math.max(calculatedNodeHeight, minNodeHeight), maxNodeHeight), node.y0 = y, node.y1 = y + nodeHeight, y = isStartGap ? node.y1 : node.y1 + gapY;
86120
86121
  for (let k = 0, linkLen = node.sourceLinks.length; k < linkLen; k++) {
86121
86122
  const link = node.sourceLinks[k];
86122
86123
  link.thickness = getLinkHeight(link, node, calculatedNodeHeight);
@@ -103250,7 +103251,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103250
103251
  if (!changePositionOnly) {
103251
103252
  this._updateDomStringByCol(actualTooltip);
103252
103253
  }
103253
- this._updateDomStyle('height');
103254
+ this._updateDomStyle('height', changePositionOnly);
103254
103255
  const rect = (_a = this._rootDom) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
103255
103256
  return {
103256
103257
  width: rect === null || rect === void 0 ? void 0 : rect.width,
@@ -103395,7 +103396,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103395
103396
  contentDom.parentNode.removeChild(contentDom);
103396
103397
  }
103397
103398
  }
103398
- _updateDomStyle(sizeKey = 'width') {
103399
+ _updateDomStyle(sizeKey = 'width', refreshSize) {
103399
103400
  var _a, _b, _c, _d, _e;
103400
103401
  const rootDom = this._rootDom;
103401
103402
  const contentDom = [...rootDom.children].find(child => child.className.includes(TOOLTIP_CONTENT_BOX_CLASS_NAME));
@@ -103438,6 +103439,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103438
103439
  const row = rows[i];
103439
103440
  const cols = (_d = row.children) !== null && _d !== void 0 ? _d : [];
103440
103441
  for (let j = 0; j < cols.length; j++) {
103442
+ if (refreshSize) {
103443
+ cols[j].style[sizeKey] = 'initial';
103444
+ }
103441
103445
  const width = cols[j].getBoundingClientRect()[sizeKey];
103442
103446
  if (widthByCol[j] === undefined || widthByCol[j] < width) {
103443
103447
  widthByCol[j] = width;
@@ -103469,7 +103473,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103469
103473
  }
103470
103474
  if (this.getVisibility()) {
103471
103475
  this._updateDomStringByCol(this._tooltipActual);
103472
- this._updateDomStyle('height');
103476
+ this._updateDomStyle('height', false);
103473
103477
  }
103474
103478
  }
103475
103479
  _updatePosition({ x, y }) {