@wcardinal/wcardinal-ui 0.418.0 → 0.419.0

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 (121) hide show
  1. package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +7 -7
  2. package/dist/types/wcardinal/ui/d-chart-axis-container-impl.d.ts +4 -4
  3. package/dist/types/wcardinal/ui/d-chart-axis-container.d.ts +2 -2
  4. package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +3 -5
  5. package/dist/types/wcardinal/ui/d-chart-coordinate-container-impl.d.ts +4 -4
  6. package/dist/types/wcardinal/ui/d-chart-coordinate-container.d.ts +2 -2
  7. package/dist/types/wcardinal/ui/{d-chart-plot-area-impl.d.ts → d-chart-plot-area-base.d.ts} +23 -20
  8. package/dist/types/wcardinal/ui/d-chart-plot-area-onefold.d.ts +41 -0
  9. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-axis-container.d.ts +24 -0
  10. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.d.ts +22 -0
  11. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.d.ts +18 -0
  12. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.d.ts +5 -0
  13. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.d.ts +5 -0
  14. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-series-container.d.ts +43 -0
  15. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +46 -0
  16. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.d.ts +11 -0
  17. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.d.ts +11 -0
  18. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub.d.ts +22 -0
  19. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-view-target.d.ts +30 -0
  20. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold.d.ts +46 -0
  21. package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +31 -7
  22. package/dist/types/wcardinal/ui/d-chart-selection-gridline-x.d.ts +0 -1
  23. package/dist/types/wcardinal/ui/d-chart-selection-gridline-y.d.ts +0 -1
  24. package/dist/types/wcardinal/ui/d-chart-series-container-impl.d.ts +5 -4
  25. package/dist/types/wcardinal/ui/d-chart-series-container.d.ts +2 -3
  26. package/dist/types/wcardinal/ui/d-chart.d.ts +5 -3
  27. package/dist/types/wcardinal/ui/index.d.ts +14 -1
  28. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.d.ts +1 -0
  29. package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.d.ts +1 -0
  30. package/dist/wcardinal/ui/d-chart-axis-base-bar.js +13 -8
  31. package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -1
  32. package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js +1 -0
  33. package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js.map +1 -1
  34. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +15 -14
  35. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
  36. package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js +4 -6
  37. package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js.map +1 -1
  38. package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js +4 -6
  39. package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js.map +1 -1
  40. package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +4 -6
  41. package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
  42. package/dist/wcardinal/ui/d-chart-axis-container-impl.js +2 -3
  43. package/dist/wcardinal/ui/d-chart-axis-container-impl.js.map +1 -1
  44. package/dist/wcardinal/ui/d-chart-axis-container.js.map +1 -1
  45. package/dist/wcardinal/ui/d-chart-axis-guide-simple.js +9 -6
  46. package/dist/wcardinal/ui/d-chart-axis-guide-simple.js.map +1 -1
  47. package/dist/wcardinal/ui/d-chart-coordinate-base.js +2 -10
  48. package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -1
  49. package/dist/wcardinal/ui/d-chart-coordinate-container-impl.js.map +1 -1
  50. package/dist/wcardinal/ui/d-chart-coordinate-container.js.map +1 -1
  51. package/dist/wcardinal/ui/d-chart-plot-area-base.js +117 -0
  52. package/dist/wcardinal/ui/d-chart-plot-area-base.js.map +1 -0
  53. package/dist/wcardinal/ui/d-chart-plot-area-onefold.js +166 -0
  54. package/dist/wcardinal/ui/d-chart-plot-area-onefold.js.map +1 -0
  55. package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js +128 -0
  56. package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js.map +1 -0
  57. package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js +118 -0
  58. package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js.map +1 -0
  59. package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js +53 -0
  60. package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js.map +1 -0
  61. package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js +28 -0
  62. package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js.map +1 -0
  63. package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js +28 -0
  64. package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js.map +1 -0
  65. package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js +186 -0
  66. package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js.map +1 -0
  67. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +109 -0
  68. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -0
  69. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js +49 -0
  70. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js.map +1 -0
  71. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js +50 -0
  72. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js.map +1 -0
  73. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js +6 -0
  74. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js.map +1 -0
  75. package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js +81 -0
  76. package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js.map +1 -0
  77. package/dist/wcardinal/ui/d-chart-plot-area-twofold.js +204 -0
  78. package/dist/wcardinal/ui/d-chart-plot-area-twofold.js.map +1 -0
  79. package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
  80. package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +4 -8
  81. package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
  82. package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +4 -8
  83. package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
  84. package/dist/wcardinal/ui/d-chart-selection-marker.js +5 -2
  85. package/dist/wcardinal/ui/d-chart-selection-marker.js.map +1 -1
  86. package/dist/wcardinal/ui/d-chart-series-container-impl.js +4 -2
  87. package/dist/wcardinal/ui/d-chart-series-container-impl.js.map +1 -1
  88. package/dist/wcardinal/ui/d-chart-series-container.js.map +1 -1
  89. package/dist/wcardinal/ui/d-chart-series-linear.js +1 -1
  90. package/dist/wcardinal/ui/d-chart-series-linear.js.map +1 -1
  91. package/dist/wcardinal/ui/d-chart.js +19 -14
  92. package/dist/wcardinal/ui/d-chart.js.map +1 -1
  93. package/dist/wcardinal/ui/index.js +14 -1
  94. package/dist/wcardinal/ui/index.js.map +1 -1
  95. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js +3 -0
  96. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js.map +1 -1
  97. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js +3 -0
  98. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js.map +1 -1
  99. package/dist/wcardinal-ui-theme-dark-en-us.js +4 -1
  100. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  101. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  102. package/dist/wcardinal-ui-theme-dark-ja-jp.js +4 -1
  103. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  104. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  105. package/dist/wcardinal-ui-theme-dark.js +4 -1
  106. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  107. package/dist/wcardinal-ui-theme-white-en-us.js +4 -1
  108. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  109. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  110. package/dist/wcardinal-ui-theme-white-ja-jp.js +4 -1
  111. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  112. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  113. package/dist/wcardinal-ui-theme-white.js +4 -1
  114. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  115. package/dist/wcardinal-ui.cjs.js +1275 -228
  116. package/dist/wcardinal-ui.js +1269 -228
  117. package/dist/wcardinal-ui.min.js +2 -2
  118. package/dist/wcardinal-ui.min.js.map +1 -1
  119. package/package.json +1 -1
  120. package/dist/wcardinal/ui/d-chart-plot-area-impl.js +0 -237
  121. package/dist/wcardinal/ui/d-chart-plot-area-impl.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.418.0
2
+ Winter Cardinal UI v0.419.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -50099,6 +50099,9 @@ var DThemeWhiteChartPlotArea = /** @class */ (function (_super) {
50099
50099
  DThemeWhiteChartPlotArea.prototype.isOverflowMaskEnabled = function () {
50100
50100
  return true;
50101
50101
  };
50102
+ DThemeWhiteChartPlotArea.prototype.getMargin = function () {
50103
+ return 20;
50104
+ };
50102
50105
  return DThemeWhiteChartPlotArea;
50103
50106
  }(DThemeWhiteBase));
50104
50107
 
@@ -61219,6 +61222,9 @@ var DThemeDarkChartPlotArea = /** @class */ (function (_super) {
61219
61222
  DThemeDarkChartPlotArea.prototype.isOverflowMaskEnabled = function () {
61220
61223
  return true;
61221
61224
  };
61225
+ DThemeDarkChartPlotArea.prototype.getMargin = function () {
61226
+ return 20;
61227
+ };
61222
61228
  return DThemeDarkChartPlotArea;
61223
61229
  }(DThemeDarkBase));
61224
61230
 
