@wcardinal/wcardinal-ui 0.418.0 → 0.420.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 +5 -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 -4
  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 +129 -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 +1276 -222
  116. package/dist/wcardinal-ui.js +1270 -222
  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.420.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
  }
@@ -80895,12 +80905,10 @@ var DChartCoordinateBase = /** @class */ (function () {
80895
80905
  }
80896
80906
  };
80897
80907
  DChartCoordinateBase.prototype.getPixelDomain = function (plotArea, result) {
80898
- var padding = plotArea.padding;
80899
- return result.set(padding.getLeft(), plotArea.width - padding.getRight());
80908
+ return plotArea.getPixelDomain(result);
80900
80909
  };
80901
80910
  DChartCoordinateBase.prototype.getPixelRange = function (plotArea, result) {
80902
- var padding = plotArea.padding;
80903
- return result.set(plotArea.height - padding.getBottom(), padding.getTop());
80911
+ return plotArea.getPixelRange(result);
80904
80912
  };
80905
80913
  DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
80906
80914
  if (from == null) {
@@ -81534,6 +81542,119 @@ var DChartOverview = /** @class */ (function (_super) {
81534
81542
  return DChartOverview;
81535
81543
  }(DBase));
81536
81544
 
81545
+ /*
81546
+ * Copyright (C) 2019 Toshiba Corporation
81547
+ * SPDX-License-Identifier: Apache-2.0
81548
+ */
81549
+ var DChartPlotAreaBase = /** @class */ (function (_super) {
81550
+ __extends(DChartPlotAreaBase, _super);
81551
+ function DChartPlotAreaBase(chart, options) {
81552
+ var _this = _super.call(this, options) || this;
81553
+ _this._isContainerBoundsDirty = true;
81554
+ _this._containerBounds = new pixi_js.Rectangle();
81555
+ _this._workPoint = new pixi_js.Point();
81556
+ _this._pixelBounds = new pixi_js.Rectangle();
81557
+ _this._chart = chart;
81558
+ _this._blendStartTime = 0;
81559
+ _this._blendDuration = 1000;
81560
+ _this._blendTimeout = null;
81561
+ _this._onBlendBound = function () {
81562
+ _this.onBlend();
81563
+ };
81564
+ _this._isViewDirty = true;
81565
+ _this._view = _this.newView(options);
81566
+ return _this;
81567
+ }
81568
+ DChartPlotAreaBase.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
81569
+ this._isViewDirty = true;
81570
+ this._isContainerBoundsDirty = true;
81571
+ _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
81572
+ };
81573
+ Object.defineProperty(DChartPlotAreaBase.prototype, "chart", {
81574
+ get: function () {
81575
+ return this._chart;
81576
+ },
81577
+ enumerable: false,
81578
+ configurable: true
81579
+ });
81580
+ Object.defineProperty(DChartPlotAreaBase.prototype, "view", {
81581
+ get: function () {
81582
+ return this._view;
81583
+ },
81584
+ enumerable: false,
81585
+ configurable: true
81586
+ });
81587
+ DChartPlotAreaBase.prototype.onWheel = function (e, deltas, global) {
81588
+ var vresult = this._view.onWheel(e, deltas, global);
81589
+ var sresult = _super.prototype.onWheel.call(this, e, deltas, global);
81590
+ return vresult || sresult;
81591
+ };
81592
+ DChartPlotAreaBase.prototype.onDblClick = function (e, interactionManager) {
81593
+ var vresult = this._view.onDblClick(e, interactionManager);
81594
+ var sresult = _super.prototype.onDblClick.call(this, e, interactionManager);
81595
+ return vresult || sresult;
81596
+ };
81597
+ DChartPlotAreaBase.prototype.onDown = function (e) {
81598
+ this._view.onDown(e);
81599
+ _super.prototype.onDown.call(this, e);
81600
+ };
81601
+ DChartPlotAreaBase.prototype.render = function (renderer) {
81602
+ if (this._isViewDirty) {
81603
+ this._isViewDirty = false;
81604
+ this.onViewDirty();
81605
+ }
81606
+ _super.prototype.render.call(this, renderer);
81607
+ };
81608
+ DChartPlotAreaBase.prototype.getPixelDomain = function (result) {
81609
+ var padding = this.padding;
81610
+ return result.set(padding.getLeft(), this.width - padding.getRight());
81611
+ };
81612
+ DChartPlotAreaBase.prototype.getPixelRange = function (result) {
81613
+ var padding = this.padding;
81614
+ return result.set(this.height - padding.getBottom(), padding.getTop());
81615
+ };
81616
+ DChartPlotAreaBase.prototype.getPixelBounds = function () {
81617
+ var result = this._pixelBounds;
81618
+ result.x = 0;
81619
+ result.y = 0;
81620
+ result.width = this.width;
81621
+ result.height = this.height;
81622
+ return result;
81623
+ };
81624
+ DChartPlotAreaBase.prototype.getAxisBounds = function (position) {
81625
+ return this.getPixelBounds();
81626
+ };
81627
+ DChartPlotAreaBase.prototype.getSelectionBoundsX = function () {
81628
+ return this.getPixelBounds();
81629
+ };
81630
+ DChartPlotAreaBase.prototype.getSelectionBoundsY = function () {
81631
+ return this.getPixelBounds();
81632
+ };
81633
+ DChartPlotAreaBase.prototype.getContainerBounds = function () {
81634
+ var result = this._containerBounds;
81635
+ if (this._isContainerBoundsDirty) {
81636
+ this._isContainerBoundsDirty = false;
81637
+ var container = this.container;
81638
+ container.updateTransform();
81639
+ var transform = container.transform.localTransform;
81640
+ var work = this._workPoint;
81641
+ work.set(0, 0);
81642
+ transform.applyInverse(work, work);
81643
+ result.x = work.x;
81644
+ result.y = work.y;
81645
+ work.set(this.width, this.height);
81646
+ transform.applyInverse(work, work);
81647
+ result.width = work.x - result.x;
81648
+ result.height = work.y - result.y;
81649
+ }
81650
+ return result;
81651
+ };
81652
+ DChartPlotAreaBase.prototype.getType = function () {
81653
+ return "DChartPlotArea";
81654
+ };
81655
+ return DChartPlotAreaBase;
81656
+ }(DBase));
81657
+
81537
81658
  /*
81538
81659
  * Copyright (C) 2019 Toshiba Corporation
81539
81660
  * SPDX-License-Identifier: Apache-2.0
@@ -81810,11 +81931,10 @@ var DChartSeriesStrokeImpl = /** @class */ (function () {
81810
81931
  */
81811
81932
  var DChartSeriesContainerImpl = /** @class */ (function () {
81812
81933
  function DChartSeriesContainerImpl(plotArea, options) {
81813
- var _a;
81814
81934
  this._plotArea = plotArea;
81815
81935
  this._domain = new DChartRegionImpl(NaN, NaN);
81816
81936
  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;
81937
+ this._selection = null;
81818
81938
  this._fill = new DChartSeriesFillImpl(options === null || options === void 0 ? void 0 : options.fill);
81819
81939
  this._stroke = new DChartSeriesStrokeImpl(options === null || options === void 0 ? void 0 : options.stroke);
81820
81940
  this._size = new DChartSeriesPointImpl(options === null || options === void 0 ? void 0 : options.size);
@@ -81848,6 +81968,9 @@ var DChartSeriesContainerImpl = /** @class */ (function () {
81848
81968
  get: function () {
81849
81969
  return this._selection;
81850
81970
  },
81971
+ set: function (selection) {
81972
+ this._selection = selection;
81973
+ },
81851
81974
  enumerable: false,
81852
81975
  configurable: true
81853
81976
  });
@@ -81996,202 +82119,1109 @@ var DChartSeriesContainerImpl = /** @class */ (function () {
81996
82119
  * Copyright (C) 2019 Toshiba Corporation
81997
82120
  * SPDX-License-Identifier: Apache-2.0
81998
82121
  */
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;
82122
+ var DChartPlotAreaOnefold = /** @class */ (function (_super) {
82123
+ __extends(DChartPlotAreaOnefold, _super);
82124
+ function DChartPlotAreaOnefold(chart, options) {
82014
82125
  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();
82126
+ var _this = _super.call(this, chart, options) || this;
82019
82127
  // Container
82020
82128
  var container = new DChartPlotAreaContainer(function () {
82021
82129
  _this._isViewDirty = true;
82022
- _this._isBoundsInContainerDirty = true;
82130
+ _this._isContainerBoundsDirty = true;
82023
82131
  DApplications.update(_this);
82024
82132
  });
82025
- this._container = container;
82026
- this.addChild(container);
82133
+ _this._container = container;
82134
+ _this.addChild(container);
82135
+ // Overflow mask
82136
+ var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : _this.theme.isOverflowMaskEnabled();
82137
+ if (mask) {
82138
+ container.mask = _this.getOverflowMask();
82139
+ }
82027
82140
  // 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);
82141
+ _this._isViewDirty = true;
82142
+ _this._view = new DViewImpl(_this, function () { return container; }, options === null || options === void 0 ? void 0 : options.view);
82143
+ // Coordinate
82144
+ _this._coordinate = new DChartCoordinateContainerImpl(_this, options === null || options === void 0 ? void 0 : options.coordinate);
82145
+ // Series
82146
+ var seriesOptions = options === null || options === void 0 ? void 0 : options.series;
82147
+ var series = new DChartSeriesContainerImpl(_this, seriesOptions);
82148
+ _this._series = series;
82149
+ // Axis
82150
+ var axisOptions = options === null || options === void 0 ? void 0 : options.axis;
82151
+ var axis = new DChartAxisContainerImpl(_this, new EShapeContainer(), axisOptions);
82152
+ _this._axis = axis;
82153
+ _this.addChild(axis.container);
82154
+ // Add series
82155
+ _this.addSeries(series, seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.list);
82156
+ // Add axes
82157
+ _this.addAxes(axis, axisOptions === null || axisOptions === void 0 ? void 0 : axisOptions.list);
82039
82158
  // Selection
82040
- var selection = series.selection;
82041
- if (selection) {
82159
+ var selection = seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.selection;
82160
+ if (selection != null) {
82161
+ series.selection = selection;
82042
82162
  selection.bind(series);
82043
82163
  }
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();
82164
+ return _this;
82165
+ }
82166
+ DChartPlotAreaOnefold.prototype.getOverflowMask = function () {
82167
+ if (this._overflowMask == null) {
82168
+ this._overflowMask = new DBaseOverflowMask(this);
82169
+ this.reflowable.add(this._overflowMask);
82170
+ this.toDirty();
82048
82171
  }
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
- }
82172
+ return this._overflowMask;
82173
+ };
82174
+ DChartPlotAreaOnefold.prototype.addSeries = function (series, list) {
82175
+ if (list != null) {
82176
+ var listLength = list.length;
82177
+ if (0 < listLength) {
82178
+ for (var i = 0; i < listLength; ++i) {
82179
+ series.add(list[i]);
82063
82180
  }
82181
+ series.update();
82064
82182
  }
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
- }
82183
+ }
82184
+ };
82185
+ DChartPlotAreaOnefold.prototype.addAxes = function (axis, list) {
82186
+ if (list != null) {
82187
+ for (var i = 0, imax = list.length; i < imax; ++i) {
82188
+ axis.add(list[i]);
82189
+ }
82190
+ }
82191
+ };
82192
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "coordinate", {
82193
+ get: function () {
82194
+ return this._coordinate;
82195
+ },
82196
+ enumerable: false,
82197
+ configurable: true
82198
+ });
82199
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "series", {
82200
+ get: function () {
82201
+ return this._series;
82202
+ },
82203
+ enumerable: false,
82204
+ configurable: true
82205
+ });
82206
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "container", {
82207
+ get: function () {
82208
+ return this._container;
82209
+ },
82210
+ enumerable: false,
82211
+ configurable: true
82212
+ });
82213
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "axis", {
82214
+ get: function () {
82215
+ return this._axis;
82216
+ },
82217
+ enumerable: false,
82218
+ configurable: true
82219
+ });
82220
+ DChartPlotAreaOnefold.prototype.newView = function (options) {
82221
+ var _this = this;
82222
+ return new DViewImpl(this, function () { return _this._container; }, options === null || options === void 0 ? void 0 : options.view);
82223
+ };
82224
+ DChartPlotAreaOnefold.prototype.onViewDirty = function () {
82225
+ this._coordinate.fit();
82226
+ this._axis.onRender();
82227
+ this._series.onRender();
82228
+ };
82229
+ DChartPlotAreaOnefold.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
82230
+ var coordinate = this._coordinate;
82231
+ var axis = this._axis;
82232
+ var series = this._series;
82233
+ if (duration != null && duration <= 0) {
82234
+ coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
82235
+ axis.update();
82236
+ series.update();
82237
+ }
82238
+ else {
82239
+ this._blendDuration = duration != null ? duration : 200;
82240
+ this._blendStartTime = Date.now();
82241
+ coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
82242
+ var blendTimeout = this._blendTimeout;
82243
+ if (blendTimeout != null) {
82244
+ window.clearTimeout(blendTimeout);
82245
+ }
82246
+ this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
82247
+ }
82248
+ return this;
82249
+ };
82250
+ DChartPlotAreaOnefold.prototype.onBlend = function () {
82251
+ var now = Date.now();
82252
+ var ratio = (now - this._blendStartTime) / this._blendDuration;
82253
+ if (ratio < 1) {
82254
+ this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
82255
+ }
82256
+ else {
82257
+ this._blendTimeout = null;
82258
+ ratio = 1;
82259
+ }
82260
+ this._coordinate.blend(DAnimationTimings.ELASTIC(ratio));
82261
+ this._axis.update();
82262
+ this._series.update();
82263
+ };
82264
+ DChartPlotAreaOnefold.prototype.destroy = function () {
82265
+ this._container.destroy();
82266
+ this._series.destroy();
82267
+ this._axis.destroy();
82268
+ };
82269
+ return DChartPlotAreaOnefold;
82270
+ }(DChartPlotAreaBase));
82271
+
82272
+ /*
82273
+ * Copyright (C) 2019 Toshiba Corporation
82274
+ * SPDX-License-Identifier: Apache-2.0
82275
+ */
82276
+ var DChartPlotAreaTwofoldAxisContainer = /** @class */ (function () {
82277
+ function DChartPlotAreaTwofoldAxisContainer(plotArea, container, primary, secondary) {
82278
+ this._plotArea = plotArea;
82279
+ this._container = container;
82280
+ this._list = new Map();
82281
+ this._primary = primary;
82282
+ this._secondary = secondary;
82283
+ }
82284
+ Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "container", {
82285
+ get: function () {
82286
+ return this._container;
82287
+ },
82288
+ enumerable: false,
82289
+ configurable: true
82290
+ });
82291
+ Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "plotArea", {
82292
+ get: function () {
82293
+ return this._plotArea;
82294
+ },
82295
+ enumerable: false,
82296
+ configurable: true
82297
+ });
82298
+ DChartPlotAreaTwofoldAxisContainer.prototype.add = function (axis) {
82299
+ var list = this._list;
82300
+ var axes = list.get(axis.position);
82301
+ if (axes == null) {
82302
+ axes = [];
82303
+ list.set(axis.position, axes);
82304
+ }
82305
+ axes.push(axis);
82306
+ axis.bind(this, axes.length - 1);
82307
+ };
82308
+ DChartPlotAreaTwofoldAxisContainer.prototype.get = function (position, index) {
82309
+ var primary = this._primary;
82310
+ var primarySize = primary.size(position);
82311
+ if (0 <= index && index < primarySize) {
82312
+ return primary.get(position, index);
82313
+ }
82314
+ var secondary = this._secondary;
82315
+ var secondarySize = secondary.size(position);
82316
+ if (primarySize <= index && index < primarySize + secondarySize) {
82317
+ return secondary.get(position, index - primarySize);
82318
+ }
82319
+ var list = this._list;
82320
+ var axes = list.get(toEnum(position, DChartAxisPosition));
82321
+ if (axes) {
82322
+ if (primarySize + secondarySize <= index &&
82323
+ index < primarySize + secondarySize + axes.length) {
82324
+ return axes[index - primarySize - secondarySize];
82325
+ }
82326
+ }
82327
+ return null;
82328
+ };
82329
+ DChartPlotAreaTwofoldAxisContainer.prototype.indexOf = function (axis) {
82330
+ var primary = this._primary;
82331
+ var result = primary.indexOf(axis);
82332
+ if (0 <= result) {
82333
+ return result;
82334
+ }
82335
+ var secondary = this._secondary;
82336
+ result = secondary.indexOf(axis);
82337
+ if (0 <= result) {
82338
+ return primary.size(axis.position) + result;
82339
+ }
82340
+ var list = this._list;
82341
+ var axes = list.get(axis.position);
82342
+ if (axes) {
82343
+ return primary.size(axis.position) + secondary.size(axis.position) + axes.indexOf(axis);
82344
+ }
82345
+ return -1;
82346
+ };
82347
+ DChartPlotAreaTwofoldAxisContainer.prototype.clear = function (position) {
82348
+ this._primary.clear(position);
82349
+ this._secondary.clear(position);
82350
+ var list = this._list;
82351
+ var axes = list.get(toEnum(position, DChartAxisPosition));
82352
+ if (axes) {
82353
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82354
+ axes[i].destroy();
82355
+ }
82356
+ axes.length = 0;
82357
+ }
82358
+ return this;
82359
+ };
82360
+ DChartPlotAreaTwofoldAxisContainer.prototype.size = function (position) {
82361
+ var list = this._list;
82362
+ var axes = list.get(toEnum(position, DChartAxisPosition));
82363
+ return (this._primary.size(position) +
82364
+ this._secondary.size(position) +
82365
+ (axes != null ? axes.length : 0));
82366
+ };
82367
+ DChartPlotAreaTwofoldAxisContainer.prototype.update = function () {
82368
+ this._primary.update();
82369
+ this._secondary.update();
82370
+ this._list.forEach(function (axes) {
82371
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82372
+ axes[i].update();
82373
+ }
82374
+ });
82375
+ };
82376
+ DChartPlotAreaTwofoldAxisContainer.prototype.onRender = function () {
82377
+ this._primary.onRender();
82378
+ this._secondary.onRender();
82379
+ this._list.forEach(function (axes) {
82380
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82381
+ axes[i].onRender();
82382
+ }
82383
+ });
82384
+ };
82385
+ DChartPlotAreaTwofoldAxisContainer.prototype.destroy = function () {
82386
+ this._primary.destroy();
82387
+ this._secondary.destroy();
82388
+ this._list.forEach(function (axes) {
82389
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82390
+ axes[i].destroy();
82391
+ }
82392
+ axes.length = 0;
82393
+ });
82394
+ };
82395
+ return DChartPlotAreaTwofoldAxisContainer;
82396
+ }());
82397
+
82398
+ /*
82399
+ * Copyright (C) 2019 Toshiba Corporation
82400
+ * SPDX-License-Identifier: Apache-2.0
82401
+ */
82402
+ var DChartPlotAreaTwofoldCoorinateContainerSub = /** @class */ (function () {
82403
+ function DChartPlotAreaTwofoldCoorinateContainerSub(container, primary, secondary) {
82404
+ this._container = container;
82405
+ this._primary = primary;
82406
+ this._secondary = secondary;
82407
+ }
82408
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainerSub.prototype, "container", {
82409
+ get: function () {
82410
+ return this._container;
82411
+ },
82412
+ enumerable: false,
82413
+ configurable: true
82414
+ });
82415
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.add = function (coordinate, index) {
82416
+ if (index != null) {
82417
+ var primary = this._primary;
82418
+ var primarySize = primary.size();
82419
+ if (index < primarySize) {
82420
+ if (0 <= index) {
82421
+ primary.add(coordinate, index);
82073
82422
  }
82074
82423
  }
82424
+ else {
82425
+ this._secondary.add(coordinate, index - primarySize);
82426
+ }
82427
+ return this;
82428
+ }
82429
+ else {
82430
+ this._secondary.add(coordinate);
82075
82431
  }
82432
+ return this;
82076
82433
  };
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);
82434
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.get = function (index) {
82435
+ var primary = this._primary;
82436
+ var primarySize = primary.size();
82437
+ if (0 <= index && index < primarySize) {
82438
+ return primary.get(index);
82439
+ }
82440
+ var secondary = this._secondary;
82441
+ var secondarySize = secondary.size();
82442
+ if (primarySize <= index && index < primarySize + secondarySize) {
82443
+ secondary.get(index - primarySize);
82444
+ }
82445
+ return null;
82081
82446
  };
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();
82447
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.indexOf = function (coordinate) {
82448
+ var result = this._primary.indexOf(coordinate);
82449
+ if (0 <= result) {
82450
+ return result;
82087
82451
  }
82088
- return this._overflowMask;
82452
+ result = this._secondary.indexOf(coordinate);
82453
+ if (0 <= result) {
82454
+ return this._primary.size() + result;
82455
+ }
82456
+ return -1;
82457
+ };
82458
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.remove = function (coordinateOrIndex) {
82459
+ if (isNumber(coordinateOrIndex)) {
82460
+ var index = coordinateOrIndex;
82461
+ var primary = this._primary;
82462
+ var primarySize = primary.size();
82463
+ if (0 <= index && index < primarySize) {
82464
+ return primary.remove(index);
82465
+ }
82466
+ var secondary = this._secondary;
82467
+ var secondarySize = secondary.size();
82468
+ if (primarySize <= index && index < primarySize + secondarySize) {
82469
+ secondary.remove(index - primarySize);
82470
+ }
82471
+ }
82472
+ else {
82473
+ var coordinate = coordinateOrIndex;
82474
+ var result = this._primary.remove(coordinate);
82475
+ if (result != null) {
82476
+ return result;
82477
+ }
82478
+ result = this._secondary.remove(coordinate);
82479
+ if (result != null) {
82480
+ return result;
82481
+ }
82482
+ }
82483
+ return null;
82484
+ };
82485
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.clear = function () {
82486
+ this._primary.clear();
82487
+ this._secondary.clear();
82488
+ return this;
82489
+ };
82490
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.destroy = function () {
82491
+ return this.clear();
82492
+ };
82493
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.size = function () {
82494
+ return this._primary.size() + this._secondary.size();
82495
+ };
82496
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.fit = function (from, to) {
82497
+ this._primary.fit(from, to);
82498
+ this._secondary.fit(from, to);
82499
+ return this;
82500
+ };
82501
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.mark = function (from, to) {
82502
+ this._primary.mark(from, to);
82503
+ this._secondary.mark(from, to);
82504
+ return this;
82089
82505
  };
