@wcardinal/wcardinal-ui 0.417.0 → 0.419.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +7 -7
  2. package/dist/types/wcardinal/ui/d-chart-axis-container-impl.d.ts +4 -4
  3. package/dist/types/wcardinal/ui/d-chart-axis-container.d.ts +2 -2
  4. package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +3 -5
  5. package/dist/types/wcardinal/ui/d-chart-coordinate-container-impl.d.ts +4 -4
  6. package/dist/types/wcardinal/ui/d-chart-coordinate-container.d.ts +2 -2
  7. package/dist/types/wcardinal/ui/{d-chart-plot-area-impl.d.ts → d-chart-plot-area-base.d.ts} +23 -20
  8. package/dist/types/wcardinal/ui/d-chart-plot-area-onefold.d.ts +41 -0
  9. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-axis-container.d.ts +24 -0
  10. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.d.ts +22 -0
  11. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.d.ts +18 -0
  12. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.d.ts +5 -0
  13. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.d.ts +5 -0
  14. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-series-container.d.ts +43 -0
  15. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +46 -0
  16. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.d.ts +11 -0
  17. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.d.ts +11 -0
  18. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub.d.ts +22 -0
  19. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-view-target.d.ts +30 -0
  20. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold.d.ts +46 -0
  21. package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +31 -7
  22. package/dist/types/wcardinal/ui/d-chart-selection-gridline-x.d.ts +0 -1
  23. package/dist/types/wcardinal/ui/d-chart-selection-gridline-y.d.ts +0 -1
  24. package/dist/types/wcardinal/ui/d-chart-series-container-impl.d.ts +5 -4
  25. package/dist/types/wcardinal/ui/d-chart-series-container.d.ts +2 -3
  26. package/dist/types/wcardinal/ui/d-chart.d.ts +5 -3
  27. package/dist/types/wcardinal/ui/index.d.ts +14 -1
  28. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.d.ts +1 -0
  29. package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.d.ts +1 -0
  30. package/dist/types/wcardinal/ui/util/dynamic-font-atlas-font.d.ts +1 -0
  31. package/dist/types/wcardinal/ui/util/dynamic-sdf-font-atlas-font.d.ts +12 -0
  32. package/dist/types/wcardinal/ui/util/dynamic-sdf-font-atlas.d.ts +2 -9
  33. package/dist/types/wcardinal/ui/util/index.d.ts +1 -0
  34. package/dist/types/wcardinal/ui/util/util-font.d.ts +7 -2
  35. package/dist/wcardinal/ui/d-chart-axis-base-bar.js +13 -8
  36. package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -1
  37. package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js +1 -0
  38. package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js.map +1 -1
  39. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +15 -14
  40. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
  41. package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js +4 -6
  42. package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js.map +1 -1
  43. package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js +4 -6
  44. package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js.map +1 -1
  45. package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +4 -6
  46. package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
  47. package/dist/wcardinal/ui/d-chart-axis-container-impl.js +2 -3
  48. package/dist/wcardinal/ui/d-chart-axis-container-impl.js.map +1 -1
  49. package/dist/wcardinal/ui/d-chart-axis-container.js.map +1 -1
  50. package/dist/wcardinal/ui/d-chart-axis-guide-simple.js +9 -6
  51. package/dist/wcardinal/ui/d-chart-axis-guide-simple.js.map +1 -1
  52. package/dist/wcardinal/ui/d-chart-coordinate-base.js +2 -10
  53. package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -1
  54. package/dist/wcardinal/ui/d-chart-coordinate-container-impl.js.map +1 -1
  55. package/dist/wcardinal/ui/d-chart-coordinate-container.js.map +1 -1
  56. package/dist/wcardinal/ui/d-chart-plot-area-base.js +117 -0
  57. package/dist/wcardinal/ui/d-chart-plot-area-base.js.map +1 -0
  58. package/dist/wcardinal/ui/d-chart-plot-area-onefold.js +166 -0
  59. package/dist/wcardinal/ui/d-chart-plot-area-onefold.js.map +1 -0
  60. package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js +128 -0
  61. package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js.map +1 -0
  62. package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js +118 -0
  63. package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js.map +1 -0
  64. package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js +53 -0
  65. package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js.map +1 -0
  66. package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js +28 -0
  67. package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js.map +1 -0
  68. package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js +28 -0
  69. package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js.map +1 -0
  70. package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js +186 -0
  71. package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js.map +1 -0
  72. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +109 -0
  73. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -0
  74. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js +49 -0
  75. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js.map +1 -0
  76. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js +50 -0
  77. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js.map +1 -0
  78. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js +6 -0
  79. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js.map +1 -0
  80. package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js +81 -0
  81. package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js.map +1 -0
  82. package/dist/wcardinal/ui/d-chart-plot-area-twofold.js +204 -0
  83. package/dist/wcardinal/ui/d-chart-plot-area-twofold.js.map +1 -0
  84. package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
  85. package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +4 -8
  86. package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
  87. package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +4 -8
  88. package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
  89. package/dist/wcardinal/ui/d-chart-selection-marker.js +5 -2
  90. package/dist/wcardinal/ui/d-chart-selection-marker.js.map +1 -1
  91. package/dist/wcardinal/ui/d-chart-series-container-impl.js +4 -2
  92. package/dist/wcardinal/ui/d-chart-series-container-impl.js.map +1 -1
  93. package/dist/wcardinal/ui/d-chart-series-container.js.map +1 -1
  94. package/dist/wcardinal/ui/d-chart-series-linear.js +1 -1
  95. package/dist/wcardinal/ui/d-chart-series-linear.js.map +1 -1
  96. package/dist/wcardinal/ui/d-chart.js +19 -14
  97. package/dist/wcardinal/ui/d-chart.js.map +1 -1
  98. package/dist/wcardinal/ui/index.js +14 -1
  99. package/dist/wcardinal/ui/index.js.map +1 -1
  100. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js +3 -0
  101. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js.map +1 -1
  102. package/dist/wcardinal/ui/theme/dark/d-theme-dark-font.js +1 -1
  103. package/dist/wcardinal/ui/theme/dark/d-theme-dark-font.js.map +1 -1
  104. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js +3 -0
  105. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js.map +1 -1
  106. package/dist/wcardinal/ui/theme/white/d-theme-white-font.js +1 -1
  107. package/dist/wcardinal/ui/theme/white/d-theme-white-font.js.map +1 -1
  108. package/dist/wcardinal/ui/util/dynamic-font-atlas-font.js +3 -4
  109. package/dist/wcardinal/ui/util/dynamic-font-atlas-font.js.map +1 -1
  110. package/dist/wcardinal/ui/util/dynamic-font-atlas.js +5 -3
  111. package/dist/wcardinal/ui/util/dynamic-font-atlas.js.map +1 -1
  112. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas-font.js +30 -0
  113. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas-font.js.map +1 -0
  114. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js +13 -27
  115. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js.map +1 -1
  116. package/dist/wcardinal/ui/util/index.js +1 -0
  117. package/dist/wcardinal/ui/util/index.js.map +1 -1
  118. package/dist/wcardinal/ui/util/util-font.js +14 -21
  119. package/dist/wcardinal/ui/util/util-font.js.map +1 -1
  120. package/dist/wcardinal-ui-theme-dark-en-us.js +5 -2
  121. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  122. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  123. package/dist/wcardinal-ui-theme-dark-ja-jp.js +5 -2
  124. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  125. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  126. package/dist/wcardinal-ui-theme-dark.js +5 -2
  127. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  128. package/dist/wcardinal-ui-theme-white-en-us.js +5 -2
  129. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  130. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  131. package/dist/wcardinal-ui-theme-white-ja-jp.js +5 -2
  132. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  133. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  134. package/dist/wcardinal-ui-theme-white.js +5 -2
  135. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  136. package/dist/wcardinal-ui.cjs.js +1391 -337
  137. package/dist/wcardinal-ui.js +1383 -335
  138. package/dist/wcardinal-ui.min.js +2 -2
  139. package/dist/wcardinal-ui.min.js.map +1 -1
  140. package/package.json +1 -1
  141. package/dist/wcardinal/ui/d-chart-plot-area-impl.js +0 -237
  142. package/dist/wcardinal/ui/d-chart-plot-area-impl.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.417.0
2
+ Winter Cardinal UI v0.419.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -21224,6 +21224,34 @@ var DynamicFontAtlasCharacterType = {
21224
21224
  LETTER_RNB: LETTER_RNB
21225
21225
  };
21226
21226
 
21227
+ /*
21228
+ * Copyright (C) 2019 Toshiba Corporation
21229
+ * SPDX-License-Identifier: Apache-2.0
21230
+ */
21231
+ var DynamicSDFFontAtlasFont = /** @class */ (function () {
21232
+ function DynamicSDFFontAtlasFont(fontFamily) {
21233
+ this.id = DynamicSDFFontAtlasFont.toFontFamily(fontFamily);
21234
+ this.size = 32;
21235
+ this.italic = false;
21236
+ this.measured = false;
21237
+ this.ascent = 0;
21238
+ this.descent = 0;
21239
+ }
21240
+ DynamicSDFFontAtlasFont.toFontFamily = function (fontFamily) {
21241
+ return fontFamily === "auto" ? DynamicSDFFontAtlasFont.getAutoFontFamily() : fontFamily;
21242
+ };
21243
+ DynamicSDFFontAtlasFont.getAutoFontFamily = function () {
21244
+ if (DynamicSDFFontAtlasFont.FONT_FAMILY_AUTO == null) {
21245
+ DynamicSDFFontAtlasFont.FONT_FAMILY_AUTO = DThemes.getInstance()
21246
+ .get("DBase")
21247
+ .getFontFamilly();
21248
+ }
21249
+ return DynamicSDFFontAtlasFont.FONT_FAMILY_AUTO;
21250
+ };
21251
+ DynamicSDFFontAtlasFont.FONT_FAMILY_AUTO = null;
21252
+ return DynamicSDFFontAtlasFont;
21253
+ }());
21254
+
21227
21255
  /*
21228
21256
  * Copyright (C) 2019 Toshiba Corporation
21229
21257
  * SPDX-License-Identifier: Apache-2.0
@@ -21512,6 +21540,69 @@ var DynamicSDFFontGenerator = /** @class */ (function () {
21512
21540
  return DynamicSDFFontGenerator;
21513
21541
  }());
21514
21542
 
