tvcharts 0.7.45 → 0.7.46

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.
package/dist/echarts.js CHANGED
@@ -24804,6 +24804,9 @@ var ECharts = class extends Eventful_default {
24804
24804
  const seriesName = params.seriesName;
24805
24805
  if (params.type === "component") {
24806
24806
  const tableModal = ecModel.findComponents({mainType: "table", query: {name: seriesName}})[0];
24807
+ if (!tableModal) {
24808
+ return;
24809
+ }
24807
24810
  tableModal.mergeTables(params.data);
24808
24811
  tableModal.setAbleDataZoomUpdate(true);
24809
24812
  return;
@@ -41517,7 +41520,7 @@ var RoamController = class extends Eventful_default {
41517
41520
  this._opt = defaults(clone(opt) || {}, {
41518
41521
  zoomOnMouseWheel: true,
41519
41522
  moveOnMouseMove: true,
41520
- moveOnMouseWheel: false,
41523
+ moveOnMouseWheel: "shift",
41521
41524
  preventDefaultMouseMove: true
41522
41525
  });
41523
41526
  if (controlType == null) {
@@ -41621,14 +41624,15 @@ var RoamController = class extends Eventful_default {
41621
41624
  if (wheelDelta === 0 || !shouldZoom && !shouldMove) {
41622
41625
  return;
41623
41626
  }
41624
- if (shouldZoom) {
41627
+ if (shouldZoom && !shouldMove) {
41625
41628
  const factor = absWheelDeltaDelta > 3 ? 1.4 : absWheelDeltaDelta > 1 ? 1.2 : 1.1;
41626
41629
  const scale4 = wheelDelta > 0 ? factor : 1 / factor;
41627
41630
  checkPointerAndTrigger(this, "zoom", "zoomOnMouseWheel", e2, {
41628
41631
  scale: scale4,
41629
41632
  originX,
41630
41633
  originY,
41631
- isAvailableBehavior: null
41634
+ isAvailableBehavior: null,
41635
+ inSitu: e2.event.ctrlKey
41632
41636
  });
41633
41637
  }
41634
41638
  if (shouldMove) {
@@ -41651,7 +41655,8 @@ var RoamController = class extends Eventful_default {
41651
41655
  scale: scale4,
41652
41656
  originX: e2.pinchX,
41653
41657
  originY: e2.pinchY,
41654
- isAvailableBehavior: null
41658
+ isAvailableBehavior: null,
41659
+ inSitu: e2.event.ctrlKey
41655
41660
  });
41656
41661
  }
41657
41662
  };
@@ -57635,7 +57640,6 @@ var BoxesSeriesModel2 = class extends Series_default {
57635
57640
  super(...arguments);
57636
57641
  this.type = BoxesSeriesModel2.type;
57637
57642
  this.xFilterMode = "weakFilter";
57638
- this.dataIndexById = {};
57639
57643
  }
57640
57644
  getInitialData(option) {
57641
57645
  if (true) {
@@ -76063,7 +76067,7 @@ function mergeControllerParams(dataZoomInfoMap) {
76063
76067
  opt: {
76064
76068
  zoomOnMouseWheel: true,
76065
76069
  moveOnMouseMove: true,
76066
- moveOnMouseWheel: true,
76070
+ moveOnMouseWheel: "shift",
76067
76071
  preventDefaultMouseMove: !!preventDefaultMouseMove
76068
76072
  }
76069
76073
  };
@@ -76159,6 +76163,16 @@ var getRangeHandlers = {
76159
76163
  const distanceRange = lastDistanceRange.slice();
76160
76164
  const maxWidth = axisModel.ecModel.scheduler.api.getWidth() / 2;
76161
76165
  distanceRange[0] = barSpaceLimit(distanceRange[0] * e2.scale, maxWidth);
76166
+ if (e2.inSitu) {
76167
+ const extent3 = axisModel.axis.getExtent()[1];
76168
+ const x = axisModel.axis.toLocalCoord(e2.originX);
76169
+ const dataCount = axisModel.axis.scale.getAxisDataLen();
76170
+ const deltaFromRight = (extent3 - x) / lastDistanceRange[0];
76171
+ const floatIndex = dataCount + distanceRange[1] - deltaFromRight;
76172
+ const deltaFromRight1 = (extent3 - x) / distanceRange[0];
76173
+ const index = dataCount + distanceRange[1] - deltaFromRight1;
76174
+ distanceRange[1] = distanceRange[1] + floatIndex - index;
76175
+ }
76162
76176
  this.distanceRange = distanceRange;
76163
76177
  if (lastDistanceRange[0] !== distanceRange[0] || lastDistanceRange[1] !== distanceRange[1]) {
76164
76178
  return distanceRange;
@@ -76226,8 +76240,15 @@ function makeMover(getPercentDelta) {
76226
76240
  if (isDistanceMode) {
76227
76241
  const lastDistanceRange = this.distanceRange;
76228
76242
  const distanceRange = lastDistanceRange.slice();
76229
- const distance2 = e2.dx ?? e2.scrollDelta;
76243
+ let distance2 = e2.dx;
76230
76244
  const barSpace = lastDistanceRange[0] ?? this.dataZoomModel.get("barSpace");
76245
+ if (!distance2) {
76246
+ const scrollDelta = e2.scrollDelta;
76247
+ if (!scrollDelta) {
76248
+ return;
76249
+ }
76250
+ distance2 = scrollDelta > 0 ? -40 : 40;
76251
+ }
76231
76252
  const startLastBarRightSideDiffBarCount = lastDistanceRange[1] ?? this.dataZoomModel.get("lastBarRightSideDiffBarCount");
76232
76253
  const distanceBarCount = distance2 / barSpace;
76233
76254
  const dataCount = axisModel.axis.scale.getAxisDataLen();