82090
- Object.defineProperty(DChartPlotAreaImpl.prototype, "chart", {
82506
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.blend = function (ratio) {
82507
+ this._primary.blend(ratio);
82508
+ this._secondary.blend(ratio);
82509
+ return this;
82510
+ };
82511
+ return DChartPlotAreaTwofoldCoorinateContainerSub;
82512
+ }());
82513
+
82514
+ /*
82515
+ * Copyright (C) 2019 Toshiba Corporation
82516
+ * SPDX-License-Identifier: Apache-2.0
82517
+ */
82518
+ var DChartPlotAreaTwofoldCoorinateContainer = /** @class */ (function () {
82519
+ function DChartPlotAreaTwofoldCoorinateContainer(plotArea, primary, secondary) {
82520
+ this._plotArea = plotArea;
82521
+ this._primary = primary;
82522
+ this._secondary = secondary;
82523
+ this._x = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.x, secondary.x);
82524
+ this._y = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.y, secondary.y);
82525
+ }
82526
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "x", {
82091
82527
  get: function () {
82092
- return this._chart;
82528
+ return this._x;
82093
82529
  },
82094
82530
  enumerable: false,
82095
82531
  configurable: true
82096
82532
  });
82097
- Object.defineProperty(DChartPlotAreaImpl.prototype, "coordinate", {
82533
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "y", {
82098
82534
  get: function () {
82099
- return this._coordinate;
82535
+ return this._y;
82100
82536
  },
82101
82537
  enumerable: false,
82102
82538
  configurable: true
82103
82539
  });
82104
- Object.defineProperty(DChartPlotAreaImpl.prototype, "series", {
82540
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "plotArea", {
82105
82541
  get: function () {
82106
- return this._series;
82542
+ return this._plotArea;
82543
+ },
82544
+ enumerable: false,
82545
+ configurable: true
82546
+ });
82547
+ DChartPlotAreaTwofoldCoorinateContainer.prototype.fit = function (domainFrom, domainTo, rangeFrom, rangeTo) {
82548
+ this._x.fit(domainFrom, domainTo);
82549
+ this._y.fit(rangeFrom, rangeTo);
82550
+ return this;
82551
+ };
82552
+ DChartPlotAreaTwofoldCoorinateContainer.prototype.mark = function (domainFrom, domainTo, rangeFrom, rangeTo) {
82553
+ this._x.mark(domainFrom, domainTo);
82554
+ this._y.mark(rangeFrom, rangeTo);
82555
+ return this;
82556
+ };
82557
+ DChartPlotAreaTwofoldCoorinateContainer.prototype.blend = function (ratio) {
82558
+ this._x.blend(ratio);
82559
+ this._y.blend(ratio);
82560
+ return this;
82561
+ };
82562
+ return DChartPlotAreaTwofoldCoorinateContainer;
82563
+ }());
82564
+
82565
+ /*
82566
+ * Copyright (C) 2019 Toshiba Corporation
82567
+ * SPDX-License-Identifier: Apache-2.0
82568
+ */
82569
+ var DChartPlotAreaTwofoldOverflowMaskPrimary = /** @class */ (function (_super) {
82570
+ __extends(DChartPlotAreaTwofoldOverflowMaskPrimary, _super);
82571
+ function DChartPlotAreaTwofoldOverflowMaskPrimary() {
82572
+ return _super !== null && _super.apply(this, arguments) || this;
82573
+ }
82574
+ DChartPlotAreaTwofoldOverflowMaskPrimary.prototype.onReflow = function (base, width, height) {
82575
+ if (this._isInitialized && this._width === width && this._height === height) {
82576
+ return;
82577
+ }
82578
+ this._isInitialized = true;
82579
+ this._width = width;
82580
+ this._height = height;
82581
+ var hh = height * 0.5;
82582
+ this.clear();
82583
+ this.beginFill(0xffffff, 1);
82584
+ this.drawRect(0, 0, width, hh);
82585
+ this.endFill();
82586
+ };
82587
+ return DChartPlotAreaTwofoldOverflowMaskPrimary;
82588
+ }(DBaseOverflowMaskSimple));
82589
+
82590
+ /*
82591
+ * Copyright (C) 2019 Toshiba Corporation
82592
+ * SPDX-License-Identifier: Apache-2.0
82593
+ */
82594
+ var DChartPlotAreaTwofoldOverflowMaskSecondary = /** @class */ (function (_super) {
82595
+ __extends(DChartPlotAreaTwofoldOverflowMaskSecondary, _super);
82596
+ function DChartPlotAreaTwofoldOverflowMaskSecondary() {
82597
+ return _super !== null && _super.apply(this, arguments) || this;
82598
+ }
82599
+ DChartPlotAreaTwofoldOverflowMaskSecondary.prototype.onReflow = function (base, width, height) {
82600
+ if (this._isInitialized && this._width === width && this._height === height) {
82601
+ return;
82602
+ }
82603
+ this._isInitialized = true;
82604
+ this._width = width;
82605
+ this._height = height;
82606
+ var hh = height * 0.5;
82607
+ this.clear();
82608
+ this.beginFill(0xffffff, 1);
82609
+ this.drawRect(0, hh, width, hh);
82610
+ this.endFill();
82611
+ };
82612
+ return DChartPlotAreaTwofoldOverflowMaskSecondary;
82613
+ }(DBaseOverflowMaskSimple));
82614
+
82615
+ /*
82616
+ * Copyright (C) 2019 Toshiba Corporation
82617
+ * SPDX-License-Identifier: Apache-2.0
82618
+ */
82619
+ var DChartPlotAreaTwofoldSeriesContainer = /** @class */ (function () {
82620
+ function DChartPlotAreaTwofoldSeriesContainer(plotArea, primary, secondary) {
82621
+ this._plotArea = plotArea;
82622
+ this._primary = primary;
82623
+ this._secondary = secondary;
82624
+ this._domain = new DChartRegionImpl(NaN, NaN);
82625
+ this._range = new DChartRegionImpl(NaN, NaN);
82626
+ }
82627
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newFill = function (index, options) {
82628
+ return this._secondary.newFill(index, options);
82629
+ };
82630
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newStroke = function (index, options) {
82631
+ return this._secondary.newStroke(index, options);
82632
+ };
82633
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newSize = function (index, options, x, y) {
82634
+ return this._secondary.newSize(index, options, x, y);
82635
+ };
82636
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newOffset = function (index, options, x, y) {
82637
+ return this._secondary.newOffset(index, options, x, y);
82638
+ };
82639
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newPadding = function (index, options) {
82640
+ return this._secondary.newPadding(index, options);
82641
+ };
82642
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "plotArea", {
82643
+ get: function () {
82644
+ return this._plotArea;
82107
82645
  },
82108
82646
  enumerable: false,
82109
82647
  configurable: true
82110
82648
  });
82111
- Object.defineProperty(DChartPlotAreaImpl.prototype, "container", {
82649
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "selection", {
82650
+ get: function () {
82651
+ return this._secondary.selection;
82652
+ },
82653
+ enumerable: false,
82654
+ configurable: true
82655
+ });
82656
+ DChartPlotAreaTwofoldSeriesContainer.prototype.update = function () {
82657
+ this._primary.update();
82658
+ this._secondary.update();
82659
+ var selection = this._secondary.selection;
82660
+ if (selection) {
82661
+ selection.update();
82662
+ }
82663
+ };
82664
+ DChartPlotAreaTwofoldSeriesContainer.prototype.onRender = function () {
82665
+ this._primary.onRender();
82666
+ this._secondary.onRender();
82667
+ var selection = this._secondary.selection;
82668
+ if (selection) {
82669
+ selection.onRender();
82670
+ }
82671
+ };
82672
+ DChartPlotAreaTwofoldSeriesContainer.prototype.add = function (series) {
82673
+ this._secondary.add(series);
82674
+ };
82675
+ DChartPlotAreaTwofoldSeriesContainer.prototype.get = function (index) {
82676
+ var primary = this._primary;
82677
+ var primarySize = primary.size();
82678
+ if (0 <= index && index < primarySize) {
82679
+ return primary.get(index);
82680
+ }
82681
+ var secondary = this._secondary;
82682
+ var secondarySize = secondary.size();
82683
+ if (primarySize <= index && index < primarySize + secondarySize) {
82684
+ return secondary.get(index - primarySize);
82685
+ }
82686
+ return null;
82687
+ };
82688
+ DChartPlotAreaTwofoldSeriesContainer.prototype.indexOf = function (series) {
82689
+ var primary = this._primary;
82690
+ var result = primary.indexOf(series);
82691
+ if (0 <= result) {
82692
+ return result;
82693
+ }
82694
+ result = this._secondary.indexOf(series);
82695
+ if (0 <= result) {
82696
+ return primary.size() + result;
82697
+ }
82698
+ return -1;
82699
+ };
82700
+ DChartPlotAreaTwofoldSeriesContainer.prototype.clear = function () {
82701
+ this._primary.clear();
82702
+ this._secondary.clear();
82703
+ return this;
82704
+ };
82705
+ DChartPlotAreaTwofoldSeriesContainer.prototype.size = function () {
82706
+ return this._primary.size() + this._secondary.size();
82707
+ };
82708
+ DChartPlotAreaTwofoldSeriesContainer.prototype.destroy = function () {
82709
+ this.clear();
82710
+ var selection = this._secondary.selection;
82711
+ if (selection) {
82712
+ selection.unbind();
82713
+ }
82714
+ };
82715
+ DChartPlotAreaTwofoldSeriesContainer.prototype.getDomain = function (coordinate, result) {
82716
+ this._primary.getDomain(coordinate, result);
82717
+ var from = result.from;
82718
+ var to = result.to;
82719
+ this._secondary.getDomain(coordinate, result);
82720
+ result.add(from, to);
82721
+ return result;
82722
+ };
82723
+ DChartPlotAreaTwofoldSeriesContainer.prototype.getRange = function (coordinate, result) {
82724
+ result.clear();
82725
+ this._primary.getRange(coordinate, result);
82726
+ var from = result.from;
82727
+ var to = result.to;
82728
+ this._secondary.getRange(coordinate, result);
82729
+ result.add(from, to);
82730
+ return result;
82731
+ };
82732
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "domain", {
82733
+ get: function () {
82734
+ var result = this._domain;
82735
+ result.clear();
82736
+ var pdomain = this._primary.domain;
82737
+ result.add(pdomain.from, pdomain.to);
82738
+ var sdomain = this._secondary.domain;
82739
+ result.add(sdomain.from, sdomain.to);
82740
+ return result;
82741
+ },
82742
+ enumerable: false,
82743
+ configurable: true
82744
+ });
82745
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "range", {
82746
+ get: function () {
82747
+ var result = this._domain;
82748
+ result.clear();
82749
+ var prange = this._primary.range;
82750
+ result.add(prange.from, prange.to);
82751
+ var srange = this._secondary.range;
82752
+ result.add(srange.from, srange.to);
82753
+ return result;
82754
+ },
82755
+ enumerable: false,
82756
+ configurable: true
82757
+ });
82758
+ DChartPlotAreaTwofoldSeriesContainer.prototype.hitTest = function (x, y) {
82759
+ var result = this._secondary.hitTest(x, y);
82760
+ if (result != null) {
82761
+ return result;
82762
+ }
82763
+ return this._primary.hitTest(x, y);
82764
+ };
82765
+ DChartPlotAreaTwofoldSeriesContainer.prototype.calcHitPoint = function (x, y, result) {
82766
+ var _a;
82767
+ var result1 = result;
82768
+ var result2 = ((_a = DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT) !== null && _a !== void 0 ? _a : (DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT = new DChartSeriesHitResult()));
82769
+ var series2 = this._secondary.calcHitPoint(x, y, result2);
82770
+ var series1 = this._primary.calcHitPoint(x, y, result1);
82771
+ if (series1 != null) {
82772
+ if (series2 != null) {
82773
+ if (result1.distance <= result2.distance) {
82774
+ return series1;
82775
+ }
82776
+ else {
82777
+ result1.copyFrom(result2);
82778
+ return series2;
82779
+ }
82780
+ }
82781
+ else {
82782
+ return series1;
82783
+ }
82784
+ }
82785
+ else {
82786
+ if (series2 != null) {
82787
+ result1.copyFrom(result2);
82788
+ return series2;
82789
+ }
82790
+ else {
82791
+ return null;
82792
+ }
82793
+ }
82794
+ };
82795
+ return DChartPlotAreaTwofoldSeriesContainer;
82796
+ }());
82797
+
82798
+ /*
82799
+ * Copyright (C) 2019 Toshiba Corporation
82800
+ * SPDX-License-Identifier: Apache-2.0
82801
+ */
82802
+ var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
82803
+ function DChartPlotAreaTwofoldSubBase(plotArea, onContainerChange, mask, margin, axisShapeContainer, options) {
82804
+ this._isContainerBoundsDirty = true;
82805
+ this._containerBounds = new pixi_js.Rectangle();
82806
+ this._workPoint = new pixi_js.Point();
82807
+ this._margin = margin;
82808
+ this._plotArea = plotArea;
82809
+ // Container
82810
+ var container = new DChartPlotAreaContainer(onContainerChange);
82811
+ this._container = container;
82812
+ // Coordinate
82813
+ this._coordinate = new DChartCoordinateContainerImpl(this, options === null || options === void 0 ? void 0 : options.coordinate);
82814
+ // Overflow mask
82815
+ if (mask) {
82816
+ container.mask = this.getOverflowMask();
82817
+ }
82818
+ // Series
82819
+ this._series = new DChartSeriesContainerImpl(this, options === null || options === void 0 ? void 0 : options.series);
82820
+ // Axis
82821
+ this._axis = new DChartAxisContainerImpl(this, axisShapeContainer, options === null || options === void 0 ? void 0 : options.axis);
82822
+ }
82823
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "plotArea", {
82824
+ get: function () {
82825
+ return this._plotArea;
82826
+ },
82827
+ enumerable: false,
82828
+ configurable: true
82829
+ });
82830
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "chart", {
82831
+ get: function () {
82832
+ return this._plotArea.chart;
82833
+ },
82834
+ enumerable: false,
82835
+ configurable: true
82836
+ });
82837
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "container", {
82112
82838
  get: function () {
82113
82839
  return this._container;
82114
82840
  },
82115
82841
  enumerable: false,
82116
82842
  configurable: true
82117
82843
  });