21543
+ /*
21544
+ * Copyright (C) 2019 Toshiba Corporation
21545
+ * SPDX-License-Identifier: Apache-2.0
21546
+ */
21547
+ var UtilFont = /** @class */ (function () {
21548
+ function UtilFont() {
21549
+ }
21550
+ UtilFont.measure = function (context, font) {
21551
+ if (!font.measured) {
21552
+ if ("fontBoundingBoxAscent" in window.TextMetrics.prototype) {
21553
+ var metrics = context.measureText(pixi_js.TextMetrics.METRICS_STRING);
21554
+ font.ascent = metrics.fontBoundingBoxAscent;
21555
+ font.descent = metrics.fontBoundingBoxDescent;
21556
+ }
21557
+ else {
21558
+ var measured = pixi_js.TextMetrics.measureFont(font.id);
21559
+ font.ascent = measured.ascent;
21560
+ font.descent = measured.descent;
21561
+ }
21562
+ font.measured = true;
21563
+ }
21564
+ };
21565
+ UtilFont.toSize = function (font) {
21566
+ this.setup(font);
21567
+ return parseFloat(window.getComputedStyle(this._span).fontSize);
21568
+ };
21569
+ UtilFont.setup = function (font) {
21570
+ var span = this._span;
21571
+ if (span == null) {
21572
+ span = document.createElement("span");
21573
+ span.innerText = "|ÉqÅ";
21574
+ span.style.border = "none";
21575
+ span.style.margin = "0px";
21576
+ this._span = span;
21577
+ }
21578
+ var block = this._block;
21579
+ if (block == null) {
21580
+ block = document.createElement("div");
21581
+ block.style.display = "inline-block";
21582
+ block.style.width = "0px";
21583
+ block.style.height = "0px";
21584
+ block.style.border = "none";
21585
+ block.style.margin = "0px";
21586
+ block.style.verticalAlign = "baseline";
21587
+ this._block = block;
21588
+ }
21589
+ var div = this._div;
21590
+ if (div == null) {
21591
+ div = document.createElement("div");
21592
+ div.style.position = "absolute";
21593
+ div.style.padding = "0px";
21594
+ div.style.margin = "0px";
21595
+ div.style.visibility = "hidden";
21596
+ div.appendChild(span);
21597
+ div.appendChild(block);
21598
+ document.body.appendChild(div);
21599
+ this._div = div;
21600
+ }
21601
+ span.style.font = font;
21602
+ };
21603
+ return UtilFont;
21604
+ }());
21605
+
21515
21606
  /*
21516
21607
  * Copyright (C) 2019 Toshiba Corporation
21517
21608
  * SPDX-License-Identifier: Apache-2.0
@@ -21521,11 +21612,7 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21521
21612
  this._id = "font-atlas:".concat(fontFamily);
21522
21613
  this._generator = DynamicSDFFontGenerator.getInstance().init();
21523
21614
  this._canvas = document.createElement("canvas");
21524
- this._font = {
21525
- family: DynamicSDFFontAtlas.toFontFamily(fontFamily),
21526
- size: 32,
21527
- italic: false
21528
- };
21615
+ this._font = new DynamicSDFFontAtlasFont(fontFamily);
21529
21616
  this._characters = {};
21530
21617
  this._length = 0;
21531
21618
  this._width = 1;
@@ -21544,7 +21631,7 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21544
21631
  return this._font;
21545
21632
  },
21546
21633
  set: function (font) {
21547
- this._font.family = font.family;
21634
+ this._font.id = font.id;
21548
21635
  this._font.size = font.size;
21549
21636
  this._font.italic = font.italic;
21550
21637
  },
@@ -21669,19 +21756,20 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21669
21756
  var font = this._font;
21670
21757
  var characters = this._characters;
21671
21758
  var characterSize = font.size + 14;
21672
- var width = DynamicSDFFontAtlas.toPowerOf2(Math.ceil(Math.sqrt(this._length)) * characterSize);
21759
+ var width = this.toPowerOf2(Math.ceil(Math.sqrt(this._length)) * characterSize);
21673
21760
  this._width = width;
21674
- var fontStyle = (font.italic ? "italic " : "") + (font.size + "px ") + font.family;
21761
+ var fontStyle = (font.italic ? "italic " : "") + (font.size + "px ") + font.id;
21675
21762
  context.font = fontStyle;
21676
21763
  context.textAlign = "left";
21677
- context.textBaseline = "middle";
21764
+ context.textBaseline = "alphabetic";
21678
21765
  context.lineWidth = 0;
21679
21766
  context.lineCap = "round";
21680
21767
  context.lineJoin = "miter";
21681
- context.miterLimit = 0;
21768
+ context.miterLimit = 10;
21682
21769
  context.fillStyle = "#FFFFFF";
21770
+ UtilFont.measure(context, font);
21683
21771
  var offsetX = 7;
21684
- var offsetY = characterSize >> 1;
21772
+ var offsetY = Math.round((characterSize - (font.ascent + font.descent)) * 0.5 + font.ascent);
21685
21773
  var x = 0;
21686
21774
  var y = 0;
21687
21775
  for (var id in characters) {
@@ -21710,11 +21798,11 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21710
21798
  canvas.height = height;
21711
21799
  context.font = fontStyle;
21712
21800
  context.textAlign = "left";
21713
- context.textBaseline = "middle";
21801
+ context.textBaseline = "alphabetic";
21714
21802
  context.lineWidth = 0;
21715
21803
  context.lineCap = "round";
21716
21804
  context.lineJoin = "miter";
21717
- context.miterLimit = 4;
21805
+ context.miterLimit = 10;
21718
21806
  context.fillStyle = "#FFFFFF";
21719
21807
  context.clearRect(0, 0, width, height);
21720
21808
  for (var id in characters) {
@@ -21763,25 +21851,13 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21763
21851
  delete characters[id];
21764
21852
  }
21765
21853
  };
21766
- DynamicSDFFontAtlas.toFontFamily = function (fontFamily) {
21767
- return fontFamily === "auto" ? DynamicSDFFontAtlas.getAutoFontFamily() : fontFamily;
21768
- };
21769
- DynamicSDFFontAtlas.toPowerOf2 = function (size) {
21854
+ DynamicSDFFontAtlas.prototype.toPowerOf2 = function (size) {
21770
21855
  var result = 32;
21771
21856
  while (result < size) {
21772
21857
  result <<= 1;
21773
21858
  }
21774
21859
  return result;
21775
21860
  };
21776
- DynamicSDFFontAtlas.getAutoFontFamily = function () {
21777
- if (DynamicSDFFontAtlas.FONT_FAMILY_AUTO == null) {
21778
- DynamicSDFFontAtlas.FONT_FAMILY_AUTO = DThemes.getInstance()
21779
- .get("DBase")
21780
- .getFontFamilly();
21781
- }
21782
- return DynamicSDFFontAtlas.FONT_FAMILY_AUTO;
21783
- };
21784
- DynamicSDFFontAtlas.FONT_FAMILY_AUTO = null;
21785
21861
  return DynamicSDFFontAtlas;
21786
21862
  }());
21787
21863
 
@@ -29126,77 +29202,6 @@ var DDynamicTextGeometry = /** @class */ (function (_super) {
29126
29202
  return DDynamicTextGeometry;
29127
29203
  }(pixi_js.MeshGeometry));
29128
29204
 