@@ -78826,28 +78832,32 @@ var DChartAxisBaseBar = /** @class */ (function () {
78826
78832
  var index = this._index;
78827
78833
  var shape = this._shape;
78828
78834
  if (shape != null && container != null) {
78835
+ var parser = this._parser;
78829
78836
  var plotArea = container.plotArea;
78830
- var plotAreaWidth = plotArea.width;
78831
- var plotAreaHeight = plotArea.height;
78832
- var offset = this._parser.padding * index;
78837
+ var plotAreaBounds = plotArea.getAxisBounds(parser.position);
78838
+ var plotAreaX = plotAreaBounds.x;
78839
+ var plotAreaY = plotAreaBounds.y;
78840
+ var plotAreaWidth = plotAreaBounds.width;
78841
+ var plotAreaHeight = plotAreaBounds.height;
78842
+ var offset = parser.padding * index;
78833
78843
  shape.lock(EShapeLockPart.UPLOADED);
78834
78844
  var position = shape.transform.position;
78835
78845
  var size = shape.size;
78836
- switch (this._parser.position) {
78846
+ switch (parser.position) {
78837
78847
  case DChartAxisPosition.TOP:
78838
- position.set(plotAreaWidth * 0.5, 0 - offset);
78848
+ position.set(plotAreaX + plotAreaWidth * 0.5, plotAreaY - offset);
78839
78849
  size.set(plotAreaWidth, 0);
78840
78850
  break;
78841
78851
  case DChartAxisPosition.BOTTOM:
78842
- position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
78852
+ position.set(plotAreaX + plotAreaWidth * 0.5, plotAreaY + plotAreaHeight + offset);
78843
78853
  size.set(plotAreaWidth, 0);
78844
78854
  break;
78845
78855
  case DChartAxisPosition.LEFT:
78846
- position.set(0 - offset, plotAreaHeight * 0.5);
78856
+ position.set(plotAreaX - offset, plotAreaY + plotAreaHeight * 0.5);
78847
78857
  size.set(0, plotAreaHeight);
78848
78858
  break;
78849
78859
  case DChartAxisPosition.RIGHT:
78850
- position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
78860
+ position.set(plotAreaX + plotAreaWidth + offset, plotAreaY + plotAreaHeight * 0.5);
78851
78861
  size.set(0, plotAreaHeight);
78852
78862
  break;
78853
78863
  }
@@ -78859,6 +78869,7 @@ var DChartAxisBaseBar = /** @class */ (function () {
78859
78869
  DChartAxisBaseBar.prototype.destroy = function () {
78860
78870
  var shape = this._shape;
78861
78871
  if (shape != null) {
78872
+ this._shape = undefined;
78862
78873
  shape.destroy();
78863
78874
  }
78864
78875
  this._index = 0;
@@ -78935,6 +78946,7 @@ var DChartAxisBaseGuideContainer = /** @class */ (function () {
78935
78946
  for (var i = 0, imax = list.length; i < imax; ++i) {
78936
78947
  list[i].destroy();
78937
78948
  }
78949
+ list.length = 0;
78938
78950
  this._index = 0;
78939
78951
  this._container = undefined;
78940
78952
  };
@@ -79401,12 +79413,8 @@ var DChartAxisBaseTickMajorGridline = /** @class */ (function () {
79401
79413
  }
79402
79414
  Object.defineProperty(DChartAxisBaseTickMajorGridline.prototype, "shapes", {
79403
79415
  get: function () {
79404
- var result = this._shapes;
79405
- if (result == null) {
79406
- result = this.newShapes();
79407
- this._shapes = result;
79408
- }
79409
- return result;
79416
+ var _a;
79417
+ return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
79410
79418
  },
79411
79419
  enumerable: false,
79412
79420
  configurable: true
@@ -79465,6 +79473,8 @@ var DChartAxisBaseTickMajorGridline = /** @class */ (function () {
79465
79473
  for (var i = 0, imax = shapes.length; i < imax; ++i) {
79466
79474
  shapes[i].destroy();
79467
79475
  }
79476
+ shapes.length = 0;
79477
+ this._shapes = undefined;
79468
79478
  }
79469
79479
  this._index = 0;
79470
79480
  this._container = undefined;
@@ -79480,12 +79490,8 @@ var DChartAxisBaseTickMajor = /** @class */ (function () {
79480
79490
  }
79481
79491
  Object.defineProperty(DChartAxisBaseTickMajor.prototype, "shapes", {
79482
79492
  get: function () {
79483
- var result = this._shapes;
79484
- if (result == null) {
79485
- result = this.newShapes();
79486
- this._shapes = result;
79487
- }
79488
- return result;
79493
+ var _a;
79494
+ return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
79489
79495
  },
79490
79496
  enumerable: false,
79491
79497
  configurable: true
@@ -79549,6 +79555,8 @@ var DChartAxisBaseTickMajor = /** @class */ (function () {
79549
79555
  for (var i = 0, imax = shapes.length; i < imax; ++i) {
79550
79556
  shapes[i].destroy();
79551
79557
  }
79558
+ shapes.length = 0;
79559
+ this._shapes = undefined;
79552
79560
  }
79553
79561
  this._gridline.destroy();
79554
79562
  this._index = 0;
@@ -79564,12 +79572,8 @@ var DChartAxisBaseTickMinor = /** @class */ (function () {
79564
79572
  }
79565
79573
  Object.defineProperty(DChartAxisBaseTickMinor.prototype, "shapes", {
79566
79574
  get: function () {
79567
- var result = this._shapes;
79568
- if (result == null) {
79569
- result = this.newShapes();
79570
- this._shapes = result;
79571
- }
79572
- return result;
79575
+ var _a;
79576
+ return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
79573
79577
  },
79574
79578
  enumerable: false,
79575
79579
  configurable: true
@@ -79623,6 +79627,8 @@ var DChartAxisBaseTickMinor = /** @class */ (function () {
79623
79627
  for (var i = 0, imax = shapes.length; i < imax; ++i) {
79624
79628
  shapes[i].destroy();
79625
79629
  }
79630
+ shapes.length = 0;
79631
+ this._shapes = undefined;
79626
79632
  }
79627
79633
  this._index = 0;
79628
79634
  this._container = undefined;
@@ -79714,6 +79720,11 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79714
79720
  var minorShapes = this._minor.shapes;
79715
79721
  if (parser.tick.enable && container != null && majorShapes && minorShapes) {
79716
79722
  var plotArea = container.plotArea;
79723
+ var plotAreaBounds = plotArea.getAxisBounds(parser.position);
79724
+ var plotAreaX = plotAreaBounds.x;
79725
+ var plotAreaY = plotAreaBounds.y;
79726
+ var plotAreaWidth = plotAreaBounds.width;
79727
+ var plotAreaHeight = plotAreaBounds.height;
79717
79728
  var transform = plotArea.container.transform.localTransform;
79718
79729
  var gridlineShapes = this._major.gridline.shapes;
79719
79730
  var offset = parser.padding * this._index;
@@ -79729,8 +79740,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79729
79740
  var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
79730
79741
  var domainVisibleFrom = domainVisible.from;
79731
79742
  var domainVisibleTo = domainVisible.to;
79732
- var plotAreaHeight = plotArea.height;
79733
- return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaHeight);
79743
+ return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaY - offset, transform, plotAreaY, plotAreaHeight);
79734
79744
  }
79735
79745
  break;
79736
79746
  case DChartAxisPosition.BOTTOM:
@@ -79742,8 +79752,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79742
79752
  var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
79743
79753
  var domainVisibleFrom = domainVisible.from;
79744
79754
  var domainVisibleTo = domainVisible.to;
79745
- var plotAreaHeight = plotArea.height;
79746
- return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + offset, transform, plotAreaHeight);
79755
+ return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaY + plotAreaHeight + offset, transform, plotAreaY, plotAreaHeight);
79747
79756
  }
79748
79757
  break;
79749
79758
  case DChartAxisPosition.LEFT:
@@ -79755,8 +79764,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79755
79764
  var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
79756
79765
  var rangeVisibleFrom = rangeVisible.from;
79757
79766
  var rangeVisibleTo = rangeVisible.to;
79758
- var plotAreaWidth = plotArea.width;
79759
- return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaWidth);
79767
+ return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaX - offset, transform, plotAreaX, plotAreaWidth);
79760
79768
  }
79761
79769
  break;
79762
79770
  case DChartAxisPosition.RIGHT:
@@ -79768,8 +79776,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79768
79776
  var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
79769
79777
  var rangeVisibleFrom = rangeVisible.from;
79770
79778
  var rangeVisibleTo = rangeVisible.to;
79771
- var plotAreaWidth = plotArea.width;
79772
- return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaWidth + offset, transform, plotAreaWidth);
79779
+ return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaX + plotAreaWidth + offset, transform, plotAreaX, plotAreaWidth);
79773
79780
  }
79774
79781
  break;
79775
79782
  }
@@ -79777,7 +79784,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79777
79784
  return false;
79778
79785
  };
79779
79786
  DChartAxisBaseTickContainer.prototype.getDomain = function (plotArea, coordinate, result) {
79780
- var bounds = plotArea.getBoundsInContainer();
79787
+ var bounds = plotArea.getContainerBounds();
79781
79788
  var transform = coordinate.transform;
79782
79789
  return result.set(coordinate.unmap(transform.unmap(bounds.x)), coordinate.unmap(transform.unmap(bounds.x + bounds.width)));
79783
79790
  };
@@ -79785,14 +79792,14 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79785
79792
  return result;
79786
79793
  };
79787
79794
  DChartAxisBaseTickContainer.prototype.getRange = function (plotArea, coordinate, result) {
79788
- var bounds = plotArea.getBoundsInContainer();
79795
+ var bounds = plotArea.getContainerBounds();
79789
79796
  var transform = coordinate.transform;
79790
79797
  return result.set(coordinate.unmap(transform.unmap(bounds.y)), coordinate.unmap(transform.unmap(bounds.y + bounds.height)));
79791
79798
  };
79792
79799
  DChartAxisBaseTickContainer.prototype.getRangeVisible = function (plotArea, coordinate, result) {
79793
79800
  return result;
79794
79801
  };
79795
- DChartAxisBaseTickContainer.prototype.updateX = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionY, transform, plotAreaHeight) {
79802
+ DChartAxisBaseTickContainer.prototype.updateX = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionY, transform, plotAreaY, plotAreaHeight) {
79796
79803
  var tick = this._parser.tick;
79797
79804
  var majorTick = tick.major;
79798
79805
  var majorCount = majorTick.count;
@@ -79819,7 +79826,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79819
79826
  var majorTickStep = majorTicks[imajorTick + 2];
79820
79827
  this.showMajor(majorShape, majotTickPositionX, shapePositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
79821
79828
  if (i < gridlineShapes.length) {
79822
- this.showMajorGridline(gridlineShapes[i], majorTickPosition, majotTickPositionX, plotAreaHeight * 0.5, 0, plotAreaHeight);
79829
+ this.showMajorGridline(gridlineShapes[i], majorTickPosition, majotTickPositionX, plotAreaY + plotAreaHeight * 0.5, 0, plotAreaHeight);
79823
79830
  }
79824
79831
  }
79825
79832
  else {
@@ -79845,7 +79852,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79845
79852
  }
79846
79853
  return true;
79847
79854
  };
79848
- DChartAxisBaseTickContainer.prototype.updateY = function (rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaWidth) {
79855
+ DChartAxisBaseTickContainer.prototype.updateY = function (rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaX, plotAreaWidth) {
79849
79856
  var tick = this._parser.tick;
79850
79857
  var majorTick = tick.major;
79851
79858
  var majorCount = majorTick.count;
@@ -79872,7 +79879,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79872
79879
  var majorTickStep = majorTicks[imajorTick + 2];
79873
79880
  this.showMajor(majorShape, shapePositionX, majotTickPositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
79874
79881
  if (i < gridlineShapes.length) {
79875
- this.showMajorGridline(gridlineShapes[i], majorTickPosition, plotAreaWidth * 0.5, majotTickPositionY, plotAreaWidth, 0);
79882
+ this.showMajorGridline(gridlineShapes[i], majorTickPosition, plotAreaX + plotAreaWidth * 0.5, majotTickPositionY, plotAreaWidth, 0);
79876
79883
  }
79877
79884
  }
79878
79885
  else {
@@ -80077,9 +80084,9 @@ var DChartAxisBase = /** @class */ (function () {
80077
80084
  * SPDX-License-Identifier: Apache-2.0
80078
80085
  */
80079
80086
  var DChartAxisContainerImpl = /** @class */ (function () {
80080
- function DChartAxisContainerImpl(plotArea, options) {
80087
+ function DChartAxisContainerImpl(plotArea, container, options) {
80081
80088
  this._plotArea = plotArea;
80082
- this._container = new EShapeContainer();
80089
+ this._container = container;
80083
80090
  this._list = new Map();
80084
80091
  }
80085
80092
  Object.defineProperty(DChartAxisContainerImpl.prototype, "container", {
@@ -80554,9 +80561,12 @@ var DChartAxisGuideSimple = /** @class */ (function () {
80554
80561
  var axis = this._axis;
80555
80562
  if (shape != null && container != null && axis != null) {
80556
80563
  var plotArea = container.plotArea;
80564
+ var plotAreaBounds = plotArea.getAxisBounds(axis.position);
80565
+ var plotAreaX = plotAreaBounds.x;
80566
+ var plotAreaY = plotAreaBounds.y;
80567
+ var plotAreaWidth = plotAreaBounds.width;
80568
+ var plotAreaHeight = plotAreaBounds.height;
80557
80569
  var transform = plotArea.container.transform.localTransform;
80558
- var plotAreaWidth = plotArea.width;
80559
- var plotAreaHeight = plotArea.height;
80560
80570
  var offset = axis.padding * index;
80561
80571
  switch (axis.position) {
80562
80572
  case DChartAxisPosition.TOP:
@@ -80567,10 +80577,10 @@ var DChartAxisGuideSimple = /** @class */ (function () {
80567
80577
  work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
80568
80578
  transform.apply(work, work);
80569
80579
  var x = work.x;
80570
- shape.update(axis.position, x, plotAreaHeight * 0.5, this._isShown && 0 <= x && x <= plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
80580
+ shape.update(axis.position, x, plotAreaY + plotAreaHeight * 0.5, this._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
80571
80581
  }
80572
80582
  else {
80573
- shape.update(axis.position, 0, plotAreaHeight * 0.5, false, plotAreaWidth, plotAreaHeight, offset);
80583
+ shape.update(axis.position, plotAreaX, plotAreaY + plotAreaHeight * 0.5, false, plotAreaWidth, plotAreaHeight, offset);
80574
80584
  }
80575
80585
  break;
80576
80586
  case DChartAxisPosition.LEFT:
@@ -80581,10 +80591,10 @@ var DChartAxisGuideSimple = /** @class */ (function () {
80581
80591
  work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
80582
80592
  transform.apply(work, work);
80583
80593
  var y = work.y;
80584
- shape.update(axis.position, plotAreaWidth * 0.5, y, this._isShown && 0 <= y && y <= plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
80594
+ shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, y, this._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
80585
80595
  }
80586
80596
  else {
80587
- shape.update(axis.position, plotAreaWidth * 0.5, 0, false, plotAreaWidth, plotAreaHeight, offset);
80597
+ shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, plotAreaY, false, plotAreaWidth, plotAreaHeight, offset);
80588
80598
  }
80589
80599
  break;
80590
80600
  }
@@ -80884,24 +80894,16 @@ var DChartCoordinateBase = /** @class */ (function () {
80884
80894
  var work = this._work;
80885
80895
  switch (this._direction) {
80886
80896
  case DChartCoordinateDirection.X:
80887
- this.getPixelDomain(plotArea, work);
80897
+ plotArea.getPixelDomain(work);
80888
80898
  this.doFit_(work.from, work.to, this.toFitDomain(from, to, plotArea, work), result);
80889
80899
  break;
80890
80900
  case DChartCoordinateDirection.Y:
80891
- this.getPixelRange(plotArea, work);
80901
+ plotArea.getPixelRange(work);
80892
80902
  this.doFit_(work.from, work.to, this.toFitRange(from, to, plotArea, work), result);
80893
80903
  break;
80894
80904
  }
80895
80905
  }
80896
80906
  };
80897
- DChartCoordinateBase.prototype.getPixelDomain = function (plotArea, result) {
80898
- var padding = plotArea.padding;
80899
- return result.set(padding.getLeft(), plotArea.width - padding.getRight());
80900
- };
80901
- DChartCoordinateBase.prototype.getPixelRange = function (plotArea, result) {
80902
- var padding = plotArea.padding;
80903
- return result.set(plotArea.height - padding.getBottom(), padding.getTop());
80904
- };
80905
80907
  DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
80906
80908
  if (from == null) {
80907
80909
  from = this._from;
@@ -81534,6 +81536,119 @@ var DChartOverview = /** @class */ (function (_super) {
81534
81536
  return DChartOverview;
81535
81537
  }(DBase));
81536
81538
 
81539
+ /*
81540
+ * Copyright (C) 2019 Toshiba Corporation
81541
+ * SPDX-License-Identifier: Apache-2.0
81542
+ */
81543
+ var DChartPlotAreaBase = /** @class */ (function (_super) {
81544
+ __extends(DChartPlotAreaBase, _super);
81545
+ function DChartPlotAreaBase(chart, options) {
81546
+ var _this = _super.call(this, options) || this;
81547
+ _this._isContainerBoundsDirty = true;
81548
+ _this._containerBounds = new pixi_js.Rectangle();
81549
+ _this._workPoint = new pixi_js.Point();
81550
+ _this._pixelBounds = new pixi_js.Rectangle();
81551
+ _this._chart = chart;
81552
+ _this._blendStartTime = 0;
81553
+ _this._blendDuration = 1000;
81554
+ _this._blendTimeout = null;
81555
+ _this._onBlendBound = function () {
81556
+ _this.onBlend();
81557
+ };
81558
+ _this._isViewDirty = true;
81559
+ _this._view = _this.newView(options);
81560
+ return _this;
81561
+ }
81562
+ DChartPlotAreaBase.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
81563
+ this._isViewDirty = true;
81564
+ this._isContainerBoundsDirty = true;
81565
+ _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
81566
+ };
81567
+ Object.defineProperty(DChartPlotAreaBase.prototype, "chart", {
81568
+ get: function () {
81569
+ return this._chart;
81570
+ },
81571
+ enumerable: false,
81572
+ configurable: true
81573
+ });
81574
+ Object.defineProperty(DChartPlotAreaBase.prototype, "view", {
81575
+ get: function () {
81576
+ return this._view;
81577
+ },
81578
+ enumerable: false,
81579
+ configurable: true
81580
+ });
81581
+ DChartPlotAreaBase.prototype.onWheel = function (e, deltas, global) {
81582
+ var vresult = this._view.onWheel(e, deltas, global);
81583
+ var sresult = _super.prototype.onWheel.call(this, e, deltas, global);
81584
+ return vresult || sresult;
81585
+ };
81586
+ DChartPlotAreaBase.prototype.onDblClick = function (e, interactionManager) {
81587
+ var vresult = this._view.onDblClick(e, interactionManager);
81588
+ var sresult = _super.prototype.onDblClick.call(this, e, interactionManager);
81589
+ return vresult || sresult;
81590
+ };
81591
+ DChartPlotAreaBase.prototype.onDown = function (e) {
81592
+ this._view.onDown(e);
81593
+ _super.prototype.onDown.call(this, e);
81594
+ };
81595
+ DChartPlotAreaBase.prototype.render = function (renderer) {
81596
+ if (this._isViewDirty) {
81597
+ this._isViewDirty = false;
81598
+ this.onViewDirty();
81599
+ }
81600
+ _super.prototype.render.call(this, renderer);
81601
+ };
81602
+ DChartPlotAreaBase.prototype.getPixelDomain = function (result) {
81603
+ var padding = this.padding;
81604
+ return result.set(padding.getLeft(), this.width - padding.getRight());
81605
+ };
81606
+ DChartPlotAreaBase.prototype.getPixelRange = function (result) {
81607
+ var padding = this.padding;
81608
+ return result.set(this.height - padding.getBottom(), padding.getTop());
81609
+ };
81610
+ DChartPlotAreaBase.prototype.getPixelBounds = function () {
81611
+ var result = this._pixelBounds;
81612
+ result.x = 0;
81613
+ result.y = 0;
81614
+ result.width = this.width;
81615
+ result.height = this.height;
81616
+ return result;
81617
+ };
81618
+ DChartPlotAreaBase.prototype.getAxisBounds = function (position) {
81619
+ return this.getPixelBounds();
81620
+ };
81621
+ DChartPlotAreaBase.prototype.getSelectionBoundsX = function () {
81622
+ return this.getPixelBounds();
81623
+ };
81624
+ DChartPlotAreaBase.prototype.getSelectionBoundsY = function () {
81625
+ return this.getPixelBounds();
81626
+ };
81627
+ DChartPlotAreaBase.prototype.getContainerBounds = function () {
81628
+ var result = this._containerBounds;
81629
+ if (this._isContainerBoundsDirty) {
81630
+ this._isContainerBoundsDirty = false;
81631
+ var container = this.container;
81632
+ container.updateTransform();
81633
+ var transform = container.transform.localTransform;
81634
+ var work = this._workPoint;
81635
+ work.set(0, 0);
81636
+ transform.applyInverse(work, work);
81637
+ result.x = work.x;
81638
+ result.y = work.y;
81639
+ work.set(this.width, this.height);
81640
+ transform.applyInverse(work, work);
81641
+ result.width = work.x - result.x;
81642
+ result.height = work.y - result.y;
81643
+ }
81644
+ return result;
81645
+ };
81646
+ DChartPlotAreaBase.prototype.getType = function () {
81647
+ return "DChartPlotArea";
81648
+ };
81649
+ return DChartPlotAreaBase;
81650
+ }(DBase));
81651
+
81537
81652
  /*
81538
81653
  * Copyright (C) 2019 Toshiba Corporation
81539
81654
  * SPDX-License-Identifier: Apache-2.0
@@ -81810,11 +81925,10 @@ var DChartSeriesStrokeImpl = /** @class */ (function () {
81810
81925
  */
81811
81926
  var DChartSeriesContainerImpl = /** @class */ (function () {
81812
81927
  function DChartSeriesContainerImpl(plotArea, options) {
81813
- var _a;
81814
81928
  this._plotArea = plotArea;
81815
81929
  this._domain = new DChartRegionImpl(NaN, NaN);
81816
81930
  this._range = new DChartRegionImpl(NaN, NaN);
81817
- this._selection = (_a = options === null || options === void 0 ? void 0 : options.selection) !== null && _a !== void 0 ? _a : null;
81931
+ this._selection = null;
81818
81932
  this._fill = new DChartSeriesFillImpl(options === null || options === void 0 ? void 0 : options.fill);
81819
81933
  this._stroke = new DChartSeriesStrokeImpl(options === null || options === void 0 ? void 0 : options.stroke);
81820
81934
  this._size = new DChartSeriesPointImpl(options === null || options === void 0 ? void 0 : options.size);
@@ -81848,6 +81962,9 @@ var DChartSeriesContainerImpl = /** @class */ (function () {
81848
81962
  get: function () {
81849
81963
  return this._selection;
81850
81964
  },
81965
+ set: function (selection) {
81966
+ this._selection = selection;
81967
+ },
81851
81968
  enumerable: false,
81852
81969
  configurable: true
81853
81970
  });
@@ -81996,202 +82113,1108 @@ var DChartSeriesContainerImpl = /** @class */ (function () {
81996
82113
  * Copyright (C) 2019 Toshiba Corporation
81997
82114
  * SPDX-License-Identifier: Apache-2.0
81998
82115
  */
81999
- var DChartPlotAreaImpl = /** @class */ (function (_super) {
82000
- __extends(DChartPlotAreaImpl, _super);
82001
- function DChartPlotAreaImpl(chart, options) {
82002
- var _this = _super.call(this, options) || this;
82003
- _this._chart = chart;
82004
- _this._blendStartTime = 0;
82005
- _this._blendDuration = 1000;
82006
- _this._blendTimeout = null;
82007
- _this._onBlendBound = function () {
82008
- _this.onBlend();
82009
- };
82010
- return _this;
82011
- }
82012
- DChartPlotAreaImpl.prototype.init = function (options) {
82013
- var _this = this;
82116
+ var DChartPlotAreaOnefold = /** @class */ (function (_super) {
82117
+ __extends(DChartPlotAreaOnefold, _super);
82118
+ function DChartPlotAreaOnefold(chart, options) {
82014
82119
  var _a;
82015
- _super.prototype.init.call(this, options);
82016
- this._isBoundsInContainerDirty = true;
82017
- this._boundsInContainer = new pixi_js.Rectangle();
82018
- this._workPoint = new pixi_js.Point();
82120
+ var _this = _super.call(this, chart, options) || this;
82019
82121
  // Container
82020
82122
  var container = new DChartPlotAreaContainer(function () {
82021
82123
  _this._isViewDirty = true;
82022
- _this._isBoundsInContainerDirty = true;
82124
+ _this._isContainerBoundsDirty = true;
82023
82125
  DApplications.update(_this);
82024
82126
  });
82025
- this._container = container;
82026
- this.addChild(container);
82127
+ _this._container = container;
82128
+ _this.addChild(container);
82129
+ // Overflow mask
82130
+ var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : _this.theme.isOverflowMaskEnabled();
82131
+ if (mask) {
82132
+ container.mask = _this.getOverflowMask();
82133
+ }
82027
82134
  // View
82028
- this._isViewDirty = true;
82029
- this._view = new DViewImpl(this, function () { return container; }, options === null || options === void 0 ? void 0 : options.view);
82030
- // Coordinate container
82031
- this._coordinate = new DChartCoordinateContainerImpl(this, options === null || options === void 0 ? void 0 : options.coordinate);
82032
- // Series container
82033
- var series = new DChartSeriesContainerImpl(this, options === null || options === void 0 ? void 0 : options.series);
82034
- this._series = series;
82035
- // Axis container
82036
- var axis = new DChartAxisContainerImpl(this, options === null || options === void 0 ? void 0 : options.axis);
82037
- this._axis = axis;
82038
- this.addChild(axis.container);
82135
+ _this._isViewDirty = true;
82136
+ _this._view = new DViewImpl(_this, function () { return container; }, options === null || options === void 0 ? void 0 : options.view);
82137
+ // Coordinate
82138
+ _this._coordinate = new DChartCoordinateContainerImpl(_this, options === null || options === void 0 ? void 0 : options.coordinate);
82139
+ // Series
82140
+ var seriesOptions = options === null || options === void 0 ? void 0 : options.series;
82141
+ var series = new DChartSeriesContainerImpl(_this, seriesOptions);
82142
+ _this._series = series;
82143
+ // Axis
82144
+ var axisOptions = options === null || options === void 0 ? void 0 : options.axis;
82145
+ var axis = new DChartAxisContainerImpl(_this, new EShapeContainer(), axisOptions);
82146
+ _this._axis = axis;
82147
+ _this.addChild(axis.container);
82148
+ // Add series
82149
+ _this.addSeries(series, seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.list);
82150
+ // Add axes
82151
+ _this.addAxes(axis, axisOptions === null || axisOptions === void 0 ? void 0 : axisOptions.list);
82039
82152
  // Selection
82040
- var selection = series.selection;
82041
- if (selection) {
82153
+ var selection = seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.selection;
82154
+ if (selection != null) {
82155
+ series.selection = selection;
82042
82156
  selection.bind(series);
82043
82157
  }
82044
- // Overflow mask
82045
- var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : this.theme.isOverflowMaskEnabled();
82046
- if (mask) {
82047
- container.mask = this.getOverflowMask();
82158
+ return _this;
82159
+ }
82160
+ DChartPlotAreaOnefold.prototype.getOverflowMask = function () {
82161
+ if (this._overflowMask == null) {
82162
+ this._overflowMask = new DBaseOverflowMask(this);
82163
+ this.reflowable.add(this._overflowMask);
82164
+ this.toDirty();
82048
82165
  }
82049
- // Add series and axes
82050
- if (options != null) {
82051
- // Series
82052
- var s = options.series;
82053
- if (s != null) {
82054
- var list = s.list;
82055
- if (list) {
82056
- var listLength = list.length;
82057
- if (0 < listLength) {
82058
- for (var i = 0; i < listLength; ++i) {
82059
- series.add(list[i]);
82060
- }
82061
- series.update();
82062
- }
82166
+ return this._overflowMask;
82167
+ };
82168
+ DChartPlotAreaOnefold.prototype.addSeries = function (series, list) {
82169
+ if (list != null) {
82170
+ var listLength = list.length;
82171
+ if (0 < listLength) {
82172
+ for (var i = 0; i < listLength; ++i) {
82173
+ series.add(list[i]);
82063
82174
  }
82175
+ series.update();
82064
82176
  }
82065
- // Axes
82066
- var a = options.axis;
82067
- if (a != null) {
82068
- var list = a.list;
82069
- if (list) {
82070
- for (var i = 0, imax = list.length; i < imax; ++i) {
82071
- axis.add(list[i]);
82072
- }
82177
+ }
82178
+ };
82179
+ DChartPlotAreaOnefold.prototype.addAxes = function (axis, list) {
82180
+ if (list != null) {
82181
+ for (var i = 0, imax = list.length; i < imax; ++i) {
82182
+ axis.add(list[i]);
82183
+ }
82184
+ }
82185
+ };
82186
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "coordinate", {
82187
+ get: function () {
82188
+ return this._coordinate;
82189
+ },
82190
+ enumerable: false,
82191
+ configurable: true
82192
+ });
82193
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "series", {
82194
+ get: function () {
82195
+ return this._series;
82196
+ },
82197
+ enumerable: false,
82198
+ configurable: true
82199
+ });
82200
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "container", {
82201
+ get: function () {
82202
+ return this._container;
82203
+ },
82204
+ enumerable: false,
82205
+ configurable: true
82206
+ });
82207
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "axis", {
82208
+ get: function () {
82209
+ return this._axis;
82210
+ },
82211
+ enumerable: false,
82212
+ configurable: true
82213
+ });
82214
+ DChartPlotAreaOnefold.prototype.newView = function (options) {
82215
+ var _this = this;
82216
+ return new DViewImpl(this, function () { return _this._container; }, options === null || options === void 0 ? void 0 : options.view);
82217
+ };
82218
+ DChartPlotAreaOnefold.prototype.onViewDirty = function () {
82219
+ this._coordinate.fit();
82220
+ this._axis.onRender();
82221
+ this._series.onRender();
82222
+ };
82223
+ DChartPlotAreaOnefold.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
82224
+ var coordinate = this._coordinate;
82225
+ var axis = this._axis;
82226
+ var series = this._series;
82227
+ if (duration != null && duration <= 0) {
82228
+ coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
82229
+ axis.update();
82230
+ series.update();
82231
+ }
82232
+ else {
82233
+ this._blendDuration = duration != null ? duration : 200;
82234
+ this._blendStartTime = Date.now();
82235
+ coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
82236
+ var blendTimeout = this._blendTimeout;
82237
+ if (blendTimeout != null) {
82238
+ window.clearTimeout(blendTimeout);
82239
+ }
82240
+ this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
82241
+ }
82242
+ return this;
82243
+ };
82244
+ DChartPlotAreaOnefold.prototype.onBlend = function () {
82245
+ var now = Date.now();
82246
+ var ratio = (now - this._blendStartTime) / this._blendDuration;
82247
+ if (ratio < 1) {
82248
+ this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
82249
+ }
82250
+ else {
82251
+ this._blendTimeout = null;
82252
+ ratio = 1;
82253
+ }
82254
+ this._coordinate.blend(DAnimationTimings.ELASTIC(ratio));
82255
+ this._axis.update();
82256
+ this._series.update();
82257
+ };
82258
+ DChartPlotAreaOnefold.prototype.destroy = function () {
82259
+ this._container.destroy();
82260
+ this._series.destroy();
82261
+ this._axis.destroy();
82262
+ };
82263
+ return DChartPlotAreaOnefold;
82264
+ }(DChartPlotAreaBase));
82265
+
82266
+ /*
82267
+ * Copyright (C) 2019 Toshiba Corporation
82268
+ * SPDX-License-Identifier: Apache-2.0
82269
+ */
82270
+ var DChartPlotAreaTwofoldAxisContainer = /** @class */ (function () {
82271
+ function DChartPlotAreaTwofoldAxisContainer(plotArea, container, primary, secondary) {
82272
+ this._plotArea = plotArea;
82273
+ this._container = container;
82274
+ this._list = new Map();
82275
+ this._primary = primary;
82276
+ this._secondary = secondary;
82277
+ }
82278
+ Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "container", {
82279
+ get: function () {
82280
+ return this._container;
82281
+ },
82282
+ enumerable: false,
82283
+ configurable: true
82284
+ });
82285
+ Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "plotArea", {
82286
+ get: function () {
82287
+ return this._plotArea;
82288
+ },
82289
+ enumerable: false,
82290
+ configurable: true
82291
+ });
82292
+ DChartPlotAreaTwofoldAxisContainer.prototype.add = function (axis) {
82293
+ var list = this._list;
82294
+ var axes = list.get(axis.position);
82295
+ if (axes == null) {
82296
+ axes = [];
82297
+ list.set(axis.position, axes);
82298
+ }
82299
+ axes.push(axis);
82300
+ axis.bind(this, axes.length - 1);
82301
+ };
82302
+ DChartPlotAreaTwofoldAxisContainer.prototype.get = function (position, index) {
82303
+ var primary = this._primary;
82304
+ var primarySize = primary.size(position);
82305
+ if (0 <= index && index < primarySize) {
82306
+ return primary.get(position, index);
82307
+ }
82308
+ var secondary = this._secondary;
82309
+ var secondarySize = secondary.size(position);
82310
+ if (primarySize <= index && index < primarySize + secondarySize) {
82311
+ return secondary.get(position, index);
82312
+ }
82313
+ var list = this._list;
82314
+ var axes = list.get(toEnum(position, DChartAxisPosition));
82315
+ if (axes) {
82316
+ if (primarySize + secondarySize <= index &&
82317
+ index < primarySize + secondarySize + axes.length) {
82318
+ return axes[index - primarySize - secondarySize];
82319
+ }
82320
+ }
82321
+ return null;
82322
+ };
82323
+ DChartPlotAreaTwofoldAxisContainer.prototype.indexOf = function (axis) {
82324
+ var primary = this._primary;
82325
+ var result = primary.indexOf(axis);
82326
+ if (0 <= result) {
82327
+ return result;
82328
+ }
82329
+ result = this._secondary.indexOf(axis);
82330
+ if (0 <= result) {
82331
+ return primary.size(axis.position) + result;
82332
+ }
82333
+ var list = this._list;
82334
+ var axes = list.get(axis.position);
82335
+ if (axes) {
82336
+ return axes.indexOf(axis);
82337
+ }
82338
+ return -1;
82339
+ };
82340
+ DChartPlotAreaTwofoldAxisContainer.prototype.clear = function (position) {
82341
+ this._primary.clear(position);
82342
+ this._secondary.clear(position);
82343
+ var list = this._list;
82344
+ var axes = list.get(toEnum(position, DChartAxisPosition));
82345
+ if (axes) {
82346
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82347
+ axes[i].destroy();
82348
+ }
82349
+ axes.length = 0;
82350
+ }
82351
+ return this;
82352
+ };
82353
+ DChartPlotAreaTwofoldAxisContainer.prototype.size = function (position) {
82354
+ var list = this._list;
82355
+ var axes = list.get(toEnum(position, DChartAxisPosition));
82356
+ return (this._primary.size(position) +
82357
+ this._secondary.size(position) +
82358
+ (axes != null ? axes.length : 0));
82359
+ };
82360
+ DChartPlotAreaTwofoldAxisContainer.prototype.update = function () {
82361
+ this._primary.update();
82362
+ this._secondary.update();
82363
+ this._list.forEach(function (axes) {
82364
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82365
+ axes[i].update();
82366
+ }
82367
+ });
82368
+ };
82369
+ DChartPlotAreaTwofoldAxisContainer.prototype.onRender = function () {
82370
+ this._primary.onRender();
82371
+ this._secondary.onRender();
82372
+ this._list.forEach(function (axes) {
82373
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82374
+ axes[i].onRender();
82375
+ }
82376
+ });
82377
+ };
82378
+ DChartPlotAreaTwofoldAxisContainer.prototype.destroy = function () {
82379
+ this._primary.destroy();
82380
+ this._secondary.destroy();
82381
+ this._list.forEach(function (axes) {
82382
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82383
+ axes[i].destroy();
82384
+ }
82385
+ axes.length = 0;
82386
+ });
82387
+ };
82388
+ return DChartPlotAreaTwofoldAxisContainer;
82389
+ }());
82390
+
82391
+ /*
82392
+ * Copyright (C) 2019 Toshiba Corporation
82393
+ * SPDX-License-Identifier: Apache-2.0
82394
+ */
82395
+ var DChartPlotAreaTwofoldCoorinateContainerSub = /** @class */ (function () {
82396
+ function DChartPlotAreaTwofoldCoorinateContainerSub(container, primary, secondary) {
82397
+ this._container = container;
82398
+ this._primary = primary;
82399
+ this._secondary = secondary;
82400
+ }
82401
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainerSub.prototype, "container", {
82402
+ get: function () {
82403
+ return this._container;
82404
+ },
82405
+ enumerable: false,
82406
+ configurable: true
82407
+ });
82408
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.add = function (coordinate, index) {
82409
+ if (index != null) {
82410
+ var primary = this._primary;
82411
+ var primarySize = primary.size();
82412
+ if (index < primarySize) {
82413
+ if (0 <= index) {
82414
+ primary.add(coordinate, index);
82073
82415
  }
82074
82416
  }
82417
+ else {
82418
+ this._secondary.add(coordinate, index - primarySize);
82419
+ }
82420
+ return this;
82075
82421
  }
82422
+ else {
82423
+ this._secondary.add(coordinate);
82424
+ }
82425
+ return this;
82076
82426
  };
82077
- DChartPlotAreaImpl.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
82078
- this._isViewDirty = true;
82079
- this._isBoundsInContainerDirty = true;
82080
- _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
82427
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.get = function (index) {
82428
+ var primary = this._primary;
82429
+ var primarySize = primary.size();
82430
+ if (0 <= index && index < primarySize) {
82431
+ return primary.get(index);
82432
+ }
82433
+ var secondary = this._secondary;
82434
+ var secondarySize = secondary.size();
82435
+ if (primarySize <= index && index < primarySize + secondarySize) {
82436
+ secondary.get(index - primarySize);
82437
+ }
82438
+ return null;
82081
82439
  };
82082
- DChartPlotAreaImpl.prototype.getOverflowMask = function () {
82083
- if (this._overflowMask == null) {
82084
- this._overflowMask = new DBaseOverflowMask(this);
82085
- this.reflowable.add(this._overflowMask);
82086
- this.toDirty();
82440
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.indexOf = function (coordinate) {
82441
+ var result = this._primary.indexOf(coordinate);
82442
+ if (0 <= result) {
82443
+ return result;
82087
82444
  }
82088
- return this._overflowMask;
82445
+ result = this._secondary.indexOf(coordinate);
82446
+ if (0 <= result) {
82447
+ return this._primary.size() + result;
82448
+ }
82449
+ return -1;
82089
82450
  };
82090
- Object.defineProperty(DChartPlotAreaImpl.prototype, "chart", {
82451
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.remove = function (coordinateOrIndex) {
82452
+ if (isNumber(coordinateOrIndex)) {
82453
+ var index = coordinateOrIndex;
82454
+ var primary = this._primary;
82455
+ var primarySize = primary.size();
82456
+ if (0 <= index && index < primarySize) {
82457
+ return primary.remove(index);
82458
+ }
82459
+ var secondary = this._secondary;
82460
+ var secondarySize = secondary.size();
82461
+ if (primarySize <= index && index < primarySize + secondarySize) {
82462
+ secondary.remove(index - primarySize);
82463
+ }
82464
+ }
82465
+ else {
82466
+ var coordinate = coordinateOrIndex;
82467
+ var result = this._primary.remove(coordinate);
82468
+ if (result != null) {
82469
+ return result;
82470
+ }
82471
+ result = this._secondary.remove(coordinate);
82472
+ if (result != null) {
82473
+ return result;
82474
+ }
82475
+ }
82476
+ return null;
82477
+ };
82478
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.clear = function () {
82479
+ this._primary.clear();
82480
+ this._secondary.clear();
82481
+ return this;
82482
+ };
82483
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.destroy = function () {
82484
+ return this.clear();
82485
+ };
82486
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.size = function () {
82487
+ return this._primary.size() + this._secondary.size();
82488
+ };
82489
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.fit = function (from, to) {
82490
+ this._primary.fit(from, to);
82491
+ this._secondary.fit(from, to);
82492
+ return this;
82493
+ };
82494
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.mark = function (from, to) {
82495
+ this._primary.mark(from, to);
82496
+ this._secondary.mark(from, to);
82497
+ return this;
82498
+ };
82499
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.blend = function (ratio) {
82500
+ this._primary.blend(ratio);
82501
+ this._secondary.blend(ratio);
82502
+ return this;
82503
+ };
82504
+ return DChartPlotAreaTwofoldCoorinateContainerSub;
82505
+ }());
82506
+
82507
+ /*
82508
+ * Copyright (C) 2019 Toshiba Corporation
82509
+ * SPDX-License-Identifier: Apache-2.0
82510
+ */
82511
+ var DChartPlotAreaTwofoldCoorinateContainer = /** @class */ (function () {
82512
+ function DChartPlotAreaTwofoldCoorinateContainer(plotArea, primary, secondary) {
82513
+ this._plotArea = plotArea;
82514
+ this._primary = primary;
82515
+ this._secondary = secondary;
82516
+ this._x = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.x, secondary.x);
82517
+ this._y = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.y, secondary.y);
82518
+ }
82519
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "x", {
82091
82520
  get: function () {
82092
- return this._chart;
82521
+ return this._x;
82093
82522
  },
82094
82523
  enumerable: false,
82095
82524
  configurable: true
82096
82525
  });
82097
- Object.defineProperty(DChartPlotAreaImpl.prototype, "coordinate", {
82526
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "y", {
82098
82527
  get: function () {
82099
- return this._coordinate;
82528
+ return this._y;
82100
82529
  },
82101
82530
  enumerable: false,
82102
82531
  configurable: true
82103
82532
  });
82104
- Object.defineProperty(DChartPlotAreaImpl.prototype, "series", {
82533
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "plotArea", {
82105
82534
  get: function () {
82106
- return this._series;
82535
+ return this._plotArea;
82107
82536
  },
82108
82537
  enumerable: false,
82109
82538
  configurable: true
82110
82539
  });
82111
- Object.defineProperty(DChartPlotAreaImpl.prototype, "container", {
82540
+ DChartPlotAreaTwofoldCoorinateContainer.prototype.fit = function (domainFrom, domainTo, rangeFrom, rangeTo) {
82541
+ this._x.fit(domainFrom, domainTo);
82542
+ this._y.fit(rangeFrom, rangeTo);
82543
+ return this;
82544
+ };
82545
+ DChartPlotAreaTwofoldCoorinateContainer.prototype.mark = function (domainFrom, domainTo, rangeFrom, rangeTo) {
82546
+ this._x.mark(domainFrom, domainTo);
82547
+ this._y.mark(rangeFrom, rangeTo);
82548
+ return this;
82549
+ };
82550
+ DChartPlotAreaTwofoldCoorinateContainer.prototype.blend = function (ratio) {
82551
+ this._x.blend(ratio);
82552
+ this._y.blend(ratio);
82553
+ return this;
82554
+ };
82555
+ return DChartPlotAreaTwofoldCoorinateContainer;
82556
+ }());
82557
+
82558
+ /*
82559
+ * Copyright (C) 2019 Toshiba Corporation
82560
+ * SPDX-License-Identifier: Apache-2.0
82561
+ */
82562
+ var DChartPlotAreaTwofoldOverflowMaskPrimary = /** @class */ (function (_super) {
82563
+ __extends(DChartPlotAreaTwofoldOverflowMaskPrimary, _super);
82564
+ function DChartPlotAreaTwofoldOverflowMaskPrimary() {
82565
+ return _super !== null && _super.apply(this, arguments) || this;
82566
+ }
82567
+ DChartPlotAreaTwofoldOverflowMaskPrimary.prototype.onReflow = function (base, width, height) {
82568
+ if (this._isInitialized && this._width === width && this._height === height) {
82569
+ return;
82570
+ }
82571
+ this._isInitialized = true;
82572
+ this._width = width;
82573
+ this._height = height;
82574
+ var hh = height * 0.5;
82575
+ this.clear();
82576
+ this.beginFill(0xffffff, 1);
82577
+ this.drawRect(0, 0, width, hh);
82578
+ this.endFill();
82579
+ };
82580
+ return DChartPlotAreaTwofoldOverflowMaskPrimary;
82581
+ }(DBaseOverflowMaskSimple));
82582
+
82583
+ /*
82584
+ * Copyright (C) 2019 Toshiba Corporation
82585
+ * SPDX-License-Identifier: Apache-2.0
82586
+ */
82587
+ var DChartPlotAreaTwofoldOverflowMaskSecondary = /** @class */ (function (_super) {
82588
+ __extends(DChartPlotAreaTwofoldOverflowMaskSecondary, _super);
82589
+ function DChartPlotAreaTwofoldOverflowMaskSecondary() {
82590
+ return _super !== null && _super.apply(this, arguments) || this;
82591
+ }
82592
+ DChartPlotAreaTwofoldOverflowMaskSecondary.prototype.onReflow = function (base, width, height) {
82593
+ if (this._isInitialized && this._width === width && this._height === height) {
82594
+ return;
82595
+ }
82596
+ this._isInitialized = true;
82597
+ this._width = width;
82598
+ this._height = height;
82599
+ var hh = height * 0.5;
82600
+ this.clear();
82601
+ this.beginFill(0xffffff, 1);
82602
+ this.drawRect(0, hh, width, hh);
82603
+ this.endFill();
82604
+ };
82605
+ return DChartPlotAreaTwofoldOverflowMaskSecondary;
82606
+ }(DBaseOverflowMaskSimple));
82607
+
82608
+ /*
82609
+ * Copyright (C) 2019 Toshiba Corporation
82610
+ * SPDX-License-Identifier: Apache-2.0
82611
+ */
82612
+ var DChartPlotAreaTwofoldSeriesContainer = /** @class */ (function () {
82613
+ function DChartPlotAreaTwofoldSeriesContainer(plotArea, primary, secondary) {
82614
+ this._plotArea = plotArea;
82615
+ this._primary = primary;
82616
+ this._secondary = secondary;
82617
+ this._domain = new DChartRegionImpl(NaN, NaN);
82618
+ this._range = new DChartRegionImpl(NaN, NaN);
82619
+ }
82620
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newFill = function (index, options) {
82621
+ return this._secondary.newFill(index, options);
82622
+ };
82623
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newStroke = function (index, options) {
82624
+ return this._secondary.newStroke(index, options);
82625
+ };
82626
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newSize = function (index, options, x, y) {
82627
+ return this._secondary.newSize(index, options, x, y);
82628
+ };
82629
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newOffset = function (index, options, x, y) {
82630
+ return this._secondary.newOffset(index, options, x, y);
82631
+ };
82632
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newPadding = function (index, options) {
82633
+ return this._secondary.newPadding(index, options);
82634
+ };
82635
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "plotArea", {
82636
+ get: function () {
82637
+ return this._plotArea;
82638
+ },
82639
+ enumerable: false,
82640
+ configurable: true
82641
+ });
82642
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "selection", {
82643
+ get: function () {
82644
+ return this._secondary.selection;
82645
+ },
82646
+ enumerable: false,
82647
+ configurable: true
82648
+ });
82649
+ DChartPlotAreaTwofoldSeriesContainer.prototype.update = function () {
82650
+ this._primary.update();
82651
+ this._secondary.update();
82652
+ var selection = this._secondary.selection;
82653
+ if (selection) {
82654
+ selection.update();
82655
+ }
82656
+ };
82657
+ DChartPlotAreaTwofoldSeriesContainer.prototype.onRender = function () {
82658
+ this._primary.onRender();
82659
+ this._secondary.onRender();
82660
+ var selection = this._secondary.selection;
82661
+ if (selection) {
82662
+ selection.onRender();
82663
+ }
82664
+ };
82665
+ DChartPlotAreaTwofoldSeriesContainer.prototype.add = function (series) {
82666
+ this._secondary.add(series);
82667
+ };
82668
+ DChartPlotAreaTwofoldSeriesContainer.prototype.get = function (index) {
82669
+ var primary = this._primary;
82670
+ var primarySize = primary.size();
82671
+ if (0 <= index && index < primarySize) {
82672
+ return primary.get(index);
82673
+ }
82674
+ var secondary = this._secondary;
82675
+ var secondarySize = secondary.size();
82676
+ if (primarySize <= index && index < primarySize + secondarySize) {
82677
+ return secondary.get(index - primarySize);
82678
+ }
82679
+ return null;
82680
+ };
82681
+ DChartPlotAreaTwofoldSeriesContainer.prototype.indexOf = function (series) {
82682
+ var primary = this._primary;
82683
+ var result = primary.indexOf(series);
82684
+ if (0 <= result) {
82685
+ return result;
82686
+ }
82687
+ result = this._secondary.indexOf(series);
82688
+ if (0 <= result) {
82689
+ return primary.size() + result;
82690
+ }
82691
+ return -1;
82692
+ };
82693
+ DChartPlotAreaTwofoldSeriesContainer.prototype.clear = function () {
82694
+ this._primary.clear();
82695
+ this._secondary.clear();
82696
+ return this;
82697
+ };
82698
+ DChartPlotAreaTwofoldSeriesContainer.prototype.size = function () {
82699
+ return this._primary.size() + this._secondary.size();
82700
+ };
82701
+ DChartPlotAreaTwofoldSeriesContainer.prototype.destroy = function () {
82702
+ this.clear();
82703
+ var selection = this._secondary.selection;
82704
+ if (selection) {
82705
+ selection.unbind();
82706
+ }
82707
+ };
82708
+ DChartPlotAreaTwofoldSeriesContainer.prototype.getDomain = function (coordinate, result) {
82709
+ this._primary.getDomain(coordinate, result);
82710
+ var from = result.from;
82711
+ var to = result.to;
82712
+ this._secondary.getDomain(coordinate, result);
82713
+ result.add(from, to);
82714
+ return result;
82715
+ };
82716
+ DChartPlotAreaTwofoldSeriesContainer.prototype.getRange = function (coordinate, result) {
82717
+ result.clear();
82718
+ this._primary.getRange(coordinate, result);
82719
+ var from = result.from;
82720
+ var to = result.to;
82721
+ this._secondary.getRange(coordinate, result);
82722
+ result.add(from, to);
82723
+ return result;
82724
+ };
82725
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "domain", {
82726
+ get: function () {
82727
+ var result = this._domain;
82728
+ result.clear();
82729
+ var pdomain = this._primary.domain;
82730
+ result.add(pdomain.from, pdomain.to);
82731
+ var sdomain = this._secondary.domain;
82732
+ result.add(sdomain.from, sdomain.to);
82733
+ return result;
82734
+ },
82735
+ enumerable: false,
82736
+ configurable: true
82737
+ });
82738
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "range", {
82739
+ get: function () {
82740
+ var result = this._domain;
82741
+ result.clear();
82742
+ var prange = this._primary.range;
82743
+ result.add(prange.from, prange.to);
82744
+ var srange = this._secondary.range;
82745
+ result.add(srange.from, srange.to);
82746
+ return result;
82747
+ },
82748
+ enumerable: false,
82749
+ configurable: true
82750
+ });
82751
+ DChartPlotAreaTwofoldSeriesContainer.prototype.hitTest = function (x, y) {
82752
+ var result = this._secondary.hitTest(x, y);
82753
+ if (result != null) {
82754
+ return result;
82755
+ }
82756
+ return this._primary.hitTest(x, y);
82757
+ };
82758
+ DChartPlotAreaTwofoldSeriesContainer.prototype.calcHitPoint = function (x, y, result) {
82759
+ var _a;
82760
+ var result1 = result;
82761
+ var result2 = ((_a = DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT) !== null && _a !== void 0 ? _a : (DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT = new DChartSeriesHitResult()));
82762
+ var series2 = this._secondary.calcHitPoint(x, y, result2);
82763
+ var series1 = this._primary.calcHitPoint(x, y, result1);
82764
+ if (series1 != null) {
82765
+ if (series2 != null) {
82766
+ if (result1.distance <= result2.distance) {
82767
+ return series1;
82768
+ }
82769
+ else {
82770
+ result1.copyFrom(result2);
82771
+ return series2;
82772
+ }
82773
+ }
82774
+ else {
82775
+ return series1;
82776
+ }
82777
+ }
82778
+ else {
82779
+ if (series2 != null) {
82780
+ result1.copyFrom(result2);
82781
+ return series2;
82782
+ }
82783
+ else {
82784
+ return null;
82785
+ }
82786
+ }
82787
+ };
82788
+ return DChartPlotAreaTwofoldSeriesContainer;
82789
+ }());
82790
+
82791
+ /*
82792
+ * Copyright (C) 2019 Toshiba Corporation
82793
+ * SPDX-License-Identifier: Apache-2.0
82794
+ */
82795
+ var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
82796
+ function DChartPlotAreaTwofoldSubBase(plotArea, onContainerChange, mask, margin, axisShapeContainer, options) {
82797
+ this._isContainerBoundsDirty = true;
82798
+ this._containerBounds = new pixi_js.Rectangle();
82799
+ this._workPoint = new pixi_js.Point();
82800
+ this._margin = margin;
82801
+ this._plotArea = plotArea;
82802
+ // Container
82803
+ var container = new DChartPlotAreaContainer(onContainerChange);
82804
+ this._container = container;
82805
+ // Coordinate
82806
+ this._coordinate = new DChartCoordinateContainerImpl(this, options === null || options === void 0 ? void 0 : options.coordinate);
82807
+ // Overflow mask
82808
+ if (mask) {
82809
+ container.mask = this.getOverflowMask();
82810
+ }
82811
+ // Series
82812
+ this._series = new DChartSeriesContainerImpl(this, options === null || options === void 0 ? void 0 : options.series);
82813
+ // Axis
82814
+ this._axis = new DChartAxisContainerImpl(this, axisShapeContainer, options === null || options === void 0 ? void 0 : options.axis);
82815
+ }
82816
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "plotArea", {
82817
+ get: function () {
82818
+ return this._plotArea;
82819
+ },
82820
+ enumerable: false,
82821
+ configurable: true
82822
+ });
82823
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "chart", {
82824
+ get: function () {
82825
+ return this._plotArea.chart;
82826
+ },
82827
+ enumerable: false,
82828
+ configurable: true
82829
+ });
82830
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "container", {
82112
82831
  get: function () {
82113
82832
  return this._container;
82114
82833
  },
82115
82834
  enumerable: false,
82116
82835
  configurable: true
82117
82836
  });
82118
- Object.defineProperty(DChartPlotAreaImpl.prototype, "axis", {
82837
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "series", {
82119
82838
  get: function () {
82120
- return this._axis;
82839
+ return this._series;
82121
82840
  },
82122
82841
  enumerable: false,
82123
82842
  configurable: true
82124
82843
  });
82125
- Object.defineProperty(DChartPlotAreaImpl.prototype, "view", {
82844
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "coordinate", {
82126
82845
  get: function () {
82127
- return this._view;
82846
+ return this._coordinate;
82128
82847
  },
82129
82848
  enumerable: false,
82130
82849
  configurable: true
82131
82850
  });
82132
- DChartPlotAreaImpl.prototype.onWheel = function (e, deltas, global) {
82133
- var vresult = this._view.onWheel(e, deltas, global);
82134
- var sresult = _super.prototype.onWheel.call(this, e, deltas, global);
82135
- return vresult || sresult;
82851
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "axis", {
82852
+ get: function () {
82853
+ return this._axis;
82854
+ },
82855
+ enumerable: false,
82856
+ configurable: true
82857
+ });
82858
+ // eslint-disable-next-line @typescript-eslint/ban-types
82859
+ DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
82860
+ this._plotArea.on(name, callback, context);
82861
+ return this;
82136
82862
  };
82137
- DChartPlotAreaImpl.prototype.onDblClick = function (e, interactionManager) {
82138
- var vresult = this._view.onDblClick(e, interactionManager);
82139
- var sresult = _super.prototype.onDblClick.call(this, e, interactionManager);
82140
- return vresult || sresult;
82863
+ // eslint-disable-next-line @typescript-eslint/ban-types
82864
+ DChartPlotAreaTwofoldSubBase.prototype.off = function (name, callback, context) {
82865
+ this._plotArea.off(name, callback, context);
82866
+ return this;
82141
82867
  };
82142
- DChartPlotAreaImpl.prototype.onDown = function (e) {
82143
- this._view.onDown(e);
82144
- _super.prototype.onDown.call(this, e);
82868
+ DChartPlotAreaTwofoldSubBase.prototype.getPixelDomain = function (result) {
82869
+ var plotArea = this._plotArea;
82870
+ var padding = plotArea.padding;
82871
+ var width = plotArea.width;
82872
+ return result.set(padding.getLeft(), width - padding.getRight());
82145
82873
  };
82146
- DChartPlotAreaImpl.prototype.render = function (renderer) {
82147
- if (this._isViewDirty) {
82148
- this._isViewDirty = false;
82149
- this._coordinate.fit();
82150
- this._axis.onRender();
82151
- this._series.onRender();
82152
- }
82153
- _super.prototype.render.call(this, renderer);
82874
+ DChartPlotAreaTwofoldSubBase.prototype.getAxisBounds = function (position) {
82875
+ return this.getPixelBounds();
82876
+ };
82877
+ DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsX = function () {
82878
+ return this.getPixelBounds();
82154
82879
  };
82155
- DChartPlotAreaImpl.prototype.destroy = function () {
82880
+ DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsY = function () {
82881
+ return this.getPixelBounds();
82882
+ };
82883
+ DChartPlotAreaTwofoldSubBase.prototype.toBoundsDirty = function () {
82884
+ this._isContainerBoundsDirty = true;
82885
+ };
82886
+ DChartPlotAreaTwofoldSubBase.prototype.destroy = function () {
82156
82887
  this._container.destroy();
82157
82888
  this._series.destroy();
82158
82889
  this._axis.destroy();
82159
82890
  };
82160
- DChartPlotAreaImpl.prototype.getType = function () {
82161
- return "DChartPlotArea";
82891
+ return DChartPlotAreaTwofoldSubBase;
82892
+ }());
82893
+
82894
+ /*
82895
+ * Copyright (C) 2019 Toshiba Corporation
82896
+ * SPDX-License-Identifier: Apache-2.0
82897
+ */
82898
+ var DChartPlotAreaTwofoldSubPrimary = /** @class */ (function (_super) {
82899
+ __extends(DChartPlotAreaTwofoldSubPrimary, _super);
82900
+ function DChartPlotAreaTwofoldSubPrimary() {
82901
+ return _super !== null && _super.apply(this, arguments) || this;
82902
+ }
82903
+ DChartPlotAreaTwofoldSubPrimary.prototype.getOverflowMask = function () {
82904
+ if (this._overflowMask == null) {
82905
+ var plotArea = this._plotArea;
82906
+ this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskPrimary(plotArea);
82907
+ plotArea.reflowable.add(this._overflowMask);
82908
+ plotArea.toDirty();
82909
+ }
82910
+ return this._overflowMask;
82162
82911
  };
82163
- DChartPlotAreaImpl.prototype.getBoundsInContainer = function () {
82164
- var result = this._boundsInContainer;
82165
- if (this._isBoundsInContainerDirty) {
82166
- this._isBoundsInContainerDirty = false;
82167
- var container = this.container;
82168
- container.updateTransform();
82169
- var transform = container.transform.localTransform;
82170
- var work = this._workPoint;
82171
- work.set(0, 0);
82172
- transform.applyInverse(work, work);
82173
- result.x = work.x;
82174
- result.y = work.y;
82175
- work.set(this.width, this.height);
82176
- transform.applyInverse(work, work);
82177
- result.width = work.x - result.x;
82178
- result.height = work.y - result.y;
82912
+ DChartPlotAreaTwofoldSubPrimary.prototype.getPixelRange = function (result) {
82913
+ var plotArea = this._plotArea;
82914
+ var padding = plotArea.padding;
82915
+ var paddingTop = padding.getTop();
82916
+ var height = plotArea.height;
82917
+ return result.set((height - this._margin) * 0.5, paddingTop);
82918
+ };
82919
+ DChartPlotAreaTwofoldSubPrimary.prototype.getPixelBounds = function () {
82920
+ var result = this._plotArea.getPixelBounds();
82921
+ result.height *= 0.5;
82922
+ return result;
82923
+ };
82924
+ DChartPlotAreaTwofoldSubPrimary.prototype.getContainerBounds = function () {
82925
+ var result = this._containerBounds;
82926
+ if (this._isContainerBoundsDirty) {
82927
+ this._isContainerBoundsDirty = false;
82928
+ var bounds = this._plotArea.getContainerBounds();
82929
+ result.width = bounds.width;
82930
+ result.height = bounds.height * 0.5;
82931
+ result.x = bounds.x;
82932
+ result.y = bounds.y;
82179
82933
  }
82180
82934
  return result;
82181
82935
  };
82182
- DChartPlotAreaImpl.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
82183
- var coordinate = this._coordinate;
82184
- var axis = this._axis;
82185
- var series = this._series;
82936
+ return DChartPlotAreaTwofoldSubPrimary;
82937
+ }(DChartPlotAreaTwofoldSubBase));
82938
+
82939
+ /*
82940
+ * Copyright (C) 2019 Toshiba Corporation
82941
+ * SPDX-License-Identifier: Apache-2.0
82942
+ */
82943
+ var DChartPlotAreaTwofoldSubSecondary = /** @class */ (function (_super) {
82944
+ __extends(DChartPlotAreaTwofoldSubSecondary, _super);
82945
+ function DChartPlotAreaTwofoldSubSecondary() {
82946
+ return _super !== null && _super.apply(this, arguments) || this;
82947
+ }
82948
+ DChartPlotAreaTwofoldSubSecondary.prototype.getOverflowMask = function () {
82949
+ if (this._overflowMask == null) {
82950
+ var plotArea = this._plotArea;
82951
+ this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskSecondary(plotArea);
82952
+ plotArea.reflowable.add(this._overflowMask);
82953
+ plotArea.toDirty();
82954
+ }
82955
+ return this._overflowMask;
82956
+ };
82957
+ DChartPlotAreaTwofoldSubSecondary.prototype.getPixelRange = function (result) {
82958
+ var plotArea = this._plotArea;
82959
+ var padding = plotArea.padding;
82960
+ var paddingBottom = padding.getBottom();
82961
+ var height = plotArea.height;
82962
+ return result.set(height - paddingBottom, (height + this._margin) * 0.5);
82963
+ };
82964
+ DChartPlotAreaTwofoldSubSecondary.prototype.getPixelBounds = function () {
82965
+ var result = this._plotArea.getPixelBounds();
82966
+ result.height *= 0.5;
82967
+ result.y = result.height;
82968
+ return result;
82969
+ };
82970
+ DChartPlotAreaTwofoldSubSecondary.prototype.getContainerBounds = function () {
82971
+ var result = this._containerBounds;
82972
+ if (this._isContainerBoundsDirty) {
82973
+ this._isContainerBoundsDirty = false;
82974
+ var bounds = this._plotArea.getContainerBounds();
82975
+ result.width = bounds.width;
82976
+ result.height = bounds.height * 0.5;
82977
+ result.x = bounds.x;
82978
+ result.y = bounds.y + result.height;
82979
+ }
82980
+ return result;
82981
+ };
82982
+ return DChartPlotAreaTwofoldSubSecondary;
82983
+ }(DChartPlotAreaTwofoldSubBase));
82984
+
82985
+ var DChartPlotAreaTwofoldViewTargetPoint = /** @class */ (function () {
82986
+ function DChartPlotAreaTwofoldViewTargetPoint(primary, secondary) {
82987
+ this._primary = primary;
82988
+ this._secondary = secondary;
82989
+ }
82990
+ Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "x", {
82991
+ get: function () {
82992
+ return this._secondary.x;
82993
+ },
82994
+ set: function (x) {
82995
+ this._primary.x = x;
82996
+ this._secondary.x = x;
82997
+ },
82998
+ enumerable: false,
82999
+ configurable: true
83000
+ });
83001
+ Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "y", {
83002
+ get: function () {
83003
+ return this._secondary.y;
83004
+ },
83005
+ set: function (y) {
83006
+ this._primary.y = y;
83007
+ this._secondary.y = y;
83008
+ },
83009
+ enumerable: false,
83010
+ configurable: true
83011
+ });
83012
+ DChartPlotAreaTwofoldViewTargetPoint.prototype.set = function (x, y) {
83013
+ this._primary.set(x, y);
83014
+ this._secondary.set(x, y);
83015
+ return this;
83016
+ };
83017
+ return DChartPlotAreaTwofoldViewTargetPoint;
83018
+ }());
83019
+ var DChartPlotAreaTwofoldViewTarget = /** @class */ (function () {
83020
+ function DChartPlotAreaTwofoldViewTarget(primary, secondary) {
83021
+ this._primary = primary;
83022
+ this._secondary = secondary;
83023
+ this._scale = new DChartPlotAreaTwofoldViewTargetPoint(primary.scale, secondary.scale);
83024
+ this._position = new DChartPlotAreaTwofoldViewTargetPoint(primary.position, secondary.position);
83025
+ }
83026
+ Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "scale", {
83027
+ get: function () {
83028
+ return this._scale;
83029
+ },
83030
+ enumerable: false,
83031
+ configurable: true
83032
+ });
83033
+ Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "position", {
83034
+ get: function () {
83035
+ return this._position;
83036
+ },
83037
+ enumerable: false,
83038
+ configurable: true
83039
+ });
83040
+ DChartPlotAreaTwofoldViewTarget.prototype.getLocalBounds = function (rect) {
83041
+ this._primary.getLocalBounds(rect);
83042
+ var x1 = rect.x;
83043
+ var y1 = rect.y;
83044
+ var w1 = rect.width;
83045
+ var h1 = rect.height;
83046
+ this._secondary.getLocalBounds(rect);
83047
+ var x2 = rect.x;
83048
+ var y2 = rect.y;
83049
+ var w2 = rect.width;
83050
+ var h2 = rect.height;
83051
+ var x3 = Math.min(x1, x2);
83052
+ var y3 = Math.min(y1, y2);
83053
+ var x4 = Math.max(x1 + w1, x2 + w2);
83054
+ var y4 = Math.max(y1 + h1, y2 + h2);
83055
+ rect.x = x3;
83056
+ rect.y = y3;
83057
+ rect.width = x4 - x3;
83058
+ rect.height = y4 - y3;
83059
+ return rect;
83060
+ };
83061
+ return DChartPlotAreaTwofoldViewTarget;
83062
+ }());
83063
+
83064
+ /*
83065
+ * Copyright (C) 2019 Toshiba Corporation
83066
+ * SPDX-License-Identifier: Apache-2.0
83067
+ */
83068
+ var DChartPlotAreaTwofold = /** @class */ (function (_super) {
83069
+ __extends(DChartPlotAreaTwofold, _super);
83070
+ function DChartPlotAreaTwofold(chart, options) {
83071
+ var _a, _b, _c, _d, _e, _f, _g;
83072
+ var _this = _super.call(this, chart, options) || this;
83073
+ // Margin
83074
+ var theme = _this.theme;
83075
+ var margin = (_a = options === null || options === void 0 ? void 0 : options.margin) !== null && _a !== void 0 ? _a : theme.getMargin();
83076
+ _this._margin = margin;
83077
+ // Primary
83078
+ var axisShapeContainer = new EShapeContainer();
83079
+ var onContainerChangeBound = function () {
83080
+ _this.onContainerChange();
83081
+ };
83082
+ var mask = (_b = options === null || options === void 0 ? void 0 : options.mask) !== null && _b !== void 0 ? _b : theme.isOverflowMaskEnabled();
83083
+ var primaryOptions = options === null || options === void 0 ? void 0 : options.primary;
83084
+ var primary = new DChartPlotAreaTwofoldSubPrimary(_this, onContainerChangeBound, mask, margin, axisShapeContainer, primaryOptions);
83085
+ _this._primary = primary;
83086
+ // Secondary
83087
+ var secondaryOptions = options === null || options === void 0 ? void 0 : options.secondary;
83088
+ var secondary = new DChartPlotAreaTwofoldSubSecondary(_this, onContainerChangeBound, mask, margin, axisShapeContainer, secondaryOptions);
83089
+ _this._secondary = secondary;
83090
+ // Container
83091
+ _this.addChild(primary.container);
83092
+ _this.addChild(secondary.container);
83093
+ // Coordinate
83094
+ _this._coordinate = new DChartPlotAreaTwofoldCoorinateContainer(_this, primary.coordinate, secondary.coordinate);
83095
+ // Series
83096
+ var primarySeries = primary.series;
83097
+ var secondarySeries = secondary.series;
83098
+ var series = new DChartPlotAreaTwofoldSeriesContainer(_this, primarySeries, secondarySeries);
83099
+ _this._series = series;
83100
+ // Axis
83101
+ var primaryAxis = primary.axis;
83102
+ var secondaryAxis = secondary.axis;
83103
+ _this.addChild(axisShapeContainer);
83104
+ var axis = new DChartPlotAreaTwofoldAxisContainer(_this, axisShapeContainer, primaryAxis, secondaryAxis);
83105
+ _this._axis = axis;
83106
+ // Add Series
83107
+ _this.addSeries(primarySeries, (_c = primaryOptions === null || primaryOptions === void 0 ? void 0 : primaryOptions.series) === null || _c === void 0 ? void 0 : _c.list);
83108
+ _this.addSeries(secondarySeries, (_d = secondaryOptions === null || secondaryOptions === void 0 ? void 0 : secondaryOptions.series) === null || _d === void 0 ? void 0 : _d.list);
83109
+ // Add Axes
83110
+ _this.addAxes(primaryAxis, (_e = primaryOptions === null || primaryOptions === void 0 ? void 0 : primaryOptions.axis) === null || _e === void 0 ? void 0 : _e.list);
83111
+ _this.addAxes(secondaryAxis, (_f = secondaryOptions === null || secondaryOptions === void 0 ? void 0 : secondaryOptions.axis) === null || _f === void 0 ? void 0 : _f.list);
83112
+ _this.addAxes(axis, (_g = options === null || options === void 0 ? void 0 : options.axis) === null || _g === void 0 ? void 0 : _g.list);
83113
+ // Selection
83114
+ var selection = options === null || options === void 0 ? void 0 : options.selection;
83115
+ if (selection != null) {
83116
+ primarySeries.selection = selection;
83117
+ secondarySeries.selection = selection;
83118
+ selection.bind(series);
83119
+ }
83120
+ return _this;
83121
+ }
83122
+ DChartPlotAreaTwofold.prototype.addSeries = function (series, list) {
83123
+ if (list != null) {
83124
+ var listLength = list.length;
83125
+ if (0 < listLength) {
83126
+ for (var i = 0; i < listLength; ++i) {
83127
+ series.add(list[i]);
83128
+ }
83129
+ series.update();
83130
+ }
83131
+ }
83132
+ };
83133
+ DChartPlotAreaTwofold.prototype.addAxes = function (axis, list) {
83134
+ if (list != null) {
83135
+ for (var i = 0, imax = list.length; i < imax; ++i) {
83136
+ axis.add(list[i]);
83137
+ }
83138
+ }
83139
+ };
83140
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "primary", {
83141
+ get: function () {
83142
+ return this._primary;
83143
+ },
83144
+ enumerable: false,
83145
+ configurable: true
83146
+ });
83147
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "secondary", {
83148
+ get: function () {
83149
+ return this._secondary;
83150
+ },
83151
+ enumerable: false,
83152
+ configurable: true
83153
+ });
83154
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "container", {
83155
+ get: function () {
83156
+ return this.secondary.container;
83157
+ },
83158
+ enumerable: false,
83159
+ configurable: true
83160
+ });
83161
+ DChartPlotAreaTwofold.prototype.onContainerChange = function () {
83162
+ this._isViewDirty = true;
83163
+ this._isContainerBoundsDirty = true;
83164
+ this._primary.toBoundsDirty();
83165
+ this._secondary.toBoundsDirty();
83166
+ DApplications.update(this);
83167
+ };
83168
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "coordinate", {
83169
+ get: function () {
83170
+ return this._coordinate;
83171
+ },
83172
+ enumerable: false,
83173
+ configurable: true
83174
+ });
83175
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "series", {
83176
+ get: function () {
83177
+ return this._series;
83178
+ },
83179
+ enumerable: false,
83180
+ configurable: true
83181
+ });
83182
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "axis", {
83183
+ get: function () {
83184
+ return this._axis;
83185
+ },
83186
+ enumerable: false,
83187
+ configurable: true
83188
+ });
83189
+ DChartPlotAreaTwofold.prototype.newView = function (options) {
83190
+ var _this = this;
83191
+ var viewTarget;
83192
+ var toViewTarget = function () {
83193
+ return (viewTarget !== null && viewTarget !== void 0 ? viewTarget : (viewTarget = new DChartPlotAreaTwofoldViewTarget(_this._primary.container, _this._secondary.container)));
83194
+ };
83195
+ return new DViewImpl(this, toViewTarget, options === null || options === void 0 ? void 0 : options.view);
83196
+ };
83197
+ DChartPlotAreaTwofold.prototype.onViewDirty = function () {
83198
+ this._coordinate.fit();
83199
+ this._axis.onRender();
83200
+ this._series.onRender();
83201
+ };
83202
+ DChartPlotAreaTwofold.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
82186
83203
  if (duration != null && duration <= 0) {
82187
- coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
82188
- axis.update();
82189
- series.update();
83204
+ var primary = this.primary;
83205
+ primary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
83206
+ primary.axis.update();
83207
+ primary.series.update();
83208
+ var secondary = this.secondary;
83209
+ secondary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
83210
+ secondary.axis.update();
83211
+ secondary.series.update();
82190
83212
  }
82191
83213
  else {
82192
83214
  this._blendDuration = duration != null ? duration : 200;
82193
83215
  this._blendStartTime = Date.now();
82194
- coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
83216
+ this.primary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
83217
+ this.secondary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
82195
83218
  var blendTimeout = this._blendTimeout;
82196
83219
  if (blendTimeout != null) {
82197
83220
  window.clearTimeout(blendTimeout);
@@ -82200,7 +83223,7 @@ var DChartPlotAreaImpl = /** @class */ (function (_super) {
82200
83223
  }
82201
83224
  return this;
82202
83225
  };
82203
- DChartPlotAreaImpl.prototype.onBlend = function () {
83226
+ DChartPlotAreaTwofold.prototype.onBlend = function () {
82204
83227
  var now = Date.now();
82205
83228
  var ratio = (now - this._blendStartTime) / this._blendDuration;
82206
83229
  if (ratio < 1) {
@@ -82210,12 +83233,24 @@ var DChartPlotAreaImpl = /** @class */ (function (_super) {
82210
83233
  this._blendTimeout = null;
82211
83234
  ratio = 1;
82212
83235
  }
82213
- this._coordinate.blend(DAnimationTimings.ELASTIC(ratio));
82214
- this._axis.update();
82215
- this._series.update();
83236
+ var t = DAnimationTimings.ELASTIC(ratio);
83237
+ var primary = this.primary;
83238
+ primary.coordinate.blend(t);
83239
+ primary.axis.update();
83240
+ primary.series.update();
83241
+ var secondary = this.secondary;
83242
+ secondary.coordinate.blend(t);
83243
+ secondary.axis.update();
83244
+ secondary.series.update();
83245
+ };
83246
+ DChartPlotAreaTwofold.prototype.destroy = function () {
83247
+ var _a, _b;
83248
+ (_a = this._primary) === null || _a === void 0 ? void 0 : _a.destroy();
83249
+ (_b = this._secondary) === null || _b === void 0 ? void 0 : _b.destroy();
83250
+ this._axis.destroy();
82216
83251
  };
82217
- return DChartPlotAreaImpl;
82218
- }(DBase));
83252
+ return DChartPlotAreaTwofold;
83253
+ }(DChartPlotAreaBase));
82219
83254
 
82220
83255
  /*
82221
83256
  * Copyright (C) 2019 Toshiba Corporation
@@ -82429,18 +83464,14 @@ var DChartSelectionGridlineX = /** @class */ (function (_super) {
82429
83464
  var shape = this._shape;
82430
83465
  if (shape) {
82431
83466
  var mappedX = mappedPosition.x;
82432
- var height = container.plotArea.height;
82433
- shape.transform.position.set(mappedX, height * 0.5);
82434
- shape.size.set(0, height);
82435
- shape.visible = this.isVisible(container, position, mappedPosition);
83467
+ var bounds = container.plotArea.getSelectionBoundsX();
83468
+ shape.transform.position.set(mappedX, bounds.y + bounds.height * 0.5);
83469
+ shape.size.set(0, bounds.height);
83470
+ shape.visible = bounds.x <= mappedX && mappedX <= bounds.x + bounds.width;
82436
83471
  return true;
82437
83472
  }
82438
83473
  return false;
82439
83474
  };
82440
- DChartSelectionGridlineX.prototype.isVisible = function (container, position, mappedPosition) {
82441
- var x = mappedPosition.x;
82442
- return 0 <= x && x <= container.plotArea.width;
82443
- };
82444
83475
  DChartSelectionGridlineX.prototype.getType = function () {
82445
83476
  return "DChartSelectionGridlineX";
82446
83477
  };
@@ -82460,18 +83491,14 @@ var DChartSelectionGridlineY = /** @class */ (function (_super) {
82460
83491
  var shape = this._shape;
82461
83492
  if (shape) {
82462
83493
  var mappedY = mappedPosition.y;
82463
- var width = container.plotArea.width;
82464
- shape.transform.position.set(width * 0.5, mappedY);
82465
- shape.size.set(width, 0);
82466
- shape.visible = this.isVisible(container, position, mappedPosition);
83494
+ var bounds = container.plotArea.getSelectionBoundsY();
83495
+ shape.transform.position.set(bounds.x + bounds.width * 0.5, mappedY);
83496
+ shape.size.set(bounds.width, 0);
83497
+ shape.visible = bounds.y <= mappedY && mappedY <= bounds.y + bounds.height;
82467
83498
  return true;
82468
83499
  }
82469
83500
  return false;
82470
83501
  };
82471
- DChartSelectionGridlineY.prototype.isVisible = function (container, position, mappedPosition) {
82472
- var y = mappedPosition.y;
82473
- return 0 <= y && y <= container.plotArea.height;
82474
- };
82475
83502
  DChartSelectionGridlineY.prototype.getType = function () {
82476
83503
  return "DChartSelectionGridlineY";
82477
83504
  };
@@ -82499,8 +83526,11 @@ var DChartSelectionMarker = /** @class */ (function (_super) {
82499
83526
  DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition) {
82500
83527
  var x = mappedPosition.x;
82501
83528
  var y = mappedPosition.y;
82502
- var plotArea = container.plotArea;
82503
- return 0 <= x && x <= plotArea.width && 0 <= y && y <= plotArea.height;
83529
+ var bounds = container.plotArea.getPixelBounds();
83530
+ return (bounds.x <= x &&
83531
+ x <= bounds.x + bounds.width &&
83532
+ bounds.y <= y &&
83533
+ y <= bounds.y + bounds.height);
82504
83534
  };
82505
83535
  DChartSelectionMarker.prototype.getType = function () {
82506
83536
  return "DChartSelectionMarker";
@@ -84126,7 +85156,7 @@ var DChartSeriesLinear = /** @class */ (function (_super) {
84126
85156
  var p1x = NaN;
84127
85157
  var p1y = NaN;
84128
85158
  var threshold = 0.00001;
84129
- var bounds = container.plotArea.getBoundsInContainer();
85159
+ var bounds = container.plotArea.getContainerBounds();
84130
85160
  if (babs <= aabs) {
84131
85161
  var xfrom = xcoordinate.unmap(xcoordinate.transform.unmap(bounds.x));
84132
85162
  var xto = xcoordinate.unmap(xcoordinate.transform.unmap(bounds.x + bounds.width));
@@ -84291,10 +85321,8 @@ var DChart = /** @class */ (function (_super) {
84291
85321
  DChart.prototype.init = function (options) {
84292
85322
  var _a;
84293
85323
  _super.prototype.init.call(this, options);
84294
- // Plot area
84295
- var plotArea = this.plotArea;
84296
- this.addChild(plotArea);
84297
85324
  // Overflow mask
85325
+ var plotArea = this.plotArea;
84298
85326
  var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : this.theme.isOverflowMaskEnabled();
84299
85327
  if (mask) {
84300
85328
  plotArea.axis.container.mask = this.getOverflowMask();
@@ -84310,22 +85338,25 @@ var DChart = /** @class */ (function (_super) {
84310
85338
  };
84311
85339
  Object.defineProperty(DChart.prototype, "plotArea", {
84312
85340
  get: function () {
84313
- var result = this._plotArea;
84314
- if (result == null) {
84315
- result = this.newPlotArea();
84316
- this._plotArea = result;
84317
- }
84318
- return result;
85341
+ var _a;
85342
+ return ((_a = this._plotArea) !== null && _a !== void 0 ? _a : (this._plotArea = this.newPlotArea()));
84319
85343
  },
84320
85344
  enumerable: false,
84321
85345
  configurable: true
84322
85346
  });
84323
85347
  DChart.prototype.newPlotArea = function () {
84324
85348
  var _a;
84325
- return new DChartPlotAreaImpl(this, (_a = this._options) === null || _a === void 0 ? void 0 : _a.plotArea);
84326
- };
84327
- DChart.prototype.getType = function () {
84328
- return "DChart";
85349
+ var plotArea = (_a = this._options) === null || _a === void 0 ? void 0 : _a.plotArea;
85350
+ if (plotArea != null && ("primary" in plotArea || "secondary" in plotArea)) {
85351
+ var result = new DChartPlotAreaTwofold(this, plotArea);
85352
+ this.addChild(result);
85353
+ return result;
85354
+ }
85355
+ else {
85356
+ var result = new DChartPlotAreaOnefold(this, plotArea);
85357
+ this.addChild(result);
85358
+ return result;
85359
+ }
84329
85360
  };
84330
85361
  DChart.prototype.destroy = function () {
84331
85362
  var _a;
@@ -84334,6 +85365,9 @@ var DChart = /** @class */ (function (_super) {
84334
85365
  _super.prototype.destroy.call(this);
84335
85366
  }
84336
85367
  };
85368
+ DChart.prototype.getType = function () {
85369
+ return "DChart";
85370
+ };
84337
85371
  return DChart;
84338
85372
  }(DBase));
84339
85373
 
@@ -99731,8 +100765,21 @@ exports.DChartCoordinateTransformMarkImpl = DChartCoordinateTransformMarkImpl;
99731
100765
  exports.DChartLegend = DChartLegend;
99732
100766
  exports.DChartLegendItem = DChartLegendItem;
99733
100767
  exports.DChartOverview = DChartOverview;
100768
+ exports.DChartPlotAreaBase = DChartPlotAreaBase;
99734
100769
  exports.DChartPlotAreaContainer = DChartPlotAreaContainer;
99735
- exports.DChartPlotAreaImpl = DChartPlotAreaImpl;
100770
+ exports.DChartPlotAreaOnefold = DChartPlotAreaOnefold;
100771
+ exports.DChartPlotAreaTwofold = DChartPlotAreaTwofold;
100772
+ exports.DChartPlotAreaTwofoldAxisContainer = DChartPlotAreaTwofoldAxisContainer;
100773
+ exports.DChartPlotAreaTwofoldCoorinateContainer = DChartPlotAreaTwofoldCoorinateContainer;
100774
+ exports.DChartPlotAreaTwofoldCoorinateContainerSub = DChartPlotAreaTwofoldCoorinateContainerSub;
100775
+ exports.DChartPlotAreaTwofoldOverflowMaskPrimary = DChartPlotAreaTwofoldOverflowMaskPrimary;
100776
+ exports.DChartPlotAreaTwofoldOverflowMaskSecondary = DChartPlotAreaTwofoldOverflowMaskSecondary;
100777
+ exports.DChartPlotAreaTwofoldSeriesContainer = DChartPlotAreaTwofoldSeriesContainer;
100778
+ exports.DChartPlotAreaTwofoldSubBase = DChartPlotAreaTwofoldSubBase;
100779
+ exports.DChartPlotAreaTwofoldSubPrimary = DChartPlotAreaTwofoldSubPrimary;
100780
+ exports.DChartPlotAreaTwofoldSubSecondary = DChartPlotAreaTwofoldSubSecondary;
100781
+ exports.DChartPlotAreaTwofoldViewTarget = DChartPlotAreaTwofoldViewTarget;
100782
+ exports.DChartPlotAreaTwofoldViewTargetPoint = DChartPlotAreaTwofoldViewTargetPoint;
99736
100783
  exports.DChartRegionImpl = DChartRegionImpl;
99737
100784
  exports.DChartRegionImplObservable = DChartRegionImplObservable;
99738
100785
  exports.DChartSelectionContainerImpl = DChartSelectionContainerImpl;