82118
- Object.defineProperty(DChartPlotAreaImpl.prototype, "axis", {
82844
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "series", {
82119
82845
  get: function () {
82120
- return this._axis;
82846
+ return this._series;
82121
82847
  },
82122
82848
  enumerable: false,
82123
82849
  configurable: true
82124
82850
  });
82125
- Object.defineProperty(DChartPlotAreaImpl.prototype, "view", {
82851
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "coordinate", {
82126
82852
  get: function () {
82127
- return this._view;
82853
+ return this._coordinate;
82128
82854
  },
82129
82855
  enumerable: false,
82130
82856
  configurable: true
82131
82857
  });
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;
82858
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "axis", {
82859
+ get: function () {
82860
+ return this._axis;
82861
+ },
82862
+ enumerable: false,
82863
+ configurable: true
82864
+ });
82865
+ // eslint-disable-next-line @typescript-eslint/ban-types
82866
+ DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
82867
+ this._plotArea.on(name, callback, context);
82868
+ return this;
82136
82869
  };
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;
82870
+ // eslint-disable-next-line @typescript-eslint/ban-types
82871
+ DChartPlotAreaTwofoldSubBase.prototype.off = function (name, callback, context) {
82872
+ this._plotArea.off(name, callback, context);
82873
+ return this;
82141
82874
  };