29129
- /*
29130
- * Copyright (C) 2019 Toshiba Corporation
29131
- * SPDX-License-Identifier: Apache-2.0
29132
- */
29133
- var UtilFont = /** @class */ (function () {
29134
- function UtilFont() {
29135
- }
29136
- UtilFont.measure = function (font) {
29137
- var results = this._results;
29138
- if (results == null) {
29139
- results = new Map();
29140
- this._results = results;
29141
- }
29142
- var result = results.get(font);
29143
- if (result != null) {
29144
- return result;
29145
- }
29146
- this.setup(font);
29147
- var blockRect = this._block.getBoundingClientRect();
29148
- var blockRectTop = blockRect.top;
29149
- var spanRect = this._span.getBoundingClientRect();
29150
- var ascent = blockRectTop - spanRect.top;
29151
- var descent = spanRect.bottom - blockRectTop;
29152
- result = {
29153
- ascent: ascent,
29154
- descent: descent
29155
- };
29156
- results.set(font, result);
29157
- return result;
29158
- };
29159
- UtilFont.toSize = function (font) {
29160
- this.setup(font);
29161
- return parseFloat(window.getComputedStyle(this._span).fontSize);
29162
- };
29163
- UtilFont.setup = function (font) {
29164
- var span = this._span;
29165
- if (span == null) {
29166
- span = document.createElement("span");
29167
- span.innerText = "|ÉqÅ";
29168
- span.style.border = "none";
29169
- span.style.margin = "0px";
29170
- this._span = span;
29171
- }
29172
- var block = this._block;
29173
- if (block == null) {
29174
- block = document.createElement("div");
29175
- block.style.display = "inline-block";
29176
- block.style.width = "0px";
29177
- block.style.height = "0px";
29178
- block.style.border = "none";
29179
- block.style.margin = "0px";
29180
- block.style.verticalAlign = "baseline";
29181
- this._block = block;
29182
- }
29183
- var div = this._div;
29184
- if (div == null) {
29185
- div = document.createElement("div");
29186
- div.style.position = "absolute";
29187
- div.style.padding = "0px";
29188
- div.style.margin = "0px";
29189
- div.style.visibility = "hidden";
29190
- div.appendChild(span);
29191
- div.appendChild(block);
29192
- document.body.appendChild(div);
29193
- this._div = div;
29194
- }
29195
- span.style.font = font;
29196
- };
29197
- return UtilFont;
29198
- }());
29199
-
29200
29205
  /*
29201
29206
  * Copyright (C) 2019 Toshiba Corporation
29202
29207
  * SPDX-License-Identifier: Apache-2.0
@@ -48452,7 +48457,7 @@ var DThemeWhiteFont = /** @class */ (function () {
48452
48457
  function DThemeWhiteFont() {
48453
48458
  }
48454
48459
  DThemeWhiteFont.prototype.getFontFamilly = function () {
48455
- return "\"Helvetica Neue\",\"Helvetica\",\"Hiragino Sans\",\"Hiragino Kaku Gothic ProN\",\"BIZ UDPGothic\",\"Arial\",\"Yu Gothic\",\"Meiryo\",sans-serif";
48460
+ return "\"Helvetica Neue\",\"Helvetica\",\"Hiragino Sans\",\"Hiragino Kaku Gothic ProN\",\"BIZ UDPGothic\",\"Arial\",\"Yu Gothic UI\",\"Meiryo UI\",sans-serif";
48456
48461
  };
48457
48462
  DThemeWhiteFont.prototype.getFontSize = function () {
48458
48463
  return 14;
@@ -50094,6 +50099,9 @@ var DThemeWhiteChartPlotArea = /** @class */ (function (_super) {
50094
50099
  DThemeWhiteChartPlotArea.prototype.isOverflowMaskEnabled = function () {
50095
50100
  return true;
50096
50101
  };
50102
+ DThemeWhiteChartPlotArea.prototype.getMargin = function () {
50103
+ return 20;
50104
+ };
50097
50105
  return DThemeWhiteChartPlotArea;
50098
50106
  }(DThemeWhiteBase));
50099
50107
 
@@ -59601,7 +59609,7 @@ var DThemeDarkFont = /** @class */ (function () {
59601
59609
  function DThemeDarkFont() {
59602
59610
  }
59603
59611
  DThemeDarkFont.prototype.getFontFamilly = function () {
59604
- return "\"Helvetica Neue\",\"Helvetica\",\"Hiragino Sans\",\"Hiragino Kaku Gothic ProN\",\"BIZ UDPGothic\",\"Arial\",\"Yu Gothic\",\"Meiryo\",sans-serif";
59612
+ return "\"Helvetica Neue\",\"Helvetica\",\"Hiragino Sans\",\"Hiragino Kaku Gothic ProN\",\"BIZ UDPGothic\",\"Arial\",\"Yu Gothic UI\",\"Meiryo UI\",sans-serif";
59605
59613
  };
59606
59614
  DThemeDarkFont.prototype.getFontSize = function () {
59607
59615
  return 14;
@@ -61214,6 +61222,9 @@ var DThemeDarkChartPlotArea = /** @class */ (function (_super) {
61214
61222
  DThemeDarkChartPlotArea.prototype.isOverflowMaskEnabled = function () {
61215
61223
  return true;
61216
61224
  };
61225
+ DThemeDarkChartPlotArea.prototype.getMargin = function () {
61226
+ return 20;
61227
+ };
61217
61228
  return DThemeDarkChartPlotArea;
61218
61229
  }(DThemeDarkBase));
61219
61230
 
@@ -70060,9 +70071,9 @@ var DynamicFontAtlasFont = /** @class */ (function () {
70060
70071
  this.size = size;
70061
70072
  this.color = pixi_js.utils.hex2string(color);
70062
70073
  this.height = size + padding * 2;
70063
- var metrics = UtilFont.measure(fontId);
70064
- this.ascent = metrics.ascent;
70065
- this.descent = metrics.descent;
70074
+ this.measured = false;
70075
+ this.ascent = 0;
70076
+ this.descent = 0;
70066
70077
  }
70067
70078
  return DynamicFontAtlasFont;
70068
70079
  }());
@@ -70263,7 +70274,7 @@ var DynamicFontAtlas = /** @class */ (function () {
70263
70274
  context.lineWidth = 0;
70264
70275
  context.lineCap = "round";
70265
70276
  context.lineJoin = "miter";
70266
- context.miterLimit = 0;
70277
+ context.miterLimit = 10;
70267
70278
  context.fillStyle = font.color;
70268
70279
  context.strokeStyle = "#0000ff";
70269
70280
  }
@@ -70280,7 +70291,6 @@ var DynamicFontAtlas = /** @class */ (function () {
70280
70291
  var characters = this._characters;
70281
70292
  var width = (this._width = this.toPowerOf2(Math.ceil(Math.sqrt(this._length)) * fontHeight));
70282
70293
  var offsetX = this._padding;
70283
- var offsetY = Math.round((fontHeight - (font.ascent + font.descent)) * 0.5 + font.ascent);
70284
70294
  var x = 0;
70285
70295
  var y = 0;
70286
70296
  for (var key in characters) {
@@ -70292,7 +70302,6 @@ var DynamicFontAtlas = /** @class */ (function () {
70292
70302
  character.x = x;
70293
70303
  character.y = y;
70294
70304
  character.origin.x = x + offsetX;
70295
- character.origin.y = y + offsetY;
70296
70305
  x += character.width;
70297
70306
  }
70298
70307
  var height = (this._height = y + fontHeight);
@@ -70307,11 +70316,14 @@ var DynamicFontAtlas = /** @class */ (function () {
70307
70316
  canvas.height = realHeight;
70308
70317
  var context = this.getContext();
70309
70318
  if (context != null) {
70319
+ UtilFont.measure(context, font);
70320
+ var offsetY = Math.round((fontHeight - (font.ascent + font.descent)) * 0.5 + font.ascent);
70310
70321
  context.save();
70311
70322
  context.scale(resolution, resolution);
70312
70323
  context.clearRect(0, 0, width, height);
70313
70324
  for (var key in characters) {
70314
70325
  var character = characters[key];
70326
+ character.origin.y = character.y + offsetY;
70315
70327
  context.fillText(key, character.origin.x, character.origin.y);
70316
70328
  }
70317
70329
  context.restore();
@@ -78820,28 +78832,32 @@ var DChartAxisBaseBar = /** @class */ (function () {
78820
78832
  var index = this._index;
78821
78833
  var shape = this._shape;
78822
78834
  if (shape != null && container != null) {
78835
+ var parser = this._parser;
78823
78836
  var plotArea = container.plotArea;
78824
- var plotAreaWidth = plotArea.width;
78825
- var plotAreaHeight = plotArea.height;
78826
- 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;
78827
78843
  shape.lock(EShapeLockPart.UPLOADED);
78828
78844
  var position = shape.transform.position;
78829
78845
  var size = shape.size;
78830
- switch (this._parser.position) {
78846
+ switch (parser.position) {
78831
78847
  case DChartAxisPosition.TOP:
78832
- position.set(plotAreaWidth * 0.5, 0 - offset);
78848
+ position.set(plotAreaX + plotAreaWidth * 0.5, plotAreaY - offset);
78833
78849
  size.set(plotAreaWidth, 0);
78834
78850
  break;
78835
78851
  case DChartAxisPosition.BOTTOM:
78836
- position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
78852
+ position.set(plotAreaX + plotAreaWidth * 0.5, plotAreaY + plotAreaHeight + offset);
78837
78853
  size.set(plotAreaWidth, 0);
78838
78854
  break;
78839
78855
  case DChartAxisPosition.LEFT:
78840
- position.set(0 - offset, plotAreaHeight * 0.5);
78856
+ position.set(plotAreaX - offset, plotAreaY + plotAreaHeight * 0.5);
78841
78857
  size.set(0, plotAreaHeight);
78842
78858
  break;
78843
78859
  case DChartAxisPosition.RIGHT:
78844
- position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
78860
+ position.set(plotAreaX + plotAreaWidth + offset, plotAreaY + plotAreaHeight * 0.5);
78845
78861
  size.set(0, plotAreaHeight);
78846
78862
  break;
78847
78863
  }
@@ -78853,6 +78869,7 @@ var DChartAxisBaseBar = /** @class */ (function () {
78853
78869
  DChartAxisBaseBar.prototype.destroy = function () {
78854
78870
  var shape = this._shape;
78855
78871
  if (shape != null) {
78872
+ this._shape = undefined;
78856
78873
  shape.destroy();
78857
78874
  }
78858
78875
  this._index = 0;
@@ -78929,6 +78946,7 @@ var DChartAxisBaseGuideContainer = /** @class */ (function () {
78929
78946
  for (var i = 0, imax = list.length; i < imax; ++i) {
78930
78947
  list[i].destroy();
78931
78948
  }
78949
+ list.length = 0;
78932
78950
  this._index = 0;
78933
78951
  this._container = undefined;
78934
78952
  };
@@ -79395,12 +79413,8 @@ var DChartAxisBaseTickMajorGridline = /** @class */ (function () {
79395
79413
  }
79396
79414
  Object.defineProperty(DChartAxisBaseTickMajorGridline.prototype, "shapes", {
79397
79415
  get: function () {
79398
- var result = this._shapes;
79399
- if (result == null) {
79400
- result = this.newShapes();
79401
- this._shapes = result;
79402
- }
79403
- return result;
79416
+ var _a;
79417
+ return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
79404
79418
  },
79405
79419
  enumerable: false,
79406
79420
  configurable: true
@@ -79459,6 +79473,8 @@ var DChartAxisBaseTickMajorGridline = /** @class */ (function () {
79459
79473
  for (var i = 0, imax = shapes.length; i < imax; ++i) {
79460
79474
  shapes[i].destroy();
79461
79475
  }
79476
+ shapes.length = 0;
79477
+ this._shapes = undefined;
79462
79478
  }
79463
79479
  this._index = 0;
79464
79480
  this._container = undefined;
@@ -79474,12 +79490,8 @@ var DChartAxisBaseTickMajor = /** @class */ (function () {
79474
79490
  }
79475
79491
  Object.defineProperty(DChartAxisBaseTickMajor.prototype, "shapes", {
79476
79492
  get: function () {
79477
- var result = this._shapes;
79478
- if (result == null) {
79479
- result = this.newShapes();
79480
- this._shapes = result;
79481
- }
79482
- return result;
79493
+ var _a;
79494
+ return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
79483
79495
  },
79484
79496
  enumerable: false,
79485
79497
  configurable: true
@@ -79543,6 +79555,8 @@ var DChartAxisBaseTickMajor = /** @class */ (function () {
79543
79555
  for (var i = 0, imax = shapes.length; i < imax; ++i) {
79544
79556
  shapes[i].destroy();
79545
79557
  }
79558
+ shapes.length = 0;
79559
+ this._shapes = undefined;
79546
79560
  }
79547
79561
  this._gridline.destroy();
79548
79562
  this._index = 0;
@@ -79558,12 +79572,8 @@ var DChartAxisBaseTickMinor = /** @class */ (function () {
79558
79572
  }
79559
79573
  Object.defineProperty(DChartAxisBaseTickMinor.prototype, "shapes", {
79560
79574
  get: function () {
79561
- var result = this._shapes;
79562
- if (result == null) {
79563
- result = this.newShapes();
79564
- this._shapes = result;
79565
- }
79566
- return result;
79575
+ var _a;
79576
+ return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
79567
79577
  },
79568
79578
  enumerable: false,
79569
79579
  configurable: true
@@ -79617,6 +79627,8 @@ var DChartAxisBaseTickMinor = /** @class */ (function () {
79617
79627
  for (var i = 0, imax = shapes.length; i < imax; ++i) {
79618
79628
  shapes[i].destroy();
79619
79629
  }
79630
+ shapes.length = 0;
79631
+ this._shapes = undefined;
79620
79632
  }
79621
79633
  this._index = 0;
79622
79634
  this._container = undefined;
@@ -79708,6 +79720,11 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79708
79720
  var minorShapes = this._minor.shapes;
79709
79721
  if (parser.tick.enable && container != null && majorShapes && minorShapes) {
79710
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;
79711
79728
  var transform = plotArea.container.transform.localTransform;
79712
79729
  var gridlineShapes = this._major.gridline.shapes;
79713
79730
  var offset = parser.padding * this._index;
@@ -79723,8 +79740,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79723
79740
  var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
79724
79741
  var domainVisibleFrom = domainVisible.from;
79725
79742
  var domainVisibleTo = domainVisible.to;
79726
- var plotAreaHeight = plotArea.height;
79727
- 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);
79728
79744
  }
79729
79745
  break;
79730
79746
  case DChartAxisPosition.BOTTOM:
@@ -79736,8 +79752,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79736
79752
  var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
79737
79753
  var domainVisibleFrom = domainVisible.from;
79738
79754
  var domainVisibleTo = domainVisible.to;
79739
- var plotAreaHeight = plotArea.height;
79740
- 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);
79741
79756
  }
79742
79757
  break;
79743
79758
  case DChartAxisPosition.LEFT:
@@ -79749,8 +79764,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79749
79764
  var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
79750
79765
  var rangeVisibleFrom = rangeVisible.from;
79751
79766
  var rangeVisibleTo = rangeVisible.to;
79752
- var plotAreaWidth = plotArea.width;
79753
- 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);
79754
79768
  }
79755
79769
  break;
79756
79770
  case DChartAxisPosition.RIGHT:
@@ -79762,8 +79776,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79762
79776
  var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
79763
79777
  var rangeVisibleFrom = rangeVisible.from;
79764
79778
  var rangeVisibleTo = rangeVisible.to;
79765
- var plotAreaWidth = plotArea.width;
79766
- 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);
79767
79780
  }
79768
79781
  break;
79769
79782
  }
@@ -79771,7 +79784,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79771
79784
  return false;
79772
79785
  };
79773
79786
  DChartAxisBaseTickContainer.prototype.getDomain = function (plotArea, coordinate, result) {
79774
- var bounds = plotArea.getBoundsInContainer();
79787
+ var bounds = plotArea.getContainerBounds();
79775
79788
  var transform = coordinate.transform;
79776
79789
  return result.set(coordinate.unmap(transform.unmap(bounds.x)), coordinate.unmap(transform.unmap(bounds.x + bounds.width)));
79777
79790
  };
@@ -79779,14 +79792,14 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79779
79792
  return result;
79780
79793
  };
79781
79794
  DChartAxisBaseTickContainer.prototype.getRange = function (plotArea, coordinate, result) {
79782
- var bounds = plotArea.getBoundsInContainer();
79795
+ var bounds = plotArea.getContainerBounds();
79783
79796
  var transform = coordinate.transform;
79784
79797
  return result.set(coordinate.unmap(transform.unmap(bounds.y)), coordinate.unmap(transform.unmap(bounds.y + bounds.height)));
79785
79798
  };
79786
79799
  DChartAxisBaseTickContainer.prototype.getRangeVisible = function (plotArea, coordinate, result) {
79787
79800
  return result;
79788
79801
  };
79789
- 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) {
79790
79803
  var tick = this._parser.tick;
79791
79804
  var majorTick = tick.major;
79792
79805
  var majorCount = majorTick.count;
@@ -79813,7 +79826,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79813
79826
  var majorTickStep = majorTicks[imajorTick + 2];
79814
79827
  this.showMajor(majorShape, majotTickPositionX, shapePositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
79815
79828
  if (i < gridlineShapes.length) {
79816
- this.showMajorGridline(gridlineShapes[i], majorTickPosition, majotTickPositionX, plotAreaHeight * 0.5, 0, plotAreaHeight);
79829
+ this.showMajorGridline(gridlineShapes[i], majorTickPosition, majotTickPositionX, plotAreaY + plotAreaHeight * 0.5, 0, plotAreaHeight);
79817
79830
  }
79818
79831
  }
79819
79832
  else {
@@ -79839,7 +79852,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79839
79852
  }
79840
79853
  return true;
79841
79854
  };
79842
- 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) {
79843
79856
  var tick = this._parser.tick;
79844
79857
  var majorTick = tick.major;
79845
79858
  var majorCount = majorTick.count;
@@ -79866,7 +79879,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
79866
79879
  var majorTickStep = majorTicks[imajorTick + 2];
79867
79880
  this.showMajor(majorShape, shapePositionX, majotTickPositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
79868
79881
  if (i < gridlineShapes.length) {
79869
- this.showMajorGridline(gridlineShapes[i], majorTickPosition, plotAreaWidth * 0.5, majotTickPositionY, plotAreaWidth, 0);
79882
+ this.showMajorGridline(gridlineShapes[i], majorTickPosition, plotAreaX + plotAreaWidth * 0.5, majotTickPositionY, plotAreaWidth, 0);
79870
79883
  }
79871
79884
  }
79872
79885
  else {
@@ -80071,9 +80084,9 @@ var DChartAxisBase = /** @class */ (function () {
80071
80084
  * SPDX-License-Identifier: Apache-2.0
80072
80085
  */
80073
80086
  var DChartAxisContainerImpl = /** @class */ (function () {
80074
- function DChartAxisContainerImpl(plotArea, options) {
80087
+ function DChartAxisContainerImpl(plotArea, container, options) {
80075
80088
  this._plotArea = plotArea;
80076
- this._container = new EShapeContainer();
80089
+ this._container = container;
80077
80090
  this._list = new Map();
80078
80091
  }
80079
80092
  Object.defineProperty(DChartAxisContainerImpl.prototype, "container", {
@@ -80548,9 +80561,12 @@ var DChartAxisGuideSimple = /** @class */ (function () {
80548
80561
  var axis = this._axis;
80549
80562
  if (shape != null && container != null && axis != null) {
80550
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;
80551
80569
  var transform = plotArea.container.transform.localTransform;
80552
- var plotAreaWidth = plotArea.width;
80553
- var plotAreaHeight = plotArea.height;
80554
80570
  var offset = axis.padding * index;
80555
80571
  switch (axis.position) {
80556
80572
  case DChartAxisPosition.TOP:
@@ -80561,10 +80577,10 @@ var DChartAxisGuideSimple = /** @class */ (function () {
80561
80577
  work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
80562
80578
  transform.apply(work, work);
80563
80579
  var x = work.x;
80564
- 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);
80565
80581
  }
80566
80582
  else {
80567
- 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);
80568
80584
  }
80569
80585
  break;
80570
80586
  case DChartAxisPosition.LEFT:
@@ -80575,10 +80591,10 @@ var DChartAxisGuideSimple = /** @class */ (function () {
80575
80591
  work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
80576
80592
  transform.apply(work, work);
80577
80593
  var y = work.y;
80578
- 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);
80579
80595
  }
80580
80596
  else {
80581
- 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);
80582
80598
  }
80583
80599
  break;
80584
80600
  }
@@ -80878,24 +80894,16 @@ var DChartCoordinateBase = /** @class */ (function () {
80878
80894
  var work = this._work;
80879
80895
  switch (this._direction) {
80880
80896
  case DChartCoordinateDirection.X:
80881
- this.getPixelDomain(plotArea, work);
80897
+ plotArea.getPixelDomain(work);
80882
80898
  this.doFit_(work.from, work.to, this.toFitDomain(from, to, plotArea, work), result);
80883
80899
  break;
80884
80900
  case DChartCoordinateDirection.Y:
80885
- this.getPixelRange(plotArea, work);
80901
+ plotArea.getPixelRange(work);
80886
80902
  this.doFit_(work.from, work.to, this.toFitRange(from, to, plotArea, work), result);
80887
80903
  break;
80888
80904
  }
80889
80905
  }
80890
80906
  };
80891
- DChartCoordinateBase.prototype.getPixelDomain = function (plotArea, result) {
80892
- var padding = plotArea.padding;
80893
- return result.set(padding.getLeft(), plotArea.width - padding.getRight());
80894
- };
80895
- DChartCoordinateBase.prototype.getPixelRange = function (plotArea, result) {
80896
- var padding = plotArea.padding;
80897
- return result.set(plotArea.height - padding.getBottom(), padding.getTop());
80898
- };
80899
80907
  DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
80900
80908
  if (from == null) {
80901
80909
  from = this._from;
@@ -81528,6 +81536,119 @@ var DChartOverview = /** @class */ (function (_super) {
81528
81536
  return DChartOverview;
81529
81537
  }(DBase));
81530
81538
 
81539
+ /*
81540
+ * Copyright (C) 2019 Toshiba Corporation
81541
+ * SPDX-License-Identifier: Apache-2.0
81542
+ */
81543
+ var DChartPlotAreaBase = /** @class */ (function (_super) {
81544
+ __extends(DChartPlotAreaBase, _super);
81545
+ function DChartPlotAreaBase(chart, options) {
81546
+ var _this = _super.call(this, options) || this;
81547
+ _this._isContainerBoundsDirty = true;
81548
+ _this._containerBounds = new pixi_js.Rectangle();
81549
+ _this._workPoint = new pixi_js.Point();
81550
+ _this._pixelBounds = new pixi_js.Rectangle();
81551
+ _this._chart = chart;
81552
+ _this._blendStartTime = 0;
81553
+ _this._blendDuration = 1000;
81554
+ _this._blendTimeout = null;
81555
+ _this._onBlendBound = function () {
81556
+ _this.onBlend();
81557
+ };
81558
+ _this._isViewDirty = true;
81559
+ _this._view = _this.newView(options);
81560
+ return _this;
81561
+ }
81562
+ DChartPlotAreaBase.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
81563
+ this._isViewDirty = true;
81564
+ this._isContainerBoundsDirty = true;
81565
+ _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
81566
+ };
81567
+ Object.defineProperty(DChartPlotAreaBase.prototype, "chart", {
81568
+ get: function () {
81569
+ return this._chart;
81570
+ },
81571
+ enumerable: false,
81572
+ configurable: true
81573
+ });
81574
+ Object.defineProperty(DChartPlotAreaBase.prototype, "view", {
81575
+ get: function () {
81576
+ return this._view;
81577
+ },
81578
+ enumerable: false,
81579
+ configurable: true
81580
+ });
81581
+ DChartPlotAreaBase.prototype.onWheel = function (e, deltas, global) {
81582
+ var vresult = this._view.onWheel(e, deltas, global);
81583
+ var sresult = _super.prototype.onWheel.call(this, e, deltas, global);
81584
+ return vresult || sresult;
81585
+ };
81586
+ DChartPlotAreaBase.prototype.onDblClick = function (e, interactionManager) {
81587
+ var vresult = this._view.onDblClick(e, interactionManager);
81588
+ var sresult = _super.prototype.onDblClick.call(this, e, interactionManager);
81589
+ return vresult || sresult;
81590
+ };
81591
+ DChartPlotAreaBase.prototype.onDown = function (e) {
81592
+ this._view.onDown(e);
81593
+ _super.prototype.onDown.call(this, e);
81594
+ };
81595
+ DChartPlotAreaBase.prototype.render = function (renderer) {
81596
+ if (this._isViewDirty) {
81597
+ this._isViewDirty = false;
81598
+ this.onViewDirty();
81599
+ }
81600
+ _super.prototype.render.call(this, renderer);
81601
+ };
81602
+ DChartPlotAreaBase.prototype.getPixelDomain = function (result) {
81603
+ var padding = this.padding;
81604
+ return result.set(padding.getLeft(), this.width - padding.getRight());
81605
+ };
81606
+ DChartPlotAreaBase.prototype.getPixelRange = function (result) {
81607
+ var padding = this.padding;
81608
+ return result.set(this.height - padding.getBottom(), padding.getTop());
81609
+ };
81610
+ DChartPlotAreaBase.prototype.getPixelBounds = function () {
81611
+ var result = this._pixelBounds;
81612
+ result.x = 0;
81613
+ result.y = 0;
81614
+ result.width = this.width;
81615
+ result.height = this.height;
81616
+ return result;
81617
+ };
81618
+ DChartPlotAreaBase.prototype.getAxisBounds = function (position) {
81619
+ return this.getPixelBounds();
81620
+ };
81621
+ DChartPlotAreaBase.prototype.getSelectionBoundsX = function () {
81622
+ return this.getPixelBounds();
81623
+ };
81624
+ DChartPlotAreaBase.prototype.getSelectionBoundsY = function () {
81625
+ return this.getPixelBounds();
81626
+ };
81627
+ DChartPlotAreaBase.prototype.getContainerBounds = function () {
81628
+ var result = this._containerBounds;
81629
+ if (this._isContainerBoundsDirty) {
81630
+ this._isContainerBoundsDirty = false;
81631
+ var container = this.container;
81632
+ container.updateTransform();
81633
+ var transform = container.transform.localTransform;
81634
+ var work = this._workPoint;
81635
+ work.set(0, 0);
81636
+ transform.applyInverse(work, work);
81637
+ result.x = work.x;
81638
+ result.y = work.y;
81639
+ work.set(this.width, this.height);
81640
+ transform.applyInverse(work, work);
81641
+ result.width = work.x - result.x;
81642
+ result.height = work.y - result.y;
81643
+ }
81644
+ return result;
81645
+ };
81646
+ DChartPlotAreaBase.prototype.getType = function () {
81647
+ return "DChartPlotArea";
81648
+ };
81649
+ return DChartPlotAreaBase;
81650
+ }(DBase));
81651
+
81531
81652
  /*
81532
81653
  * Copyright (C) 2019 Toshiba Corporation
81533
81654
  * SPDX-License-Identifier: Apache-2.0
@@ -81804,11 +81925,10 @@ var DChartSeriesStrokeImpl = /** @class */ (function () {
81804
81925
  */
81805
81926
  var DChartSeriesContainerImpl = /** @class */ (function () {
81806
81927
  function DChartSeriesContainerImpl(plotArea, options) {
81807
- var _a;
81808
81928
  this._plotArea = plotArea;
81809
81929
  this._domain = new DChartRegionImpl(NaN, NaN);
81810
81930
  this._range = new DChartRegionImpl(NaN, NaN);
81811
- this._selection = (_a = options === null || options === void 0 ? void 0 : options.selection) !== null && _a !== void 0 ? _a : null;
81931
+ this._selection = null;
81812
81932
  this._fill = new DChartSeriesFillImpl(options === null || options === void 0 ? void 0 : options.fill);
81813
81933
  this._stroke = new DChartSeriesStrokeImpl(options === null || options === void 0 ? void 0 : options.stroke);
81814
81934
  this._size = new DChartSeriesPointImpl(options === null || options === void 0 ? void 0 : options.size);
@@ -81842,6 +81962,9 @@ var DChartSeriesContainerImpl = /** @class */ (function () {
81842
81962
  get: function () {
81843
81963
  return this._selection;
81844
81964
  },
81965
+ set: function (selection) {
81966
+ this._selection = selection;
81967
+ },
81845
81968
  enumerable: false,
81846
81969
  configurable: true
81847
81970
  });
@@ -81990,90 +82113,51 @@ var DChartSeriesContainerImpl = /** @class */ (function () {
81990
82113
  * Copyright (C) 2019 Toshiba Corporation
81991
82114
  * SPDX-License-Identifier: Apache-2.0
81992
82115
  */
81993
- var DChartPlotAreaImpl = /** @class */ (function (_super) {
81994
- __extends(DChartPlotAreaImpl, _super);
81995
- function DChartPlotAreaImpl(chart, options) {
81996
- var _this = _super.call(this, options) || this;
81997
- _this._chart = chart;
81998
- _this._blendStartTime = 0;
81999
- _this._blendDuration = 1000;
82000
- _this._blendTimeout = null;
82001
- _this._onBlendBound = function () {
82002
- _this.onBlend();
82003
- };
82004
- return _this;
82005
- }
82006
- DChartPlotAreaImpl.prototype.init = function (options) {
82007
- var _this = this;
82116
+ var DChartPlotAreaOnefold = /** @class */ (function (_super) {
82117
+ __extends(DChartPlotAreaOnefold, _super);
82118
+ function DChartPlotAreaOnefold(chart, options) {
82008
82119
  var _a;
82009
- _super.prototype.init.call(this, options);
82010
- this._isBoundsInContainerDirty = true;
82011
- this._boundsInContainer = new pixi_js.Rectangle();
82012
- this._workPoint = new pixi_js.Point();
82120
+ var _this = _super.call(this, chart, options) || this;
82013
82121
  // Container
82014
82122
  var container = new DChartPlotAreaContainer(function () {
82015
82123
  _this._isViewDirty = true;
82016
- _this._isBoundsInContainerDirty = true;
82124
+ _this._isContainerBoundsDirty = true;
82017
82125
  DApplications.update(_this);
82018
82126
  });
82019
- this._container = container;
82020
- this.addChild(container);
82021
- // View
82022
- this._isViewDirty = true;
82023
- this._view = new DViewImpl(this, function () { return container; }, options === null || options === void 0 ? void 0 : options.view);
82024
- // Coordinate container
82025
- this._coordinate = new DChartCoordinateContainerImpl(this, options === null || options === void 0 ? void 0 : options.coordinate);
82026
- // Series container
82027
- var series = new DChartSeriesContainerImpl(this, options === null || options === void 0 ? void 0 : options.series);
82028
- this._series = series;
82029
- // Axis container
82030
- var axis = new DChartAxisContainerImpl(this, options === null || options === void 0 ? void 0 : options.axis);
82031
- this._axis = axis;
82032
- this.addChild(axis.container);
82033
- // Selection
82034
- var selection = series.selection;
82035
- if (selection) {
82036
- selection.bind(series);
82037
- }
82127
+ _this._container = container;
82128
+ _this.addChild(container);
82038
82129
  // Overflow mask
82039
- var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : this.theme.isOverflowMaskEnabled();
82130
+ var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : _this.theme.isOverflowMaskEnabled();
82040
82131
  if (mask) {
82041
- container.mask = this.getOverflowMask();
82132
+ container.mask = _this.getOverflowMask();
82042
82133
  }
82043
- // Add series and axes
82044
- if (options != null) {
82045
- // Series
82046
- var s = options.series;
82047
- if (s != null) {
82048
- var list = s.list;
82049
- if (list) {
82050
- var listLength = list.length;
82051
- if (0 < listLength) {
82052
- for (var i = 0; i < listLength; ++i) {
82053
- series.add(list[i]);
82054
- }
82055
- series.update();
82056
- }
82057
- }
82058
- }
82059
- // Axes
82060
- var a = options.axis;
82061
- if (a != null) {
82062
- var list = a.list;
82063
- if (list) {
82064
- for (var i = 0, imax = list.length; i < imax; ++i) {
82065
- axis.add(list[i]);
82066
- }
82067
- }
82068
- }
82134
+ // View
82135
+ _this._isViewDirty = true;
82136
+ _this._view = new DViewImpl(_this, function () { return container; }, options === null || options === void 0 ? void 0 : options.view);
82137
+ // Coordinate
82138
+ _this._coordinate = new DChartCoordinateContainerImpl(_this, options === null || options === void 0 ? void 0 : options.coordinate);
82139
+ // Series
82140
+ var seriesOptions = options === null || options === void 0 ? void 0 : options.series;
82141
+ var series = new DChartSeriesContainerImpl(_this, seriesOptions);
82142
+ _this._series = series;
82143
+ // Axis
82144
+ var axisOptions = options === null || options === void 0 ? void 0 : options.axis;
82145
+ var axis = new DChartAxisContainerImpl(_this, new EShapeContainer(), axisOptions);
82146
+ _this._axis = axis;
82147
+ _this.addChild(axis.container);
82148
+ // Add series
82149
+ _this.addSeries(series, seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.list);
82150
+ // Add axes
82151
+ _this.addAxes(axis, axisOptions === null || axisOptions === void 0 ? void 0 : axisOptions.list);
82152
+ // Selection
82153
+ var selection = seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.selection;
82154
+ if (selection != null) {
82155
+ series.selection = selection;
82156
+ selection.bind(series);
82069
82157
  }
82070
- };
82071
- DChartPlotAreaImpl.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
82072
- this._isViewDirty = true;
82073
- this._isBoundsInContainerDirty = true;
82074
- _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
82075
- };
82076
- DChartPlotAreaImpl.prototype.getOverflowMask = function () {
82158
+ return _this;
82159
+ }
82160
+ DChartPlotAreaOnefold.prototype.getOverflowMask = function () {
82077
82161
  if (this._overflowMask == null) {
82078
82162
  this._overflowMask = new DBaseOverflowMask(this);
82079
82163
  this.reflowable.add(this._overflowMask);
@@ -82081,111 +82165,1056 @@ var DChartPlotAreaImpl = /** @class */ (function (_super) {
82081
82165
  }
82082
82166
  return this._overflowMask;
82083
82167
  };
82084
- Object.defineProperty(DChartPlotAreaImpl.prototype, "chart", {
82085
- get: function () {
82086
- return this._chart;
82087
- },
82088
- enumerable: false,
82089
- configurable: true
82090
- });
82091
- Object.defineProperty(DChartPlotAreaImpl.prototype, "coordinate", {
82168
+ DChartPlotAreaOnefold.prototype.addSeries = function (series, list) {
82169
+ if (list != null) {
82170
+ var listLength = list.length;
82171
+ if (0 < listLength) {
82172
+ for (var i = 0; i < listLength; ++i) {
82173
+ series.add(list[i]);
82174
+ }
82175
+ series.update();
82176
+ }
82177
+ }
82178
+ };
82179
+ DChartPlotAreaOnefold.prototype.addAxes = function (axis, list) {
82180
+ if (list != null) {
82181
+ for (var i = 0, imax = list.length; i < imax; ++i) {
82182
+ axis.add(list[i]);
82183
+ }
82184
+ }
82185
+ };
82186
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "coordinate", {
82092
82187
  get: function () {
82093
82188
  return this._coordinate;
82094
82189
  },
82095
82190
  enumerable: false,
82096
82191
  configurable: true
82097
82192
  });
82098
- Object.defineProperty(DChartPlotAreaImpl.prototype, "series", {
82193
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "series", {
82099
82194
  get: function () {
82100
82195
  return this._series;
82101
82196
  },
82102
82197
  enumerable: false,
82103
82198
  configurable: true
82104
82199
  });
82105
- Object.defineProperty(DChartPlotAreaImpl.prototype, "container", {
82200
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "container", {
82106
82201
  get: function () {
82107
82202
  return this._container;
82108
82203
  },
82109
82204
  enumerable: false,
82110
82205
  configurable: true
82111
82206
  });
82112
- Object.defineProperty(DChartPlotAreaImpl.prototype, "axis", {
82207
+ Object.defineProperty(DChartPlotAreaOnefold.prototype, "axis", {
82113
82208
  get: function () {
82114
82209
  return this._axis;
82115
82210
  },
82116
82211
  enumerable: false,
82117
82212
  configurable: true
82118
82213
  });
82119
- Object.defineProperty(DChartPlotAreaImpl.prototype, "view", {
82214
+ DChartPlotAreaOnefold.prototype.newView = function (options) {
82215
+ var _this = this;
82216
+ return new DViewImpl(this, function () { return _this._container; }, options === null || options === void 0 ? void 0 : options.view);
82217
+ };
82218
+ DChartPlotAreaOnefold.prototype.onViewDirty = function () {
82219
+ this._coordinate.fit();
82220
+ this._axis.onRender();
82221
+ this._series.onRender();
82222
+ };
82223
+ DChartPlotAreaOnefold.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
82224
+ var coordinate = this._coordinate;
82225
+ var axis = this._axis;
82226
+ var series = this._series;
82227
+ if (duration != null && duration <= 0) {
82228
+ coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
82229
+ axis.update();
82230
+ series.update();
82231
+ }
82232
+ else {
82233
+ this._blendDuration = duration != null ? duration : 200;
82234
+ this._blendStartTime = Date.now();
82235
+ coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
82236
+ var blendTimeout = this._blendTimeout;
82237
+ if (blendTimeout != null) {
82238
+ window.clearTimeout(blendTimeout);
82239
+ }
82240
+ this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
82241
+ }
82242
+ return this;
82243
+ };
82244
+ DChartPlotAreaOnefold.prototype.onBlend = function () {
82245
+ var now = Date.now();
82246
+ var ratio = (now - this._blendStartTime) / this._blendDuration;
82247
+ if (ratio < 1) {
82248
+ this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
82249
+ }
82250
+ else {
82251
+ this._blendTimeout = null;
82252
+ ratio = 1;
82253
+ }
82254
+ this._coordinate.blend(DAnimationTimings.ELASTIC(ratio));
82255
+ this._axis.update();
82256
+ this._series.update();
82257
+ };
82258
+ DChartPlotAreaOnefold.prototype.destroy = function () {
82259
+ this._container.destroy();
82260
+ this._series.destroy();
82261
+ this._axis.destroy();
82262
+ };
82263
+ return DChartPlotAreaOnefold;
82264
+ }(DChartPlotAreaBase));
82265
+
82266
+ /*
82267
+ * Copyright (C) 2019 Toshiba Corporation
82268
+ * SPDX-License-Identifier: Apache-2.0
82269
+ */
82270
+ var DChartPlotAreaTwofoldAxisContainer = /** @class */ (function () {
82271
+ function DChartPlotAreaTwofoldAxisContainer(plotArea, container, primary, secondary) {
82272
+ this._plotArea = plotArea;
82273
+ this._container = container;
82274
+ this._list = new Map();
82275
+ this._primary = primary;
82276
+ this._secondary = secondary;
82277
+ }
82278
+ Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "container", {
82120
82279
  get: function () {
82121
- return this._view;
82280
+ return this._container;
82122
82281
  },
82123
82282
  enumerable: false,
82124
82283
  configurable: true
82125
82284
  });
82126
- DChartPlotAreaImpl.prototype.onWheel = function (e, deltas, global) {
82127
- var vresult = this._view.onWheel(e, deltas, global);
82128
- var sresult = _super.prototype.onWheel.call(this, e, deltas, global);
82129
- return vresult || sresult;
82285
+ Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "plotArea", {
82286
+ get: function () {
82287
+ return this._plotArea;
82288
+ },
82289
+ enumerable: false,
82290
+ configurable: true
82291
+ });
82292
+ DChartPlotAreaTwofoldAxisContainer.prototype.add = function (axis) {
82293
+ var list = this._list;
82294
+ var axes = list.get(axis.position);
82295
+ if (axes == null) {
82296
+ axes = [];
82297
+ list.set(axis.position, axes);
82298
+ }
82299
+ axes.push(axis);
82300
+ axis.bind(this, axes.length - 1);
82130
82301
  };
82131
- DChartPlotAreaImpl.prototype.onDblClick = function (e, interactionManager) {
82132
- var vresult = this._view.onDblClick(e, interactionManager);
82133
- var sresult = _super.prototype.onDblClick.call(this, e, interactionManager);
82134
- return vresult || sresult;
82302
+ DChartPlotAreaTwofoldAxisContainer.prototype.get = function (position, index) {
82303
+ var primary = this._primary;
82304
+ var primarySize = primary.size(position);
82305
+ if (0 <= index && index < primarySize) {
82306
+ return primary.get(position, index);
82307
+ }
82308
+ var secondary = this._secondary;
82309
+ var secondarySize = secondary.size(position);
82310
+ if (primarySize <= index && index < primarySize + secondarySize) {
82311
+ return secondary.get(position, index);
82312
+ }
82313
+ var list = this._list;
82314
+ var axes = list.get(toEnum(position, DChartAxisPosition));
82315
+ if (axes) {
82316
+ if (primarySize + secondarySize <= index &&
82317
+ index < primarySize + secondarySize + axes.length) {
82318
+ return axes[index - primarySize - secondarySize];
82319
+ }
82320
+ }
82321
+ return null;
82135
82322
  };
82136
- DChartPlotAreaImpl.prototype.onDown = function (e) {
82137
- this._view.onDown(e);
82138
- _super.prototype.onDown.call(this, e);
82323
+ DChartPlotAreaTwofoldAxisContainer.prototype.indexOf = function (axis) {
82324
+ var primary = this._primary;
82325
+ var result = primary.indexOf(axis);
82326
+ if (0 <= result) {
82327
+ return result;
82328
+ }
82329
+ result = this._secondary.indexOf(axis);
82330
+ if (0 <= result) {
82331
+ return primary.size(axis.position) + result;
82332
+ }
82333
+ var list = this._list;
82334
+ var axes = list.get(axis.position);
82335
+ if (axes) {
82336
+ return axes.indexOf(axis);
82337
+ }
82338
+ return -1;
82139
82339
  };
82140
- DChartPlotAreaImpl.prototype.render = function (renderer) {
82141
- if (this._isViewDirty) {
82142
- this._isViewDirty = false;
82143
- this._coordinate.fit();
82144
- this._axis.onRender();
82145
- this._series.onRender();
82340
+ DChartPlotAreaTwofoldAxisContainer.prototype.clear = function (position) {
82341
+ this._primary.clear(position);
82342
+ this._secondary.clear(position);
82343
+ var list = this._list;
82344
+ var axes = list.get(toEnum(position, DChartAxisPosition));
82345
+ if (axes) {
82346
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82347
+ axes[i].destroy();
82348
+ }
82349
+ axes.length = 0;
82146
82350
  }
82147
- _super.prototype.render.call(this, renderer);
82351
+ return this;
82352
+ };
82353
+ DChartPlotAreaTwofoldAxisContainer.prototype.size = function (position) {
82354
+ var list = this._list;
82355
+ var axes = list.get(toEnum(position, DChartAxisPosition));
82356
+ return (this._primary.size(position) +
82357
+ this._secondary.size(position) +
82358
+ (axes != null ? axes.length : 0));
82359
+ };
82360
+ DChartPlotAreaTwofoldAxisContainer.prototype.update = function () {
82361
+ this._primary.update();
82362
+ this._secondary.update();
82363
+ this._list.forEach(function (axes) {
82364
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82365
+ axes[i].update();
82366
+ }
82367
+ });
82368
+ };
82369
+ DChartPlotAreaTwofoldAxisContainer.prototype.onRender = function () {
82370
+ this._primary.onRender();
82371
+ this._secondary.onRender();
82372
+ this._list.forEach(function (axes) {
82373
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82374
+ axes[i].onRender();
82375
+ }
82376
+ });
82377
+ };
82378
+ DChartPlotAreaTwofoldAxisContainer.prototype.destroy = function () {
82379
+ this._primary.destroy();
82380
+ this._secondary.destroy();
82381
+ this._list.forEach(function (axes) {
82382
+ for (var i = 0, imax = axes.length; i < imax; ++i) {
82383
+ axes[i].destroy();
82384
+ }
82385
+ axes.length = 0;
82386
+ });
82387
+ };
82388
+ return DChartPlotAreaTwofoldAxisContainer;
82389
+ }());
82390
+
82391
+ /*
82392
+ * Copyright (C) 2019 Toshiba Corporation
82393
+ * SPDX-License-Identifier: Apache-2.0
82394
+ */
82395
+ var DChartPlotAreaTwofoldCoorinateContainerSub = /** @class */ (function () {
82396
+ function DChartPlotAreaTwofoldCoorinateContainerSub(container, primary, secondary) {
82397
+ this._container = container;
82398
+ this._primary = primary;
82399
+ this._secondary = secondary;
82400
+ }
82401
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainerSub.prototype, "container", {
82402
+ get: function () {
82403
+ return this._container;
82404
+ },
82405
+ enumerable: false,
82406
+ configurable: true
82407
+ });
82408
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.add = function (coordinate, index) {
82409
+ if (index != null) {
82410
+ var primary = this._primary;
82411
+ var primarySize = primary.size();
82412
+ if (index < primarySize) {
82413
+ if (0 <= index) {
82414
+ primary.add(coordinate, index);
82415
+ }
82416
+ }
82417
+ else {
82418
+ this._secondary.add(coordinate, index - primarySize);
82419
+ }
82420
+ return this;
82421
+ }
82422
+ else {
82423
+ this._secondary.add(coordinate);
82424
+ }
82425
+ return this;
82426
+ };
82427
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.get = function (index) {
82428
+ var primary = this._primary;
82429
+ var primarySize = primary.size();
82430
+ if (0 <= index && index < primarySize) {
82431
+ return primary.get(index);
82432
+ }
82433
+ var secondary = this._secondary;
82434
+ var secondarySize = secondary.size();
82435
+ if (primarySize <= index && index < primarySize + secondarySize) {
82436
+ secondary.get(index - primarySize);
82437
+ }
82438
+ return null;
82439
+ };
82440
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.indexOf = function (coordinate) {
82441
+ var result = this._primary.indexOf(coordinate);
82442
+ if (0 <= result) {
82443
+ return result;
82444
+ }
82445
+ result = this._secondary.indexOf(coordinate);
82446
+ if (0 <= result) {
82447
+ return this._primary.size() + result;
82448
+ }
82449
+ return -1;
82450
+ };
82451
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.remove = function (coordinateOrIndex) {
82452
+ if (isNumber(coordinateOrIndex)) {
82453
+ var index = coordinateOrIndex;
82454
+ var primary = this._primary;
82455
+ var primarySize = primary.size();
82456
+ if (0 <= index && index < primarySize) {
82457
+ return primary.remove(index);
82458
+ }
82459
+ var secondary = this._secondary;
82460
+ var secondarySize = secondary.size();
82461
+ if (primarySize <= index && index < primarySize + secondarySize) {
82462
+ secondary.remove(index - primarySize);
82463
+ }
82464
+ }
82465
+ else {
82466
+ var coordinate = coordinateOrIndex;
82467
+ var result = this._primary.remove(coordinate);
82468
+ if (result != null) {
82469
+ return result;
82470
+ }
82471
+ result = this._secondary.remove(coordinate);
82472
+ if (result != null) {
82473
+ return result;
82474
+ }
82475
+ }
82476
+ return null;
82477
+ };
82478
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.clear = function () {
82479
+ this._primary.clear();
82480
+ this._secondary.clear();
82481
+ return this;
82482
+ };
82483
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.destroy = function () {
82484
+ return this.clear();
82485
+ };
82486
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.size = function () {
82487
+ return this._primary.size() + this._secondary.size();
82488
+ };
82489
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.fit = function (from, to) {
82490
+ this._primary.fit(from, to);
82491
+ this._secondary.fit(from, to);
82492
+ return this;
82493
+ };
82494
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.mark = function (from, to) {
82495
+ this._primary.mark(from, to);
82496
+ this._secondary.mark(from, to);
82497
+ return this;
82498
+ };
82499
+ DChartPlotAreaTwofoldCoorinateContainerSub.prototype.blend = function (ratio) {
82500
+ this._primary.blend(ratio);
82501
+ this._secondary.blend(ratio);
82502
+ return this;
82503
+ };
82504
+ return DChartPlotAreaTwofoldCoorinateContainerSub;
82505
+ }());
82506
+
82507
+ /*
82508
+ * Copyright (C) 2019 Toshiba Corporation
82509
+ * SPDX-License-Identifier: Apache-2.0
82510
+ */
82511
+ var DChartPlotAreaTwofoldCoorinateContainer = /** @class */ (function () {
82512
+ function DChartPlotAreaTwofoldCoorinateContainer(plotArea, primary, secondary) {
82513
+ this._plotArea = plotArea;
82514
+ this._primary = primary;
82515
+ this._secondary = secondary;
82516
+ this._x = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.x, secondary.x);
82517
+ this._y = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.y, secondary.y);
82518
+ }
82519
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "x", {
82520
+ get: function () {
82521
+ return this._x;
82522
+ },
82523
+ enumerable: false,
82524
+ configurable: true
82525
+ });
82526
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "y", {
82527
+ get: function () {
82528
+ return this._y;
82529
+ },
82530
+ enumerable: false,
82531
+ configurable: true
82532
+ });
82533
+ Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "plotArea", {
82534
+ get: function () {
82535
+ return this._plotArea;
82536
+ },
82537
+ enumerable: false,
82538
+ configurable: true
82539
+ });
82540
+ DChartPlotAreaTwofoldCoorinateContainer.prototype.fit = function (domainFrom, domainTo, rangeFrom, rangeTo) {
82541
+ this._x.fit(domainFrom, domainTo);
82542
+ this._y.fit(rangeFrom, rangeTo);
82543
+ return this;
82544
+ };
82545
+ DChartPlotAreaTwofoldCoorinateContainer.prototype.mark = function (domainFrom, domainTo, rangeFrom, rangeTo) {
82546
+ this._x.mark(domainFrom, domainTo);
82547
+ this._y.mark(rangeFrom, rangeTo);
82548
+ return this;
82549
+ };
82550
+ DChartPlotAreaTwofoldCoorinateContainer.prototype.blend = function (ratio) {
82551
+ this._x.blend(ratio);
82552
+ this._y.blend(ratio);
82553
+ return this;
82554
+ };
82555
+ return DChartPlotAreaTwofoldCoorinateContainer;
82556
+ }());
82557
+
82558
+ /*
82559
+ * Copyright (C) 2019 Toshiba Corporation
82560
+ * SPDX-License-Identifier: Apache-2.0
82561
+ */
82562
+ var DChartPlotAreaTwofoldOverflowMaskPrimary = /** @class */ (function (_super) {
82563
+ __extends(DChartPlotAreaTwofoldOverflowMaskPrimary, _super);
82564
+ function DChartPlotAreaTwofoldOverflowMaskPrimary() {
82565
+ return _super !== null && _super.apply(this, arguments) || this;
82566
+ }
82567
+ DChartPlotAreaTwofoldOverflowMaskPrimary.prototype.onReflow = function (base, width, height) {
82568
+ if (this._isInitialized && this._width === width && this._height === height) {
82569
+ return;
82570
+ }
82571
+ this._isInitialized = true;
82572
+ this._width = width;
82573
+ this._height = height;
82574
+ var hh = height * 0.5;
82575
+ this.clear();
82576
+ this.beginFill(0xffffff, 1);
82577
+ this.drawRect(0, 0, width, hh);
82578
+ this.endFill();
82579
+ };
82580
+ return DChartPlotAreaTwofoldOverflowMaskPrimary;
82581
+ }(DBaseOverflowMaskSimple));
82582
+
82583
+ /*
82584
+ * Copyright (C) 2019 Toshiba Corporation
82585
+ * SPDX-License-Identifier: Apache-2.0
82586
+ */
82587
+ var DChartPlotAreaTwofoldOverflowMaskSecondary = /** @class */ (function (_super) {
82588
+ __extends(DChartPlotAreaTwofoldOverflowMaskSecondary, _super);
82589
+ function DChartPlotAreaTwofoldOverflowMaskSecondary() {
82590
+ return _super !== null && _super.apply(this, arguments) || this;
82591
+ }
82592
+ DChartPlotAreaTwofoldOverflowMaskSecondary.prototype.onReflow = function (base, width, height) {
82593
+ if (this._isInitialized && this._width === width && this._height === height) {
82594
+ return;
82595
+ }
82596
+ this._isInitialized = true;
82597
+ this._width = width;
82598
+ this._height = height;
82599
+ var hh = height * 0.5;
82600
+ this.clear();
82601
+ this.beginFill(0xffffff, 1);
82602
+ this.drawRect(0, hh, width, hh);
82603
+ this.endFill();
82604
+ };
82605
+ return DChartPlotAreaTwofoldOverflowMaskSecondary;
82606
+ }(DBaseOverflowMaskSimple));
82607
+
82608
+ /*
82609
+ * Copyright (C) 2019 Toshiba Corporation
82610
+ * SPDX-License-Identifier: Apache-2.0
82611
+ */
82612
+ var DChartPlotAreaTwofoldSeriesContainer = /** @class */ (function () {
82613
+ function DChartPlotAreaTwofoldSeriesContainer(plotArea, primary, secondary) {
82614
+ this._plotArea = plotArea;
82615
+ this._primary = primary;
82616
+ this._secondary = secondary;
82617
+ this._domain = new DChartRegionImpl(NaN, NaN);
82618
+ this._range = new DChartRegionImpl(NaN, NaN);
82619
+ }
82620
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newFill = function (index, options) {
82621
+ return this._secondary.newFill(index, options);
82622
+ };
82623
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newStroke = function (index, options) {
82624
+ return this._secondary.newStroke(index, options);
82625
+ };
82626
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newSize = function (index, options, x, y) {
82627
+ return this._secondary.newSize(index, options, x, y);
82628
+ };
82629
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newOffset = function (index, options, x, y) {
82630
+ return this._secondary.newOffset(index, options, x, y);
82631
+ };
82632
+ DChartPlotAreaTwofoldSeriesContainer.prototype.newPadding = function (index, options) {
82633
+ return this._secondary.newPadding(index, options);
82634
+ };
82635
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "plotArea", {
82636
+ get: function () {
82637
+ return this._plotArea;
82638
+ },
82639
+ enumerable: false,
82640
+ configurable: true
82641
+ });
82642
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "selection", {
82643
+ get: function () {
82644
+ return this._secondary.selection;
82645
+ },
82646
+ enumerable: false,
82647
+ configurable: true
82648
+ });
82649
+ DChartPlotAreaTwofoldSeriesContainer.prototype.update = function () {
82650
+ this._primary.update();
82651
+ this._secondary.update();
82652
+ var selection = this._secondary.selection;
82653
+ if (selection) {
82654
+ selection.update();
82655
+ }
82656
+ };
82657
+ DChartPlotAreaTwofoldSeriesContainer.prototype.onRender = function () {
82658
+ this._primary.onRender();
82659
+ this._secondary.onRender();
82660
+ var selection = this._secondary.selection;
82661
+ if (selection) {
82662
+ selection.onRender();
82663
+ }
82664
+ };
82665
+ DChartPlotAreaTwofoldSeriesContainer.prototype.add = function (series) {
82666
+ this._secondary.add(series);
82667
+ };
82668
+ DChartPlotAreaTwofoldSeriesContainer.prototype.get = function (index) {
82669
+ var primary = this._primary;
82670
+ var primarySize = primary.size();
82671
+ if (0 <= index && index < primarySize) {
82672
+ return primary.get(index);
82673
+ }
82674
+ var secondary = this._secondary;
82675
+ var secondarySize = secondary.size();
82676
+ if (primarySize <= index && index < primarySize + secondarySize) {
82677
+ return secondary.get(index - primarySize);
82678
+ }
82679
+ return null;
82680
+ };
82681
+ DChartPlotAreaTwofoldSeriesContainer.prototype.indexOf = function (series) {
82682
+ var primary = this._primary;
82683
+ var result = primary.indexOf(series);
82684
+ if (0 <= result) {
82685
+ return result;
82686
+ }
82687
+ result = this._secondary.indexOf(series);
82688
+ if (0 <= result) {
82689
+ return primary.size() + result;
82690
+ }
82691
+ return -1;
82692
+ };
82693
+ DChartPlotAreaTwofoldSeriesContainer.prototype.clear = function () {
82694
+ this._primary.clear();
82695
+ this._secondary.clear();
82696
+ return this;
82697
+ };
82698
+ DChartPlotAreaTwofoldSeriesContainer.prototype.size = function () {
82699
+ return this._primary.size() + this._secondary.size();
82700
+ };
82701
+ DChartPlotAreaTwofoldSeriesContainer.prototype.destroy = function () {
82702
+ this.clear();
82703
+ var selection = this._secondary.selection;
82704
+ if (selection) {
82705
+ selection.unbind();
82706
+ }
82707
+ };
82708
+ DChartPlotAreaTwofoldSeriesContainer.prototype.getDomain = function (coordinate, result) {
82709
+ this._primary.getDomain(coordinate, result);
82710
+ var from = result.from;
82711
+ var to = result.to;
82712
+ this._secondary.getDomain(coordinate, result);
82713
+ result.add(from, to);
82714
+ return result;
82715
+ };
82716
+ DChartPlotAreaTwofoldSeriesContainer.prototype.getRange = function (coordinate, result) {
82717
+ result.clear();
82718
+ this._primary.getRange(coordinate, result);
82719
+ var from = result.from;
82720
+ var to = result.to;
82721
+ this._secondary.getRange(coordinate, result);
82722
+ result.add(from, to);
82723
+ return result;
82724
+ };
82725
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "domain", {
82726
+ get: function () {
82727
+ var result = this._domain;
82728
+ result.clear();
82729
+ var pdomain = this._primary.domain;
82730
+ result.add(pdomain.from, pdomain.to);
82731
+ var sdomain = this._secondary.domain;
82732
+ result.add(sdomain.from, sdomain.to);
82733
+ return result;
82734
+ },
82735
+ enumerable: false,
82736
+ configurable: true
82737
+ });
82738
+ Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "range", {
82739
+ get: function () {
82740
+ var result = this._domain;
82741
+ result.clear();
82742
+ var prange = this._primary.range;
82743
+ result.add(prange.from, prange.to);
82744
+ var srange = this._secondary.range;
82745
+ result.add(srange.from, srange.to);
82746
+ return result;
82747
+ },
82748
+ enumerable: false,
82749
+ configurable: true
82750
+ });
82751
+ DChartPlotAreaTwofoldSeriesContainer.prototype.hitTest = function (x, y) {
82752
+ var result = this._secondary.hitTest(x, y);
82753
+ if (result != null) {
82754
+ return result;
82755
+ }
82756
+ return this._primary.hitTest(x, y);
82148
82757
  };
82149
- DChartPlotAreaImpl.prototype.destroy = function () {
82758
+ DChartPlotAreaTwofoldSeriesContainer.prototype.calcHitPoint = function (x, y, result) {
82759
+ var _a;
82760
+ var result1 = result;
82761
+ var result2 = ((_a = DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT) !== null && _a !== void 0 ? _a : (DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT = new DChartSeriesHitResult()));
82762
+ var series2 = this._secondary.calcHitPoint(x, y, result2);
82763
+ var series1 = this._primary.calcHitPoint(x, y, result1);
82764
+ if (series1 != null) {
82765
+ if (series2 != null) {
82766
+ if (result1.distance <= result2.distance) {
82767
+ return series1;
82768
+ }
82769
+ else {
82770
+ result1.copyFrom(result2);
82771
+ return series2;
82772
+ }
82773
+ }
82774
+ else {
82775
+ return series1;
82776
+ }
82777
+ }
82778
+ else {
82779
+ if (series2 != null) {
82780
+ result1.copyFrom(result2);
82781
+ return series2;
82782
+ }
82783
+ else {
82784
+ return null;
82785
+ }
82786
+ }
82787
+ };
82788
+ return DChartPlotAreaTwofoldSeriesContainer;
82789
+ }());
82790
+
82791
+ /*
82792
+ * Copyright (C) 2019 Toshiba Corporation
82793
+ * SPDX-License-Identifier: Apache-2.0
82794
+ */
82795
+ var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
82796
+ function DChartPlotAreaTwofoldSubBase(plotArea, onContainerChange, mask, margin, axisShapeContainer, options) {
82797
+ this._isContainerBoundsDirty = true;
82798
+ this._containerBounds = new pixi_js.Rectangle();
82799
+ this._workPoint = new pixi_js.Point();
82800
+ this._margin = margin;
82801
+ this._plotArea = plotArea;
82802
+ // Container
82803
+ var container = new DChartPlotAreaContainer(onContainerChange);
82804
+ this._container = container;
82805
+ // Coordinate
82806
+ this._coordinate = new DChartCoordinateContainerImpl(this, options === null || options === void 0 ? void 0 : options.coordinate);
82807
+ // Overflow mask
82808
+ if (mask) {
82809
+ container.mask = this.getOverflowMask();
82810
+ }
82811
+ // Series
82812
+ this._series = new DChartSeriesContainerImpl(this, options === null || options === void 0 ? void 0 : options.series);
82813
+ // Axis
82814
+ this._axis = new DChartAxisContainerImpl(this, axisShapeContainer, options === null || options === void 0 ? void 0 : options.axis);
82815
+ }
82816
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "plotArea", {
82817
+ get: function () {
82818
+ return this._plotArea;
82819
+ },
82820
+ enumerable: false,
82821
+ configurable: true
82822
+ });
82823
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "chart", {
82824
+ get: function () {
82825
+ return this._plotArea.chart;
82826
+ },
82827
+ enumerable: false,
82828
+ configurable: true
82829
+ });
82830
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "container", {
82831
+ get: function () {
82832
+ return this._container;
82833
+ },
82834
+ enumerable: false,
82835
+ configurable: true
82836
+ });
82837
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "series", {
82838
+ get: function () {
82839
+ return this._series;
82840
+ },
82841
+ enumerable: false,
82842
+ configurable: true
82843
+ });
82844
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "coordinate", {
82845
+ get: function () {
82846
+ return this._coordinate;
82847
+ },
82848
+ enumerable: false,
82849
+ configurable: true
82850
+ });
82851
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "axis", {
82852
+ get: function () {
82853
+ return this._axis;
82854
+ },
82855
+ enumerable: false,
82856
+ configurable: true
82857
+ });
82858
+ // eslint-disable-next-line @typescript-eslint/ban-types
82859
+ DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
82860
+ this._plotArea.on(name, callback, context);
82861
+ return this;
82862
+ };
82863
+ // eslint-disable-next-line @typescript-eslint/ban-types
82864
+ DChartPlotAreaTwofoldSubBase.prototype.off = function (name, callback, context) {
82865
+ this._plotArea.off(name, callback, context);
82866
+ return this;
82867
+ };
82868
+ DChartPlotAreaTwofoldSubBase.prototype.getPixelDomain = function (result) {
82869
+ var plotArea = this._plotArea;
82870
+ var padding = plotArea.padding;
82871
+ var width = plotArea.width;
82872
+ return result.set(padding.getLeft(), width - padding.getRight());
82873
+ };
82874
+ DChartPlotAreaTwofoldSubBase.prototype.getAxisBounds = function (position) {
82875
+ return this.getPixelBounds();
82876
+ };
82877
+ DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsX = function () {
82878
+ return this.getPixelBounds();
82879
+ };
82880
+ DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsY = function () {
82881
+ return this.getPixelBounds();
82882
+ };
82883
+ DChartPlotAreaTwofoldSubBase.prototype.toBoundsDirty = function () {
82884
+ this._isContainerBoundsDirty = true;
82885
+ };
82886
+ DChartPlotAreaTwofoldSubBase.prototype.destroy = function () {
82150
82887
  this._container.destroy();
82151
82888
  this._series.destroy();
82152
82889
  this._axis.destroy();
82153
82890
  };
82154
- DChartPlotAreaImpl.prototype.getType = function () {
82155
- return "DChartPlotArea";
82891
+ return DChartPlotAreaTwofoldSubBase;
82892
+ }());
82893
+
82894
+ /*
82895
+ * Copyright (C) 2019 Toshiba Corporation
82896
+ * SPDX-License-Identifier: Apache-2.0
82897
+ */
82898
+ var DChartPlotAreaTwofoldSubPrimary = /** @class */ (function (_super) {
82899
+ __extends(DChartPlotAreaTwofoldSubPrimary, _super);
82900
+ function DChartPlotAreaTwofoldSubPrimary() {
82901
+ return _super !== null && _super.apply(this, arguments) || this;
82902
+ }
82903
+ DChartPlotAreaTwofoldSubPrimary.prototype.getOverflowMask = function () {
82904
+ if (this._overflowMask == null) {
82905
+ var plotArea = this._plotArea;
82906
+ this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskPrimary(plotArea);
82907
+ plotArea.reflowable.add(this._overflowMask);
82908
+ plotArea.toDirty();
82909
+ }
82910
+ return this._overflowMask;
82156
82911
  };
82157
- DChartPlotAreaImpl.prototype.getBoundsInContainer = function () {
82158
- var result = this._boundsInContainer;
82159
- if (this._isBoundsInContainerDirty) {
82160
- this._isBoundsInContainerDirty = false;
82161
- var container = this.container;
82162
- container.updateTransform();
82163
- var transform = container.transform.localTransform;
82164
- var work = this._workPoint;
82165
- work.set(0, 0);
82166
- transform.applyInverse(work, work);
82167
- result.x = work.x;
82168
- result.y = work.y;
82169
- work.set(this.width, this.height);
82170
- transform.applyInverse(work, work);
82171
- result.width = work.x - result.x;
82172
- result.height = work.y - result.y;
82912
+ DChartPlotAreaTwofoldSubPrimary.prototype.getPixelRange = function (result) {
82913
+ var plotArea = this._plotArea;
82914
+ var padding = plotArea.padding;
82915
+ var paddingTop = padding.getTop();
82916
+ var height = plotArea.height;
82917
+ return result.set((height - this._margin) * 0.5, paddingTop);
82918
+ };
82919
+ DChartPlotAreaTwofoldSubPrimary.prototype.getPixelBounds = function () {
82920
+ var result = this._plotArea.getPixelBounds();
82921
+ result.height *= 0.5;
82922
+ return result;
82923
+ };
82924
+ DChartPlotAreaTwofoldSubPrimary.prototype.getContainerBounds = function () {
82925
+ var result = this._containerBounds;
82926
+ if (this._isContainerBoundsDirty) {
82927
+ this._isContainerBoundsDirty = false;
82928
+ var bounds = this._plotArea.getContainerBounds();
82929
+ result.width = bounds.width;
82930
+ result.height = bounds.height * 0.5;
82931
+ result.x = bounds.x;
82932
+ result.y = bounds.y;
82173
82933
  }
82174
82934
  return result;
82175
82935
  };
82176
- DChartPlotAreaImpl.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
82177
- var coordinate = this._coordinate;
82178
- var axis = this._axis;
82179
- var series = this._series;
82936
+ return DChartPlotAreaTwofoldSubPrimary;
82937
+ }(DChartPlotAreaTwofoldSubBase));
82938
+
82939
+ /*
82940
+ * Copyright (C) 2019 Toshiba Corporation
82941
+ * SPDX-License-Identifier: Apache-2.0
82942
+ */
82943
+ var DChartPlotAreaTwofoldSubSecondary = /** @class */ (function (_super) {
82944
+ __extends(DChartPlotAreaTwofoldSubSecondary, _super);
82945
+ function DChartPlotAreaTwofoldSubSecondary() {
82946
+ return _super !== null && _super.apply(this, arguments) || this;
82947
+ }
82948
+ DChartPlotAreaTwofoldSubSecondary.prototype.getOverflowMask = function () {
82949
+ if (this._overflowMask == null) {
82950
+ var plotArea = this._plotArea;
82951
+ this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskSecondary(plotArea);
82952
+ plotArea.reflowable.add(this._overflowMask);
82953
+ plotArea.toDirty();
82954
+ }
82955
+ return this._overflowMask;
82956
+ };
82957
+ DChartPlotAreaTwofoldSubSecondary.prototype.getPixelRange = function (result) {
82958
+ var plotArea = this._plotArea;
82959
+ var padding = plotArea.padding;
82960
+ var paddingBottom = padding.getBottom();
82961
+ var height = plotArea.height;
82962
+ return result.set(height - paddingBottom, (height + this._margin) * 0.5);
82963
+ };
82964
+ DChartPlotAreaTwofoldSubSecondary.prototype.getPixelBounds = function () {
82965
+ var result = this._plotArea.getPixelBounds();
82966
+ result.height *= 0.5;
82967
+ result.y = result.height;
82968
+ return result;
82969
+ };
82970
+ DChartPlotAreaTwofoldSubSecondary.prototype.getContainerBounds = function () {
82971
+ var result = this._containerBounds;
82972
+ if (this._isContainerBoundsDirty) {
82973
+ this._isContainerBoundsDirty = false;
82974
+ var bounds = this._plotArea.getContainerBounds();
82975
+ result.width = bounds.width;
82976
+ result.height = bounds.height * 0.5;
82977
+ result.x = bounds.x;
82978
+ result.y = bounds.y + result.height;
82979
+ }
82980
+ return result;
82981
+ };
82982
+ return DChartPlotAreaTwofoldSubSecondary;
82983
+ }(DChartPlotAreaTwofoldSubBase));
82984
+
82985
+ var DChartPlotAreaTwofoldViewTargetPoint = /** @class */ (function () {
82986
+ function DChartPlotAreaTwofoldViewTargetPoint(primary, secondary) {
82987
+ this._primary = primary;
82988
+ this._secondary = secondary;
82989
+ }
82990
+ Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "x", {
82991
+ get: function () {
82992
+ return this._secondary.x;
82993
+ },
82994
+ set: function (x) {
82995
+ this._primary.x = x;
82996
+ this._secondary.x = x;
82997
+ },
82998
+ enumerable: false,
82999
+ configurable: true
83000
+ });
83001
+ Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "y", {
83002
+ get: function () {
83003
+ return this._secondary.y;
83004
+ },
83005
+ set: function (y) {
83006
+ this._primary.y = y;
83007
+ this._secondary.y = y;
83008
+ },
83009
+ enumerable: false,
83010
+ configurable: true
83011
+ });
83012
+ DChartPlotAreaTwofoldViewTargetPoint.prototype.set = function (x, y) {
83013
+ this._primary.set(x, y);
83014
+ this._secondary.set(x, y);
83015
+ return this;
83016
+ };
83017
+ return DChartPlotAreaTwofoldViewTargetPoint;
83018
+ }());
83019
+ var DChartPlotAreaTwofoldViewTarget = /** @class */ (function () {
83020
+ function DChartPlotAreaTwofoldViewTarget(primary, secondary) {
83021
+ this._primary = primary;
83022
+ this._secondary = secondary;
83023
+ this._scale = new DChartPlotAreaTwofoldViewTargetPoint(primary.scale, secondary.scale);
83024
+ this._position = new DChartPlotAreaTwofoldViewTargetPoint(primary.position, secondary.position);
83025
+ }
83026
+ Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "scale", {
83027
+ get: function () {
83028
+ return this._scale;
83029
+ },
83030
+ enumerable: false,
83031
+ configurable: true
83032
+ });
83033
+ Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "position", {
83034
+ get: function () {
83035
+ return this._position;
83036
+ },
83037
+ enumerable: false,
83038
+ configurable: true
83039
+ });
83040
+ DChartPlotAreaTwofoldViewTarget.prototype.getLocalBounds = function (rect) {
83041
+ this._primary.getLocalBounds(rect);
83042
+ var x1 = rect.x;
83043
+ var y1 = rect.y;
83044
+ var w1 = rect.width;
83045
+ var h1 = rect.height;
83046
+ this._secondary.getLocalBounds(rect);
83047
+ var x2 = rect.x;
83048
+ var y2 = rect.y;
83049
+ var w2 = rect.width;
83050
+ var h2 = rect.height;
83051
+ var x3 = Math.min(x1, x2);
83052
+ var y3 = Math.min(y1, y2);
83053
+ var x4 = Math.max(x1 + w1, x2 + w2);
83054
+ var y4 = Math.max(y1 + h1, y2 + h2);
83055
+ rect.x = x3;
83056
+ rect.y = y3;
83057
+ rect.width = x4 - x3;
83058
+ rect.height = y4 - y3;
83059
+ return rect;
83060
+ };
83061
+ return DChartPlotAreaTwofoldViewTarget;
83062
+ }());
83063
+
83064
+ /*
83065
+ * Copyright (C) 2019 Toshiba Corporation
83066
+ * SPDX-License-Identifier: Apache-2.0
83067
+ */
83068
+ var DChartPlotAreaTwofold = /** @class */ (function (_super) {
83069
+ __extends(DChartPlotAreaTwofold, _super);
83070
+ function DChartPlotAreaTwofold(chart, options) {
83071
+ var _a, _b, _c, _d, _e, _f, _g;
83072
+ var _this = _super.call(this, chart, options) || this;
83073
+ // Margin
83074
+ var theme = _this.theme;
83075
+ var margin = (_a = options === null || options === void 0 ? void 0 : options.margin) !== null && _a !== void 0 ? _a : theme.getMargin();
83076
+ _this._margin = margin;
83077
+ // Primary
83078
+ var axisShapeContainer = new EShapeContainer();
83079
+ var onContainerChangeBound = function () {
83080
+ _this.onContainerChange();
83081
+ };
83082
+ var mask = (_b = options === null || options === void 0 ? void 0 : options.mask) !== null && _b !== void 0 ? _b : theme.isOverflowMaskEnabled();
83083
+ var primaryOptions = options === null || options === void 0 ? void 0 : options.primary;
83084
+ var primary = new DChartPlotAreaTwofoldSubPrimary(_this, onContainerChangeBound, mask, margin, axisShapeContainer, primaryOptions);
83085
+ _this._primary = primary;
83086
+ // Secondary
83087
+ var secondaryOptions = options === null || options === void 0 ? void 0 : options.secondary;
83088
+ var secondary = new DChartPlotAreaTwofoldSubSecondary(_this, onContainerChangeBound, mask, margin, axisShapeContainer, secondaryOptions);
83089
+ _this._secondary = secondary;
83090
+ // Container
83091
+ _this.addChild(primary.container);
83092
+ _this.addChild(secondary.container);
83093
+ // Coordinate
83094
+ _this._coordinate = new DChartPlotAreaTwofoldCoorinateContainer(_this, primary.coordinate, secondary.coordinate);
83095
+ // Series
83096
+ var primarySeries = primary.series;
83097
+ var secondarySeries = secondary.series;
83098
+ var series = new DChartPlotAreaTwofoldSeriesContainer(_this, primarySeries, secondarySeries);
83099
+ _this._series = series;
83100
+ // Axis
83101
+ var primaryAxis = primary.axis;
83102
+ var secondaryAxis = secondary.axis;
83103
+ _this.addChild(axisShapeContainer);
83104
+ var axis = new DChartPlotAreaTwofoldAxisContainer(_this, axisShapeContainer, primaryAxis, secondaryAxis);
83105
+ _this._axis = axis;
83106
+ // Add Series
83107
+ _this.addSeries(primarySeries, (_c = primaryOptions === null || primaryOptions === void 0 ? void 0 : primaryOptions.series) === null || _c === void 0 ? void 0 : _c.list);
83108
+ _this.addSeries(secondarySeries, (_d = secondaryOptions === null || secondaryOptions === void 0 ? void 0 : secondaryOptions.series) === null || _d === void 0 ? void 0 : _d.list);
83109
+ // Add Axes
83110
+ _this.addAxes(primaryAxis, (_e = primaryOptions === null || primaryOptions === void 0 ? void 0 : primaryOptions.axis) === null || _e === void 0 ? void 0 : _e.list);
83111
+ _this.addAxes(secondaryAxis, (_f = secondaryOptions === null || secondaryOptions === void 0 ? void 0 : secondaryOptions.axis) === null || _f === void 0 ? void 0 : _f.list);
83112
+ _this.addAxes(axis, (_g = options === null || options === void 0 ? void 0 : options.axis) === null || _g === void 0 ? void 0 : _g.list);
83113
+ // Selection
83114
+ var selection = options === null || options === void 0 ? void 0 : options.selection;
83115
+ if (selection != null) {
83116
+ primarySeries.selection = selection;
83117
+ secondarySeries.selection = selection;
83118
+ selection.bind(series);
83119
+ }
83120
+ return _this;
83121
+ }
83122
+ DChartPlotAreaTwofold.prototype.addSeries = function (series, list) {
83123
+ if (list != null) {
83124
+ var listLength = list.length;
83125
+ if (0 < listLength) {
83126
+ for (var i = 0; i < listLength; ++i) {
83127
+ series.add(list[i]);
83128
+ }
83129
+ series.update();
83130
+ }
83131
+ }
83132
+ };
83133
+ DChartPlotAreaTwofold.prototype.addAxes = function (axis, list) {
83134
+ if (list != null) {
83135
+ for (var i = 0, imax = list.length; i < imax; ++i) {
83136
+ axis.add(list[i]);
83137
+ }
83138
+ }
83139
+ };
83140
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "primary", {
83141
+ get: function () {
83142
+ return this._primary;
83143
+ },
83144
+ enumerable: false,
83145
+ configurable: true
83146
+ });
83147
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "secondary", {
83148
+ get: function () {
83149
+ return this._secondary;
83150
+ },
83151
+ enumerable: false,
83152
+ configurable: true
83153
+ });
83154
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "container", {
83155
+ get: function () {
83156
+ return this.secondary.container;
83157
+ },
83158
+ enumerable: false,
83159
+ configurable: true
83160
+ });
83161
+ DChartPlotAreaTwofold.prototype.onContainerChange = function () {
83162
+ this._isViewDirty = true;
83163
+ this._isContainerBoundsDirty = true;
83164
+ this._primary.toBoundsDirty();
83165
+ this._secondary.toBoundsDirty();
83166
+ DApplications.update(this);
83167
+ };
83168
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "coordinate", {
83169
+ get: function () {
83170
+ return this._coordinate;
83171
+ },
83172
+ enumerable: false,
83173
+ configurable: true
83174
+ });
83175
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "series", {
83176
+ get: function () {
83177
+ return this._series;
83178
+ },
83179
+ enumerable: false,
83180
+ configurable: true
83181
+ });
83182
+ Object.defineProperty(DChartPlotAreaTwofold.prototype, "axis", {
83183
+ get: function () {
83184
+ return this._axis;
83185
+ },
83186
+ enumerable: false,
83187
+ configurable: true
83188
+ });
83189
+ DChartPlotAreaTwofold.prototype.newView = function (options) {
83190
+ var _this = this;
83191
+ var viewTarget;
83192
+ var toViewTarget = function () {
83193
+ return (viewTarget !== null && viewTarget !== void 0 ? viewTarget : (viewTarget = new DChartPlotAreaTwofoldViewTarget(_this._primary.container, _this._secondary.container)));
83194
+ };
83195
+ return new DViewImpl(this, toViewTarget, options === null || options === void 0 ? void 0 : options.view);
83196
+ };
83197
+ DChartPlotAreaTwofold.prototype.onViewDirty = function () {
83198
+ this._coordinate.fit();
83199
+ this._axis.onRender();
83200
+ this._series.onRender();
83201
+ };
83202
+ DChartPlotAreaTwofold.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
82180
83203
  if (duration != null && duration <= 0) {
82181
- coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
82182
- axis.update();
82183
- series.update();
83204
+ var primary = this.primary;
83205
+ primary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
83206
+ primary.axis.update();
83207
+ primary.series.update();
83208
+ var secondary = this.secondary;
83209
+ secondary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
83210
+ secondary.axis.update();
83211
+ secondary.series.update();
82184
83212
  }
82185
83213
  else {
82186
83214
  this._blendDuration = duration != null ? duration : 200;
82187
83215
  this._blendStartTime = Date.now();
82188
- coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
83216
+ this.primary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
83217
+ this.secondary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
82189
83218
  var blendTimeout = this._blendTimeout;
82190
83219
  if (blendTimeout != null) {
82191
83220
  window.clearTimeout(blendTimeout);
@@ -82194,7 +83223,7 @@ var DChartPlotAreaImpl = /** @class */ (function (_super) {
82194
83223
  }
82195
83224
  return this;
82196
83225
  };
82197
- DChartPlotAreaImpl.prototype.onBlend = function () {
83226
+ DChartPlotAreaTwofold.prototype.onBlend = function () {
82198
83227
  var now = Date.now();
82199
83228
  var ratio = (now - this._blendStartTime) / this._blendDuration;
82200
83229
  if (ratio < 1) {
@@ -82204,12 +83233,24 @@ var DChartPlotAreaImpl = /** @class */ (function (_super) {
82204
83233
  this._blendTimeout = null;
82205
83234
  ratio = 1;
82206
83235
  }
82207
- this._coordinate.blend(DAnimationTimings.ELASTIC(ratio));
82208
- this._axis.update();
82209
- this._series.update();
83236
+ var t = DAnimationTimings.ELASTIC(ratio);
83237
+ var primary = this.primary;
83238
+ primary.coordinate.blend(t);
83239
+ primary.axis.update();
83240
+ primary.series.update();
83241
+ var secondary = this.secondary;
83242
+ secondary.coordinate.blend(t);
83243
+ secondary.axis.update();
83244
+ secondary.series.update();
83245
+ };
83246
+ DChartPlotAreaTwofold.prototype.destroy = function () {
83247
+ var _a, _b;
83248
+ (_a = this._primary) === null || _a === void 0 ? void 0 : _a.destroy();
83249
+ (_b = this._secondary) === null || _b === void 0 ? void 0 : _b.destroy();
83250
+ this._axis.destroy();
82210
83251
  };
82211
- return DChartPlotAreaImpl;
82212
- }(DBase));
83252
+ return DChartPlotAreaTwofold;
83253
+ }(DChartPlotAreaBase));
82213
83254
 
82214
83255
  /*
82215
83256
  * Copyright (C) 2019 Toshiba Corporation
@@ -82423,18 +83464,14 @@ var DChartSelectionGridlineX = /** @class */ (function (_super) {
82423
83464
  var shape = this._shape;
82424
83465
  if (shape) {
82425
83466
  var mappedX = mappedPosition.x;
82426
- var height = container.plotArea.height;
82427
- shape.transform.position.set(mappedX, height * 0.5);
82428
- shape.size.set(0, height);
82429
- shape.visible = this.isVisible(container, position, mappedPosition);
83467
+ var bounds = container.plotArea.getSelectionBoundsX();
83468
+ shape.transform.position.set(mappedX, bounds.y + bounds.height * 0.5);
83469
+ shape.size.set(0, bounds.height);
83470
+ shape.visible = bounds.x <= mappedX && mappedX <= bounds.x + bounds.width;
82430
83471
  return true;
82431
83472
  }
82432
83473
  return false;
82433
83474
  };
82434
- DChartSelectionGridlineX.prototype.isVisible = function (container, position, mappedPosition) {
82435
- var x = mappedPosition.x;
82436
- return 0 <= x && x <= container.plotArea.width;
82437
- };
82438
83475
  DChartSelectionGridlineX.prototype.getType = function () {
82439
83476
  return "DChartSelectionGridlineX";
82440
83477
  };
@@ -82454,18 +83491,14 @@ var DChartSelectionGridlineY = /** @class */ (function (_super) {
82454
83491
  var shape = this._shape;
82455
83492
  if (shape) {
82456
83493
  var mappedY = mappedPosition.y;
82457
- var width = container.plotArea.width;
82458
- shape.transform.position.set(width * 0.5, mappedY);
82459
- shape.size.set(width, 0);
82460
- shape.visible = this.isVisible(container, position, mappedPosition);
83494
+ var bounds = container.plotArea.getSelectionBoundsY();
83495
+ shape.transform.position.set(bounds.x + bounds.width * 0.5, mappedY);
83496
+ shape.size.set(bounds.width, 0);
83497
+ shape.visible = bounds.y <= mappedY && mappedY <= bounds.y + bounds.height;
82461
83498
  return true;
82462
83499
  }
82463
83500
  return false;
82464
83501
  };
82465
- DChartSelectionGridlineY.prototype.isVisible = function (container, position, mappedPosition) {
82466
- var y = mappedPosition.y;
82467
- return 0 <= y && y <= container.plotArea.height;
82468
- };
82469
83502
  DChartSelectionGridlineY.prototype.getType = function () {
82470
83503
  return "DChartSelectionGridlineY";
82471
83504
  };
@@ -82493,8 +83526,11 @@ var DChartSelectionMarker = /** @class */ (function (_super) {
82493
83526
  DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition) {
82494
83527
  var x = mappedPosition.x;
82495
83528
  var y = mappedPosition.y;
82496
- var plotArea = container.plotArea;
82497
- return 0 <= x && x <= plotArea.width && 0 <= y && y <= plotArea.height;
83529
+ var bounds = container.plotArea.getPixelBounds();
83530
+ return (bounds.x <= x &&
83531
+ x <= bounds.x + bounds.width &&
83532
+ bounds.y <= y &&
83533
+ y <= bounds.y + bounds.height);
82498
83534
  };
82499
83535
  DChartSelectionMarker.prototype.getType = function () {
82500
83536
  return "DChartSelectionMarker";
@@ -84120,7 +85156,7 @@ var DChartSeriesLinear = /** @class */ (function (_super) {
84120
85156
  var p1x = NaN;
84121
85157
  var p1y = NaN;
84122
85158
  var threshold = 0.00001;
84123
- var bounds = container.plotArea.getBoundsInContainer();
85159
+ var bounds = container.plotArea.getContainerBounds();
84124
85160
  if (babs <= aabs) {
84125
85161
  var xfrom = xcoordinate.unmap(xcoordinate.transform.unmap(bounds.x));
84126
85162
  var xto = xcoordinate.unmap(xcoordinate.transform.unmap(bounds.x + bounds.width));
@@ -84285,10 +85321,8 @@ var DChart = /** @class */ (function (_super) {
84285
85321
  DChart.prototype.init = function (options) {
84286
85322
  var _a;
84287
85323
  _super.prototype.init.call(this, options);
84288
- // Plot area
84289
- var plotArea = this.plotArea;
84290
- this.addChild(plotArea);
84291
85324
  // Overflow mask
85325
+ var plotArea = this.plotArea;
84292
85326
  var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : this.theme.isOverflowMaskEnabled();
84293
85327
  if (mask) {
84294
85328
  plotArea.axis.container.mask = this.getOverflowMask();
@@ -84304,22 +85338,25 @@ var DChart = /** @class */ (function (_super) {
84304
85338
  };
84305
85339
  Object.defineProperty(DChart.prototype, "plotArea", {
84306
85340
  get: function () {
84307
- var result = this._plotArea;
84308
- if (result == null) {
84309
- result = this.newPlotArea();
84310
- this._plotArea = result;
84311
- }
84312
- return result;
85341
+ var _a;
85342
+ return ((_a = this._plotArea) !== null && _a !== void 0 ? _a : (this._plotArea = this.newPlotArea()));
84313
85343
  },
84314
85344
  enumerable: false,
84315
85345
  configurable: true
84316
85346
  });
84317
85347
  DChart.prototype.newPlotArea = function () {
84318
85348
  var _a;
84319
- return new DChartPlotAreaImpl(this, (_a = this._options) === null || _a === void 0 ? void 0 : _a.plotArea);
84320
- };
84321
- DChart.prototype.getType = function () {
84322
- return "DChart";
85349
+ var plotArea = (_a = this._options) === null || _a === void 0 ? void 0 : _a.plotArea;
85350
+ if (plotArea != null && ("primary" in plotArea || "secondary" in plotArea)) {
85351
+ var result = new DChartPlotAreaTwofold(this, plotArea);
85352
+ this.addChild(result);
85353
+ return result;
85354
+ }
85355
+ else {
85356
+ var result = new DChartPlotAreaOnefold(this, plotArea);
85357
+ this.addChild(result);
85358
+ return result;
85359
+ }
84323
85360
  };
84324
85361
  DChart.prototype.destroy = function () {
84325
85362
  var _a;
@@ -84328,6 +85365,9 @@ var DChart = /** @class */ (function (_super) {
84328
85365
  _super.prototype.destroy.call(this);
84329
85366
  }
84330
85367
  };
85368
+ DChart.prototype.getType = function () {
85369
+ return "DChart";
85370
+ };
84331
85371
  return DChart;
84332
85372
  }(DBase));
84333
85373
 
@@ -99725,8 +100765,21 @@ exports.DChartCoordinateTransformMarkImpl = DChartCoordinateTransformMarkImpl;
99725
100765
  exports.DChartLegend = DChartLegend;
99726
100766
  exports.DChartLegendItem = DChartLegendItem;
99727
100767
  exports.DChartOverview = DChartOverview;
100768
+ exports.DChartPlotAreaBase = DChartPlotAreaBase;
99728
100769
  exports.DChartPlotAreaContainer = DChartPlotAreaContainer;
99729
- exports.DChartPlotAreaImpl = DChartPlotAreaImpl;
100770
+ exports.DChartPlotAreaOnefold = DChartPlotAreaOnefold;
100771
+ exports.DChartPlotAreaTwofold = DChartPlotAreaTwofold;
100772
+ exports.DChartPlotAreaTwofoldAxisContainer = DChartPlotAreaTwofoldAxisContainer;
100773
+ exports.DChartPlotAreaTwofoldCoorinateContainer = DChartPlotAreaTwofoldCoorinateContainer;
100774
+ exports.DChartPlotAreaTwofoldCoorinateContainerSub = DChartPlotAreaTwofoldCoorinateContainerSub;
100775
+ exports.DChartPlotAreaTwofoldOverflowMaskPrimary = DChartPlotAreaTwofoldOverflowMaskPrimary;
100776
+ exports.DChartPlotAreaTwofoldOverflowMaskSecondary = DChartPlotAreaTwofoldOverflowMaskSecondary;
100777
+ exports.DChartPlotAreaTwofoldSeriesContainer = DChartPlotAreaTwofoldSeriesContainer;
100778
+ exports.DChartPlotAreaTwofoldSubBase = DChartPlotAreaTwofoldSubBase;
100779
+ exports.DChartPlotAreaTwofoldSubPrimary = DChartPlotAreaTwofoldSubPrimary;
100780
+ exports.DChartPlotAreaTwofoldSubSecondary = DChartPlotAreaTwofoldSubSecondary;
100781
+ exports.DChartPlotAreaTwofoldViewTarget = DChartPlotAreaTwofoldViewTarget;
100782
+ exports.DChartPlotAreaTwofoldViewTargetPoint = DChartPlotAreaTwofoldViewTargetPoint;
99730
100783
  exports.DChartRegionImpl = DChartRegionImpl;
99731
100784
  exports.DChartRegionImplObservable = DChartRegionImplObservable;
99732
100785
  exports.DChartSelectionContainerImpl = DChartSelectionContainerImpl;
@@ -100681,6 +101734,7 @@ exports.DynamicFontAtlasCharacterType = DynamicFontAtlasCharacterType;
100681
101734
  exports.DynamicFontAtlasFont = DynamicFontAtlasFont;
100682
101735
  exports.DynamicFontAtlases = DynamicFontAtlases;
100683
101736
  exports.DynamicSDFFontAtlas = DynamicSDFFontAtlas;
101737
+ exports.DynamicSDFFontAtlasFont = DynamicSDFFontAtlasFont;
100684
101738
  exports.DynamicSDFFontAtlases = DynamicSDFFontAtlases;
100685
101739
  exports.DynamicSDFFontGenerator = DynamicSDFFontGenerator;
100686
101740
  exports.EShapeAcceptorEdgeSide = EShapeAcceptorEdgeSide;