82142
- DChartPlotAreaImpl.prototype.onDown = function (e) {
82143
- this._view.onDown(e);
82144
- _super.prototype.onDown.call(this, e);
82875
+ DChartPlotAreaTwofoldSubBase.prototype.getPixelDomain = function (result) {
82876
+ var plotArea = this._plotArea;
82877
+ var padding = plotArea.padding;
82878
+ var width = plotArea.width;
82879
+ return result.set(padding.getLeft(), width - padding.getRight());
82145
82880
  };
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);
82881
+ DChartPlotAreaTwofoldSubBase.prototype.getAxisBounds = function (position) {
82882
+ return this.getPixelBounds();
82883
+ };
82884
+ DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsX = function () {
82885
+ return this.getPixelBounds();
82154
82886
  };
82155
- DChartPlotAreaImpl.prototype.destroy = function () {
82887
+ DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsY = function () {
82888
+ return this.getPixelBounds();
82889
+ };
82890
+ DChartPlotAreaTwofoldSubBase.prototype.toBoundsDirty = function () {
82891
+ this._isContainerBoundsDirty = true;
82892
+ };
82893
+ DChartPlotAreaTwofoldSubBase.prototype.destroy = function () {
82156
82894
  this._container.destroy();
82157
82895
  this._series.destroy();
82158
82896
  this._axis.destroy();
82159
82897
  };
82160
- DChartPlotAreaImpl.prototype.getType = function () {
82161
- return "DChartPlotArea";
82898
+ return DChartPlotAreaTwofoldSubBase;
82899
+ }());
82900
+
82901
+ /*
82902
+ * Copyright (C) 2019 Toshiba Corporation
82903
+ * SPDX-License-Identifier: Apache-2.0
82904
+ */
82905
+ var DChartPlotAreaTwofoldSubPrimary = /** @class */ (function (_super) {
82906
+ __extends(DChartPlotAreaTwofoldSubPrimary, _super);
82907
+ function DChartPlotAreaTwofoldSubPrimary() {
82908
+ return _super !== null && _super.apply(this, arguments) || this;
82909
+ }
82910
+ DChartPlotAreaTwofoldSubPrimary.prototype.getOverflowMask = function () {
82911
+ if (this._overflowMask == null) {
82912
+ var plotArea = this._plotArea;
82913
+ this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskPrimary(plotArea);
82914
+ plotArea.reflowable.add(this._overflowMask);
82915
+ plotArea.toDirty();
82916
+ }
82917
+ return this._overflowMask;
82162
82918
  };
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;
82919
+ DChartPlotAreaTwofoldSubPrimary.prototype.getPixelRange = function (result) {
82920
+ var plotArea = this._plotArea;
82921
+ var padding = plotArea.padding;
82922
+ var paddingTop = padding.getTop();
82923
+ var height = plotArea.height;
82924
+ return result.set((height - this._margin) * 0.5, paddingTop);
82925
+ };
82926
+ DChartPlotAreaTwofoldSubPrimary.prototype.getPixelBounds = function () {
82927
+ var result = this._plotArea.getPixelBounds();
82928
+ result.height *= 0.5;
82929
+ return result;
82930
+ };
82931
+ DChartPlotAreaTwofoldSubPrimary.prototype.getContainerBounds = function () {
82932
+ var result = this._containerBounds;
82933
+ if (this._isContainerBoundsDirty) {
82934
+ this._isContainerBoundsDirty = false;
82935
+ var bounds = this._plotArea.getContainerBounds();
82936
+ result.width = bounds.width;
82937
+ result.height = bounds.height * 0.5;
82938
+ result.x = bounds.x;
82939
+ result.y = bounds.y;
82179
82940
  }
82180
82941
  return result;
82181
82942
  };
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;
82943
+ return DChartPlotAreaTwofoldSubPrimary;
82944
+ }(DChartPlotAreaTwofoldSubBase));
82945
+
82946
+ /*
82947
+ * Copyright (C) 2019 Toshiba Corporation
82948
+ * SPDX-License-Identifier: Apache-2.0
82949
+ */
82950
+ var DChartPlotAreaTwofoldSubSecondary = /** @class */ (function (_super) {
82951
+ __extends(DChartPlotAreaTwofoldSubSecondary, _super);
82952
+ function DChartPlotAreaTwofoldSubSecondary() {
82953
+ return _super !== null && _super.apply(this, arguments) || this;
82954
+ }
82955
+ DChartPlotAreaTwofoldSubSecondary.prototype.getOverflowMask = function () {
82956
+ if (this._overflowMask == null) {
82957
+ var plotArea = this._plotArea;
82958
+ this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskSecondary(plotArea);
82959
+ plotArea.reflowable.add(this._overflowMask);
82960
+ plotArea.toDirty();
82961
+ }
82962
+ return this._overflowMask;
82963
+ };
82964
+ DChartPlotAreaTwofoldSubSecondary.prototype.getPixelRange = function (result) {
82965
+ var plotArea = this._plotArea;
82966
+ var padding = plotArea.padding;
82967
+ var paddingBottom = padding.getBottom();
82968
+ var height = plotArea.height;
82969
+ return result.set(height - paddingBottom, (height + this._margin) * 0.5);
82970
+ };
82971
+ DChartPlotAreaTwofoldSubSecondary.prototype.getPixelBounds = function () {
82972
+ var result = this._plotArea.getPixelBounds();
82973
+ result.height *= 0.5;
82974
+ result.y = result.height;
82975
+ return result;
82976
+ };
82977
+ DChartPlotAreaTwofoldSubSecondary.prototype.getContainerBounds = function () {
82978
+ var result = this._containerBounds;
82979
+ if (this._isContainerBoundsDirty) {
82980
+ this._isContainerBoundsDirty = false;
82981
+ var bounds = this._plotArea.getContainerBounds();
82982
+ result.width = bounds.width;
82983
+ result.height = bounds.height * 0.5;
82984
+ result.x = bounds.x;
82985
+ result.y = bounds.y + result.height;
82986
+ }
82987
+ return result;
82988
+ };
82989
+ return DChartPlotAreaTwofoldSubSecondary;
82990
+ }(DChartPlotAreaTwofoldSubBase));
82991
+
82992
+ var DChartPlotAreaTwofoldViewTargetPoint = /** @class */ (function () {
82993
+ function DChartPlotAreaTwofoldViewTargetPoint(primary, secondary) {
82994
+ this._primary = primary;
82995
+ this._secondary = secondary;
82996
+ }
82997
+ Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "x", {
82998
+ get: function () {
82999
+ return this._secondary.x;
83000
+ },
83001
+ set: function (x) {
83002
+ this._primary.x = x;
83003
+ this._secondary.x = x;
83004
+ },
83005
+ enumerable: false,
83006
+ configurable: true
83007
+ });
83008
+ Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "y", {
83009
+ get: function () {
83010
+ return this._secondary.y;
83011
+ },
83012
+ set: function (y) {
83013
+ this._primary.y = y;
83014
+ this._secondary.y = y;
83015
+ },
83016
+ enumerable: false,
83017
+ configurable: true
83018
+ });
83019
+ DChartPlotAreaTwofoldViewTargetPoint.prototype.set = function (x, y) {
83020
+ this._primary.set(x, y);
83021
+ this._secondary.set(x, y);
83022
+ return this;
83023
+ };
83024
+ return DChartPlotAreaTwofoldViewTargetPoint;
83025
+ }());
83026
+ var DChartPlotAreaTwofoldViewTarget = /** @class */ (function () {
83027
+ function DChartPlotAreaTwofoldViewTarget(primary, secondary) {
83028
+ this._primary = primary;
83029
+ this._secondary = secondary;
83030
+ this._scale = new DChartPlotAreaTwofoldViewTargetPoint(primary.scale, secondary.scale);
83031
+ this._position = new DChartPlotAreaTwofoldViewTargetPoint(primary.position, secondary.position);
83032
+ }
83033
+ Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "scale", {
83034
+ get: function () {
83035
+ return this._scale;
83036
+ },
83037
+ enumerable: false,
83038
+ configurable: true
83039
+ });
83040
+ Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "position", {
83041
+ get: function () {
83042
+ return this._position;
83043
+ },
83044
+ enumerable: false,
83045
+ configurable: true
83046
+ });
83047
+ DChartPlotAreaTwofoldViewTarget.prototype.getLocalBounds = function (rect) {
83048
+ this._primary.getLocalBounds(rect);
83049
+ var x1 = rect.x;
83050
+ var y1 = rect.y;
83051
+ var w1 = rect.width;
83052
+ var h1 = rect.height;
83053
+ this._secondary.getLocalBounds(rect);
83054
+ var x2 = rect.x;
83055
+ var y2 = rect.y;
83056
+ var w2 = rect.width;
83057
+ var h2 = rect.height;
83058
+ var x3 = Math.min(x1, x2);
83059
+ var y3 = Math.min(y1, y2);
83060
+ var x4 = Math.max(x1 + w1, x2 + w2);
83061
+ var y4 = Math.max(y1 + h1, y2 + h2);
83062
+ rect.x = x3;
83063
+ rect.y = y3;
83064
+ rect.width = x4 - x3;
83065
+ rect.height = y4 - y3;
83066
+ return rect;
83067
+ };
83068
+ return DChartPlotAreaTwofoldViewTarget;
83069
+ }());
83070
+
83071
+ /*
83072
+ * Copyright (C) 2019 Toshiba Corporation
83073
+ * SPDX-License-Identifier: Apache-2.0
83074
+ */
83075
+ var DChartPlotAreaTwofold = /** @class */ (function (_super) {
83076
+ __extends(DChartPlotAreaTwofold, _super);
83077
+ function DChartPlotAreaTwofold(chart, options) {
83078
+ var _a, _b, _c, _d, _e, _f, _g;
83079
+ var _this = _super.call(this, chart, options) || this;
83080
+ // Margin
83081
+ var theme = _this.theme;
83082
+ var margin = (_a = options === null || options === void 0 ? void 0 : options.margin) !== null && _a !== void 0 ? _a : theme.getMargin();
83083
+ _this._margin = margin;
83084
+ // Primary
83085
+ var axisShapeContainer = new EShapeContainer();
83086
+ var onContainerChangeBound = function () {
83087
+ _this.onContainerChange();
83088
+ };
83089
+ var mask = (_b = options === null || options === void 0 ? void 0 : options.mask) !== null && _b !== void 0 ? _b : theme.isOverflowMaskEnabled();
83090
+ var primaryOptions = options === null || options === void 0 ? void 0 : options.primary;
83091
+ var primary = new DChartPlotAreaTwofoldSubPrimary(_this, onContainerChangeBound, mask, margin, axisShapeContainer, primaryOptions);
83092
+ _this._primary = primary;
83093
+ // Secondary
83094
+ var secondaryOptions = options === null || options === void 0 ? void 0 : options.secondary;
83095
+ var secondary = new DChartPlotAreaTwofoldSubSecondary(_this, onContainerChangeBound, mask, margin, axisShapeContainer, secondaryOptions);
83096
+ _this._secondary = secondary;
83097
+ // Container
83098
+ _this.addChild(primary.container);
83099
+ _this.addChild(secondary.container);
83100
+ // Coordinate
83101
+ _this._coordinate = new DChartPlotAreaTwofoldCoorinateContainer(_this, primary.coordinate, secondary.coordinate);
83102
+ // Series
83103
+ var primarySeries = primary.series;
83104
+ var secondarySeries = secondary.series;
83105
+ var series = new DChartPlotAreaTwofoldSeriesContainer(_this, primarySeries, secondarySeries);
83106
+ _this._series = series;
83107
+ // Axis
83108
+ var primaryAxis = primary.axis;
83109
+ var secondaryAxis = secondary.axis;
83110
+ _this.addChild(axisShapeContainer);
83111
+ var axis = new DChartPlotAreaTwofoldAxisContainer(_this, axisShapeContainer, primaryAxis, secondaryAxis);
83112
+ _this._axis = axis;
83113
+ // Add Series
83114
+ _this.addSeries(primarySeries, (_c = primaryOptions === null || primaryOptions === void 0 ? void 0 : primaryOptions.series) === null || _c === void 0 ? void 0 : _c.list);
83115
+ _this.addSeries(secondarySeries, (_d = secondaryOptions === null || secondaryOptions === void 0 ? void 0 : secondaryOptions.series) === null || _d === void 0 ? void 0 : _d.list);
83116
+ // Add Axes
83117
+ _this.addAxes(primaryAxis, (_e = primaryOptions === null || primaryOptions === void 0 ? void 0 : primaryOptions.axis) === null || _e === void 0 ? void 0 : _e.list);
83118
+ _this.addAxes(secondaryAxis, (_f = secondaryOptions === null || secondaryOptions === void 0 ? void 0 : secondaryOptions.axis) === null || _f === void 0 ? void 0 : _f.list);
83119
+ _this.addAxes(axis, (_g = options === null || options === void 0 ? void 0 : options.axis) === null || _g === void 0 ? void 0 : _g.list);
83120
+ // Selection
83121
+ var selection = options === null || options === void 0 ? void 0 : options.selection;
83122
+ if (selection != null) {
83123
+ primarySeries.selection = selection;
83124
+ secondarySeries.selection = selection;
83125
+ selection.bind(series);
83126
+ }
83127
+ return _this;
83128
+ }
83129
+ DChartPlotAreaTwofold.prototype.addSeries = function (series, list) {
83130
+ if (list != null) {
83131
+ var listLength = list.length;
83132
+ if (0 < listLength) {
83133
+ for (var i = 0; i < listLength; ++i) {
83134
+ series.add(list[i]);
83135
+ }
83136
+ series.update();
83137
+ }
83138
+ }
83139
+ };
83140
+ DChartPlotAreaTwofold.prototype.addAxes = function (axis, list) {
83141
+ if (list != null) {
83142
+ for (var i = 0, imax = list.length; i < imax; ++i) {
83143
+ axis.add(list[i]);
83144
+ }
83145
+ }
83146
+ };
83147
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "primary", {
83148
+ get: function () {
83149
+ return this._primary;
83150
+ },
83151
+ enumerable: false,
83152
+ configurable: true
83153
+ });
83154
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "secondary", {
83155
+ get: function () {
83156
+ return this._secondary;
83157
+ },
83158
+ enumerable: false,
83159
+ configurable: true
83160
+ });
83161
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "container", {
83162
+ get: function () {
83163
+ return this.secondary.container;
83164
+ },
83165
+ enumerable: false,
83166
+ configurable: true
83167
+ });
83168
+ DChartPlotAreaTwofold.prototype.onContainerChange = function () {
83169
+ this._isViewDirty = true;
83170
+ this._isContainerBoundsDirty = true;
83171
+ this._primary.toBoundsDirty();
83172
+ this._secondary.toBoundsDirty();
83173
+ DApplications.update(this);
83174
+ };
83175
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "coordinate", {
83176
+ get: function () {
83177
+ return this._coordinate;
83178
+ },
83179
+ enumerable: false,
83180
+ configurable: true
83181
+ });
83182
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "series", {
83183
+ get: function () {
83184
+ return this._series;
83185
+ },
83186
+ enumerable: false,
83187
+ configurable: true
83188
+ });
83189
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "axis", {
83190
+ get: function () {
83191
+ return this._axis;
83192
+ },
83193
+ enumerable: false,
83194
+ configurable: true
83195
+ });
83196
+ DChartPlotAreaTwofold.prototype.newView = function (options) {
83197
+ var _this = this;
83198
+ var viewTarget;
83199
+ var toViewTarget = function () {
83200
+ return (viewTarget !== null && viewTarget !== void 0 ? viewTarget : (viewTarget = new DChartPlotAreaTwofoldViewTarget(_this._primary.container, _this._secondary.container)));
83201
+ };
83202
+ return new DViewImpl(this, toViewTarget, options === null || options === void 0 ? void 0 : options.view);
83203
+ };
83204
+ DChartPlotAreaTwofold.prototype.onViewDirty = function () {
83205
+ this._coordinate.fit();
83206
+ this._axis.onRender();
83207
+ this._series.onRender();
83208
+ };
83209
+ DChartPlotAreaTwofold.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
82186
83210
  if (duration != null && duration <= 0) {
82187
- coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
82188
- axis.update();
82189
- series.update();
83211
+ var primary = this.primary;
83212
+ primary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
83213
+ primary.axis.update();
83214
+ primary.series.update();
83215
+ var secondary = this.secondary;
83216
+ secondary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
83217
+ secondary.axis.update();
83218
+ secondary.series.update();
82190
83219
  }
82191
83220
  else {
82192
83221
  this._blendDuration = duration != null ? duration : 200;
82193
83222
  this._blendStartTime = Date.now();
82194
- coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
83223
+ this.primary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
83224
+ this.secondary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
82195
83225
  var blendTimeout = this._blendTimeout;
82196
83226
  if (blendTimeout != null) {
82197
83227
  window.clearTimeout(blendTimeout);
@@ -82200,7 +83230,7 @@ var DChartPlotAreaImpl = /** @class */ (function (_super) {
82200
83230
  }
82201
83231
  return this;
82202
83232
  };
82203
- DChartPlotAreaImpl.prototype.onBlend = function () {
83233
+ DChartPlotAreaTwofold.prototype.onBlend = function () {
82204
83234
  var now = Date.now();
82205
83235
  var ratio = (now - this._blendStartTime) / this._blendDuration;
82206
83236
  if (ratio < 1) {
@@ -82210,12 +83240,24 @@ var DChartPlotAreaImpl = /** @class */ (function (_super) {
82210
83240
  this._blendTimeout = null;
82211
83241
  ratio = 1;
82212
83242
  }
82213
- this._coordinate.blend(DAnimationTimings.ELASTIC(ratio));
82214
- this._axis.update();
82215
- this._series.update();
83243
+ var t = DAnimationTimings.ELASTIC(ratio);
83244
+ var primary = this.primary;
83245
+ primary.coordinate.blend(t);
83246
+ primary.axis.update();
83247
+ primary.series.update();
83248
+ var secondary = this.secondary;
83249
+ secondary.coordinate.blend(t);
83250
+ secondary.axis.update();
83251
+ secondary.series.update();
83252
+ };
83253
+ DChartPlotAreaTwofold.prototype.destroy = function () {
83254
+ var _a, _b;
83255
+ (_a = this._primary) === null || _a === void 0 ? void 0 : _a.destroy();
83256
+ (_b = this._secondary) === null || _b === void 0 ? void 0 : _b.destroy();
83257
+ this._axis.destroy();
82216
83258
  };
82217
- return DChartPlotAreaImpl;
82218
- }(DBase));
83259
+ return DChartPlotAreaTwofold;
83260
+ }(DChartPlotAreaBase));
82219
83261
 
82220
83262
  /*
82221
83263
  * Copyright (C) 2019 Toshiba Corporation
@@ -82429,18 +83471,14 @@ var DChartSelectionGridlineX = /** @class */ (function (_super) {
82429
83471
  var shape = this._shape;
82430
83472
  if (shape) {
82431
83473
  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);
83474
+ var bounds = container.plotArea.getSelectionBoundsX();
83475
+ shape.transform.position.set(mappedX, bounds.y + bounds.height * 0.5);
83476
+ shape.size.set(0, bounds.height);
83477
+ shape.visible = bounds.x <= mappedX && mappedX <= bounds.x + bounds.width;
82436
83478
  return true;
82437
83479
  }
82438
83480
  return false;
82439
83481
  };
82440
- DChartSelectionGridlineX.prototype.isVisible = function (container, position, mappedPosition) {
82441
- var x = mappedPosition.x;
82442
- return 0 <= x && x <= container.plotArea.width;
82443
- };
82444
83482
  DChartSelectionGridlineX.prototype.getType = function () {
82445
83483
  return "DChartSelectionGridlineX";
82446
83484
  };
@@ -82460,18 +83498,14 @@ var DChartSelectionGridlineY = /** @class */ (function (_super) {
82460
83498
  var shape = this._shape;
82461
83499
  if (shape) {
82462
83500
  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);
83501
+ var bounds = container.plotArea.getSelectionBoundsY();
83502
+ shape.transform.position.set(bounds.x + bounds.width * 0.5, mappedY);
83503
+ shape.size.set(bounds.width, 0);
83504
+ shape.visible = bounds.y <= mappedY && mappedY <= bounds.y + bounds.height;
82467
83505
  return true;
82468
83506
  }
82469
83507
  return false;
82470
83508
  };
82471
- DChartSelectionGridlineY.prototype.isVisible = function (container, position, mappedPosition) {
82472
- var y = mappedPosition.y;
82473
- return 0 <= y && y <= container.plotArea.height;
82474
- };
82475
83509
  DChartSelectionGridlineY.prototype.getType = function () {
82476
83510
  return "DChartSelectionGridlineY";
82477
83511
  };
@@ -82499,8 +83533,11 @@ var DChartSelectionMarker = /** @class */ (function (_super) {
82499
83533
  DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition) {
82500
83534
  var x = mappedPosition.x;
82501
83535
  var y = mappedPosition.y;
82502
- var plotArea = container.plotArea;
82503
- return 0 <= x && x <= plotArea.width && 0 <= y && y <= plotArea.height;
83536
+ var bounds = container.plotArea.getPixelBounds();
83537
+ return (bounds.x <= x &&
83538
+ x <= bounds.x + bounds.width &&
83539
+ bounds.y <= y &&
83540
+ y <= bounds.y + bounds.height);
82504
83541
  };
82505
83542
  DChartSelectionMarker.prototype.getType = function () {
82506
83543
  return "DChartSelectionMarker";
@@ -84126,7 +85163,7 @@ var DChartSeriesLinear = /** @class */ (function (_super) {
84126
85163
  var p1x = NaN;
84127
85164
  var p1y = NaN;
84128
85165
  var threshold = 0.00001;
84129
- var bounds = container.plotArea.getBoundsInContainer();
85166
+ var bounds = container.plotArea.getContainerBounds();
84130
85167
  if (babs <= aabs) {
84131
85168
  var xfrom = xcoordinate.unmap(xcoordinate.transform.unmap(bounds.x));
84132
85169
  var xto = xcoordinate.unmap(xcoordinate.transform.unmap(bounds.x + bounds.width));
@@ -84291,10 +85328,8 @@ var DChart = /** @class */ (function (_super) {
84291
85328
  DChart.prototype.init = function (options) {
84292
85329
  var _a;
84293
85330
  _super.prototype.init.call(this, options);
84294
- // Plot area
84295
- var plotArea = this.plotArea;
84296
- this.addChild(plotArea);
84297
85331
  // Overflow mask
85332
+ var plotArea = this.plotArea;
84298
85333
  var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : this.theme.isOverflowMaskEnabled();
84299
85334
  if (mask) {
84300
85335
  plotArea.axis.container.mask = this.getOverflowMask();
@@ -84310,22 +85345,25 @@ var DChart = /** @class */ (function (_super) {
84310
85345
  };
84311
85346
  Object.defineProperty(DChart.prototype, "plotArea", {
84312
85347
  get: function () {
84313
- var result = this._plotArea;
84314
- if (result == null) {
84315
- result = this.newPlotArea();
84316
- this._plotArea = result;
84317
- }
84318
- return result;
85348
+ var _a;
85349
+ return ((_a = this._plotArea) !== null && _a !== void 0 ? _a : (this._plotArea = this.newPlotArea()));
84319
85350
  },
84320
85351
  enumerable: false,
84321
85352
  configurable: true
84322
85353
  });
84323
85354
  DChart.prototype.newPlotArea = function () {
84324
85355
  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";
85356
+ var plotArea = (_a = this._options) === null || _a === void 0 ? void 0 : _a.plotArea;
85357
+ if (plotArea != null && ("primary" in plotArea || "secondary" in plotArea)) {
85358
+ var result = new DChartPlotAreaTwofold(this, plotArea);
85359
+ this.addChild(result);
85360
+ return result;
85361
+ }
85362
+ else {
85363
+ var result = new DChartPlotAreaOnefold(this, plotArea);
85364
+ this.addChild(result);
85365
+ return result;
85366
+ }
84329
85367
  };
84330
85368
  DChart.prototype.destroy = function () {
84331
85369
  var _a;
@@ -84334,6 +85372,9 @@ var DChart = /** @class */ (function (_super) {
84334
85372
  _super.prototype.destroy.call(this);
84335
85373
  }
84336
85374
  };
85375
+ DChart.prototype.getType = function () {
85376
+ return "DChart";
85377
+ };
84337
85378
  return DChart;
84338
85379
  }(DBase));
84339
85380
 
@@ -99731,8 +100772,21 @@ exports.DChartCoordinateTransformMarkImpl = DChartCoordinateTransformMarkImpl;
99731
100772
  exports.DChartLegend = DChartLegend;
99732
100773
  exports.DChartLegendItem = DChartLegendItem;
99733
100774
  exports.DChartOverview = DChartOverview;
100775
+ exports.DChartPlotAreaBase = DChartPlotAreaBase;
99734
100776
  exports.DChartPlotAreaContainer = DChartPlotAreaContainer;
99735
- exports.DChartPlotAreaImpl = DChartPlotAreaImpl;
100777
+ exports.DChartPlotAreaOnefold = DChartPlotAreaOnefold;
100778
+ exports.DChartPlotAreaTwofold = DChartPlotAreaTwofold;
100779
+ exports.DChartPlotAreaTwofoldAxisContainer = DChartPlotAreaTwofoldAxisContainer;
100780
+ exports.DChartPlotAreaTwofoldCoorinateContainer = DChartPlotAreaTwofoldCoorinateContainer;
100781
+ exports.DChartPlotAreaTwofoldCoorinateContainerSub = DChartPlotAreaTwofoldCoorinateContainerSub;
100782
+ exports.DChartPlotAreaTwofoldOverflowMaskPrimary = DChartPlotAreaTwofoldOverflowMaskPrimary;
100783
+ exports.DChartPlotAreaTwofoldOverflowMaskSecondary = DChartPlotAreaTwofoldOverflowMaskSecondary;
100784
+ exports.DChartPlotAreaTwofoldSeriesContainer = DChartPlotAreaTwofoldSeriesContainer;
100785
+ exports.DChartPlotAreaTwofoldSubBase = DChartPlotAreaTwofoldSubBase;
100786
+ exports.DChartPlotAreaTwofoldSubPrimary = DChartPlotAreaTwofoldSubPrimary;
100787
+ exports.DChartPlotAreaTwofoldSubSecondary = DChartPlotAreaTwofoldSubSecondary;
100788
+ exports.DChartPlotAreaTwofoldViewTarget = DChartPlotAreaTwofoldViewTarget;
100789
+ exports.DChartPlotAreaTwofoldViewTargetPoint = DChartPlotAreaTwofoldViewTargetPoint;
99736
100790
  exports.DChartRegionImpl = DChartRegionImpl;
99737
100791
  exports.DChartRegionImplObservable = DChartRegionImplObservable;
99738
100792
  exports.DChartSelectionContainerImpl = DChartSelectionContainerImpl;