@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.
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +7 -7
- package/dist/types/wcardinal/ui/d-chart-axis-container-impl.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-chart-axis-container.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +3 -5
- package/dist/types/wcardinal/ui/d-chart-coordinate-container-impl.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-chart-coordinate-container.d.ts +2 -2
- package/dist/types/wcardinal/ui/{d-chart-plot-area-impl.d.ts → d-chart-plot-area-base.d.ts} +23 -20
- package/dist/types/wcardinal/ui/d-chart-plot-area-onefold.d.ts +41 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-axis-container.d.ts +24 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.d.ts +22 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.d.ts +18 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-series-container.d.ts +43 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +46 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.d.ts +11 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.d.ts +11 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub.d.ts +22 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-view-target.d.ts +30 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold.d.ts +46 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +31 -7
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-x.d.ts +0 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-y.d.ts +0 -1
- package/dist/types/wcardinal/ui/d-chart-series-container-impl.d.ts +5 -4
- package/dist/types/wcardinal/ui/d-chart-series-container.d.ts +2 -3
- package/dist/types/wcardinal/ui/d-chart.d.ts +5 -3
- package/dist/types/wcardinal/ui/index.d.ts +14 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.d.ts +1 -0
- package/dist/types/wcardinal/ui/util/dynamic-font-atlas-font.d.ts +1 -0
- package/dist/types/wcardinal/ui/util/dynamic-sdf-font-atlas-font.d.ts +12 -0
- package/dist/types/wcardinal/ui/util/dynamic-sdf-font-atlas.d.ts +2 -9
- package/dist/types/wcardinal/ui/util/index.d.ts +1 -0
- package/dist/types/wcardinal/ui/util/util-font.d.ts +7 -2
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js +13 -8
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +15 -14
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js +4 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js +4 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +4 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-container-impl.js +2 -3
- package/dist/wcardinal/ui/d-chart-axis-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-guide-simple.js +9 -6
- package/dist/wcardinal/ui/d-chart-axis-guide-simple.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-base.js +2 -10
- package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-base.js +117 -0
- package/dist/wcardinal/ui/d-chart-plot-area-base.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-onefold.js +166 -0
- package/dist/wcardinal/ui/d-chart-plot-area-onefold.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js +128 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js +118 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js +53 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js +28 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js +28 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js +186 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +109 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js +49 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js +50 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js +6 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js +81 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold.js +204 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +4 -8
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +4 -8
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-marker.js +5 -2
- package/dist/wcardinal/ui/d-chart-selection-marker.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-container-impl.js +4 -2
- package/dist/wcardinal/ui/d-chart-series-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-linear.js +1 -1
- package/dist/wcardinal/ui/d-chart-series-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-chart.js +19 -14
- package/dist/wcardinal/ui/d-chart.js.map +1 -1
- package/dist/wcardinal/ui/index.js +14 -1
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-font.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-font.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-font.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-font.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-font-atlas-font.js +3 -4
- package/dist/wcardinal/ui/util/dynamic-font-atlas-font.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-font-atlas.js +5 -3
- package/dist/wcardinal/ui/util/dynamic-font-atlas.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas-font.js +30 -0
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas-font.js.map +1 -0
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js +13 -27
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js.map +1 -1
- package/dist/wcardinal/ui/util/index.js +1 -0
- package/dist/wcardinal/ui/util/index.js.map +1 -1
- package/dist/wcardinal/ui/util/util-font.js +14 -21
- package/dist/wcardinal/ui/util/util-font.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +5 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +5 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +5 -2
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +5 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +5 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +5 -2
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +1391 -337
- package/dist/wcardinal-ui.js +1383 -335
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-impl.js +0 -237
- package/dist/wcardinal/ui/d-chart-plot-area-impl.js.map +0 -1
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.419.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -21221,6 +21221,34 @@
|
|
|
21221
21221
|
LETTER_RNB: LETTER_RNB
|
|
21222
21222
|
};
|
|
21223
21223
|
|
|
21224
|
+
/*
|
|
21225
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
21226
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
21227
|
+
*/
|
|
21228
|
+
var DynamicSDFFontAtlasFont = /** @class */ (function () {
|
|
21229
|
+
function DynamicSDFFontAtlasFont(fontFamily) {
|
|
21230
|
+
this.id = DynamicSDFFontAtlasFont.toFontFamily(fontFamily);
|
|
21231
|
+
this.size = 32;
|
|
21232
|
+
this.italic = false;
|
|
21233
|
+
this.measured = false;
|
|
21234
|
+
this.ascent = 0;
|
|
21235
|
+
this.descent = 0;
|
|
21236
|
+
}
|
|
21237
|
+
DynamicSDFFontAtlasFont.toFontFamily = function (fontFamily) {
|
|
21238
|
+
return fontFamily === "auto" ? DynamicSDFFontAtlasFont.getAutoFontFamily() : fontFamily;
|
|
21239
|
+
};
|
|
21240
|
+
DynamicSDFFontAtlasFont.getAutoFontFamily = function () {
|
|
21241
|
+
if (DynamicSDFFontAtlasFont.FONT_FAMILY_AUTO == null) {
|
|
21242
|
+
DynamicSDFFontAtlasFont.FONT_FAMILY_AUTO = DThemes.getInstance()
|
|
21243
|
+
.get("DBase")
|
|
21244
|
+
.getFontFamilly();
|
|
21245
|
+
}
|
|
21246
|
+
return DynamicSDFFontAtlasFont.FONT_FAMILY_AUTO;
|
|
21247
|
+
};
|
|
21248
|
+
DynamicSDFFontAtlasFont.FONT_FAMILY_AUTO = null;
|
|
21249
|
+
return DynamicSDFFontAtlasFont;
|
|
21250
|
+
}());
|
|
21251
|
+
|
|
21224
21252
|
/*
|
|
21225
21253
|
* Copyright (C) 2019 Toshiba Corporation
|
|
21226
21254
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -21509,6 +21537,69 @@
|
|
|
21509
21537
|
return DynamicSDFFontGenerator;
|
|
21510
21538
|
}());
|
|
21511
21539
|
|
|
21540
|
+
/*
|
|
21541
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
21542
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
21543
|
+
*/
|
|
21544
|
+
var UtilFont = /** @class */ (function () {
|
|
21545
|
+
function UtilFont() {
|
|
21546
|
+
}
|
|
21547
|
+
UtilFont.measure = function (context, font) {
|
|
21548
|
+
if (!font.measured) {
|
|
21549
|
+
if ("fontBoundingBoxAscent" in window.TextMetrics.prototype) {
|
|
21550
|
+
var metrics = context.measureText(pixi_js.TextMetrics.METRICS_STRING);
|
|
21551
|
+
font.ascent = metrics.fontBoundingBoxAscent;
|
|
21552
|
+
font.descent = metrics.fontBoundingBoxDescent;
|
|
21553
|
+
}
|
|
21554
|
+
else {
|
|
21555
|
+
var measured = pixi_js.TextMetrics.measureFont(font.id);
|
|
21556
|
+
font.ascent = measured.ascent;
|
|
21557
|
+
font.descent = measured.descent;
|
|
21558
|
+
}
|
|
21559
|
+
font.measured = true;
|
|
21560
|
+
}
|
|
21561
|
+
};
|
|
21562
|
+
UtilFont.toSize = function (font) {
|
|
21563
|
+
this.setup(font);
|
|
21564
|
+
return parseFloat(window.getComputedStyle(this._span).fontSize);
|
|
21565
|
+
};
|
|
21566
|
+
UtilFont.setup = function (font) {
|
|
21567
|
+
var span = this._span;
|
|
21568
|
+
if (span == null) {
|
|
21569
|
+
span = document.createElement("span");
|
|
21570
|
+
span.innerText = "|ÉqÅ";
|
|
21571
|
+
span.style.border = "none";
|
|
21572
|
+
span.style.margin = "0px";
|
|
21573
|
+
this._span = span;
|
|
21574
|
+
}
|
|
21575
|
+
var block = this._block;
|
|
21576
|
+
if (block == null) {
|
|
21577
|
+
block = document.createElement("div");
|
|
21578
|
+
block.style.display = "inline-block";
|
|
21579
|
+
block.style.width = "0px";
|
|
21580
|
+
block.style.height = "0px";
|
|
21581
|
+
block.style.border = "none";
|
|
21582
|
+
block.style.margin = "0px";
|
|
21583
|
+
block.style.verticalAlign = "baseline";
|
|
21584
|
+
this._block = block;
|
|
21585
|
+
}
|
|
21586
|
+
var div = this._div;
|
|
21587
|
+
if (div == null) {
|
|
21588
|
+
div = document.createElement("div");
|
|
21589
|
+
div.style.position = "absolute";
|
|
21590
|
+
div.style.padding = "0px";
|
|
21591
|
+
div.style.margin = "0px";
|
|
21592
|
+
div.style.visibility = "hidden";
|
|
21593
|
+
div.appendChild(span);
|
|
21594
|
+
div.appendChild(block);
|
|
21595
|
+
document.body.appendChild(div);
|
|
21596
|
+
this._div = div;
|
|
21597
|
+
}
|
|
21598
|
+
span.style.font = font;
|
|
21599
|
+
};
|
|
21600
|
+
return UtilFont;
|
|
21601
|
+
}());
|
|
21602
|
+
|
|
21512
21603
|
/*
|
|
21513
21604
|
* Copyright (C) 2019 Toshiba Corporation
|
|
21514
21605
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -21518,11 +21609,7 @@
|
|
|
21518
21609
|
this._id = "font-atlas:".concat(fontFamily);
|
|
21519
21610
|
this._generator = DynamicSDFFontGenerator.getInstance().init();
|
|
21520
21611
|
this._canvas = document.createElement("canvas");
|
|
21521
|
-
this._font =
|
|
21522
|
-
family: DynamicSDFFontAtlas.toFontFamily(fontFamily),
|
|
21523
|
-
size: 32,
|
|
21524
|
-
italic: false
|
|
21525
|
-
};
|
|
21612
|
+
this._font = new DynamicSDFFontAtlasFont(fontFamily);
|
|
21526
21613
|
this._characters = {};
|
|
21527
21614
|
this._length = 0;
|
|
21528
21615
|
this._width = 1;
|
|
@@ -21541,7 +21628,7 @@
|
|
|
21541
21628
|
return this._font;
|
|
21542
21629
|
},
|
|
21543
21630
|
set: function (font) {
|
|
21544
|
-
this._font.
|
|
21631
|
+
this._font.id = font.id;
|
|
21545
21632
|
this._font.size = font.size;
|
|
21546
21633
|
this._font.italic = font.italic;
|
|
21547
21634
|
},
|
|
@@ -21666,19 +21753,20 @@
|
|
|
21666
21753
|
var font = this._font;
|
|
21667
21754
|
var characters = this._characters;
|
|
21668
21755
|
var characterSize = font.size + 14;
|
|
21669
|
-
var width =
|
|
21756
|
+
var width = this.toPowerOf2(Math.ceil(Math.sqrt(this._length)) * characterSize);
|
|
21670
21757
|
this._width = width;
|
|
21671
|
-
var fontStyle = (font.italic ? "italic " : "") + (font.size + "px ") + font.
|
|
21758
|
+
var fontStyle = (font.italic ? "italic " : "") + (font.size + "px ") + font.id;
|
|
21672
21759
|
context.font = fontStyle;
|
|
21673
21760
|
context.textAlign = "left";
|
|
21674
|
-
context.textBaseline = "
|
|
21761
|
+
context.textBaseline = "alphabetic";
|
|
21675
21762
|
context.lineWidth = 0;
|
|
21676
21763
|
context.lineCap = "round";
|
|
21677
21764
|
context.lineJoin = "miter";
|
|
21678
|
-
context.miterLimit =
|
|
21765
|
+
context.miterLimit = 10;
|
|
21679
21766
|
context.fillStyle = "#FFFFFF";
|
|
21767
|
+
UtilFont.measure(context, font);
|
|
21680
21768
|
var offsetX = 7;
|
|
21681
|
-
var offsetY = characterSize
|
|
21769
|
+
var offsetY = Math.round((characterSize - (font.ascent + font.descent)) * 0.5 + font.ascent);
|
|
21682
21770
|
var x = 0;
|
|
21683
21771
|
var y = 0;
|
|
21684
21772
|
for (var id in characters) {
|
|
@@ -21707,11 +21795,11 @@
|
|
|
21707
21795
|
canvas.height = height;
|
|
21708
21796
|
context.font = fontStyle;
|
|
21709
21797
|
context.textAlign = "left";
|
|
21710
|
-
context.textBaseline = "
|
|
21798
|
+
context.textBaseline = "alphabetic";
|
|
21711
21799
|
context.lineWidth = 0;
|
|
21712
21800
|
context.lineCap = "round";
|
|
21713
21801
|
context.lineJoin = "miter";
|
|
21714
|
-
context.miterLimit =
|
|
21802
|
+
context.miterLimit = 10;
|
|
21715
21803
|
context.fillStyle = "#FFFFFF";
|
|
21716
21804
|
context.clearRect(0, 0, width, height);
|
|
21717
21805
|
for (var id in characters) {
|
|
@@ -21760,25 +21848,13 @@
|
|
|
21760
21848
|
delete characters[id];
|
|
21761
21849
|
}
|
|
21762
21850
|
};
|
|
21763
|
-
DynamicSDFFontAtlas.
|
|
21764
|
-
return fontFamily === "auto" ? DynamicSDFFontAtlas.getAutoFontFamily() : fontFamily;
|
|
21765
|
-
};
|
|
21766
|
-
DynamicSDFFontAtlas.toPowerOf2 = function (size) {
|
|
21851
|
+
DynamicSDFFontAtlas.prototype.toPowerOf2 = function (size) {
|
|
21767
21852
|
var result = 32;
|
|
21768
21853
|
while (result < size) {
|
|
21769
21854
|
result <<= 1;
|
|
21770
21855
|
}
|
|
21771
21856
|
return result;
|
|
21772
21857
|
};
|
|
21773
|
-
DynamicSDFFontAtlas.getAutoFontFamily = function () {
|
|
21774
|
-
if (DynamicSDFFontAtlas.FONT_FAMILY_AUTO == null) {
|
|
21775
|
-
DynamicSDFFontAtlas.FONT_FAMILY_AUTO = DThemes.getInstance()
|
|
21776
|
-
.get("DBase")
|
|
21777
|
-
.getFontFamilly();
|
|
21778
|
-
}
|
|
21779
|
-
return DynamicSDFFontAtlas.FONT_FAMILY_AUTO;
|
|
21780
|
-
};
|
|
21781
|
-
DynamicSDFFontAtlas.FONT_FAMILY_AUTO = null;
|
|
21782
21858
|
return DynamicSDFFontAtlas;
|
|
21783
21859
|
}());
|
|
21784
21860
|
|
|
@@ -29123,77 +29199,6 @@
|
|
|
29123
29199
|
return DDynamicTextGeometry;
|
|
29124
29200
|
}(pixi_js.MeshGeometry));
|
|
29125
29201
|
|
|
29126
|
-
/*
|
|
29127
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
29128
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
29129
|
-
*/
|
|
29130
|
-
var UtilFont = /** @class */ (function () {
|
|
29131
|
-
function UtilFont() {
|
|
29132
|
-
}
|
|
29133
|
-
UtilFont.measure = function (font) {
|
|
29134
|
-
var results = this._results;
|
|
29135
|
-
if (results == null) {
|
|
29136
|
-
results = new Map();
|
|
29137
|
-
this._results = results;
|
|
29138
|
-
}
|
|
29139
|
-
var result = results.get(font);
|
|
29140
|
-
if (result != null) {
|
|
29141
|
-
return result;
|
|
29142
|
-
}
|
|
29143
|
-
this.setup(font);
|
|
29144
|
-
var blockRect = this._block.getBoundingClientRect();
|
|
29145
|
-
var blockRectTop = blockRect.top;
|
|
29146
|
-
var spanRect = this._span.getBoundingClientRect();
|
|
29147
|
-
var ascent = blockRectTop - spanRect.top;
|
|
29148
|
-
var descent = spanRect.bottom - blockRectTop;
|
|
29149
|
-
result = {
|
|
29150
|
-
ascent: ascent,
|
|
29151
|
-
descent: descent
|
|
29152
|
-
};
|
|
29153
|
-
results.set(font, result);
|
|
29154
|
-
return result;
|
|
29155
|
-
};
|
|
29156
|
-
UtilFont.toSize = function (font) {
|
|
29157
|
-
this.setup(font);
|
|
29158
|
-
return parseFloat(window.getComputedStyle(this._span).fontSize);
|
|
29159
|
-
};
|
|
29160
|
-
UtilFont.setup = function (font) {
|
|
29161
|
-
var span = this._span;
|
|
29162
|
-
if (span == null) {
|
|
29163
|
-
span = document.createElement("span");
|
|
29164
|
-
span.innerText = "|ÉqÅ";
|
|
29165
|
-
span.style.border = "none";
|
|
29166
|
-
span.style.margin = "0px";
|
|
29167
|
-
this._span = span;
|
|
29168
|
-
}
|
|
29169
|
-
var block = this._block;
|
|
29170
|
-
if (block == null) {
|
|
29171
|
-
block = document.createElement("div");
|
|
29172
|
-
block.style.display = "inline-block";
|
|
29173
|
-
block.style.width = "0px";
|
|
29174
|
-
block.style.height = "0px";
|
|
29175
|
-
block.style.border = "none";
|
|
29176
|
-
block.style.margin = "0px";
|
|
29177
|
-
block.style.verticalAlign = "baseline";
|
|
29178
|
-
this._block = block;
|
|
29179
|
-
}
|
|
29180
|
-
var div = this._div;
|
|
29181
|
-
if (div == null) {
|
|
29182
|
-
div = document.createElement("div");
|
|
29183
|
-
div.style.position = "absolute";
|
|
29184
|
-
div.style.padding = "0px";
|
|
29185
|
-
div.style.margin = "0px";
|
|
29186
|
-
div.style.visibility = "hidden";
|
|
29187
|
-
div.appendChild(span);
|
|
29188
|
-
div.appendChild(block);
|
|
29189
|
-
document.body.appendChild(div);
|
|
29190
|
-
this._div = div;
|
|
29191
|
-
}
|
|
29192
|
-
span.style.font = font;
|
|
29193
|
-
};
|
|
29194
|
-
return UtilFont;
|
|
29195
|
-
}());
|
|
29196
|
-
|
|
29197
29202
|
/*
|
|
29198
29203
|
* Copyright (C) 2019 Toshiba Corporation
|
|
29199
29204
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -48225,9 +48230,9 @@
|
|
|
48225
48230
|
this.size = size;
|
|
48226
48231
|
this.color = pixi_js.utils.hex2string(color);
|
|
48227
48232
|
this.height = size + padding * 2;
|
|
48228
|
-
|
|
48229
|
-
this.ascent =
|
|
48230
|
-
this.descent =
|
|
48233
|
+
this.measured = false;
|
|
48234
|
+
this.ascent = 0;
|
|
48235
|
+
this.descent = 0;
|
|
48231
48236
|
}
|
|
48232
48237
|
return DynamicFontAtlasFont;
|
|
48233
48238
|
}());
|
|
@@ -48428,7 +48433,7 @@
|
|
|
48428
48433
|
context.lineWidth = 0;
|
|
48429
48434
|
context.lineCap = "round";
|
|
48430
48435
|
context.lineJoin = "miter";
|
|
48431
|
-
context.miterLimit =
|
|
48436
|
+
context.miterLimit = 10;
|
|
48432
48437
|
context.fillStyle = font.color;
|
|
48433
48438
|
context.strokeStyle = "#0000ff";
|
|
48434
48439
|
}
|
|
@@ -48445,7 +48450,6 @@
|
|
|
48445
48450
|
var characters = this._characters;
|
|
48446
48451
|
var width = (this._width = this.toPowerOf2(Math.ceil(Math.sqrt(this._length)) * fontHeight));
|
|
48447
48452
|
var offsetX = this._padding;
|
|
48448
|
-
var offsetY = Math.round((fontHeight - (font.ascent + font.descent)) * 0.5 + font.ascent);
|
|
48449
48453
|
var x = 0;
|
|
48450
48454
|
var y = 0;
|
|
48451
48455
|
for (var key in characters) {
|
|
@@ -48457,7 +48461,6 @@
|
|
|
48457
48461
|
character.x = x;
|
|
48458
48462
|
character.y = y;
|
|
48459
48463
|
character.origin.x = x + offsetX;
|
|
48460
|
-
character.origin.y = y + offsetY;
|
|
48461
48464
|
x += character.width;
|
|
48462
48465
|
}
|
|
48463
48466
|
var height = (this._height = y + fontHeight);
|
|
@@ -48472,11 +48475,14 @@
|
|
|
48472
48475
|
canvas.height = realHeight;
|
|
48473
48476
|
var context = this.getContext();
|
|
48474
48477
|
if (context != null) {
|
|
48478
|
+
UtilFont.measure(context, font);
|
|
48479
|
+
var offsetY = Math.round((fontHeight - (font.ascent + font.descent)) * 0.5 + font.ascent);
|
|
48475
48480
|
context.save();
|
|
48476
48481
|
context.scale(resolution, resolution);
|
|
48477
48482
|
context.clearRect(0, 0, width, height);
|
|
48478
48483
|
for (var key in characters) {
|
|
48479
48484
|
var character = characters[key];
|
|
48485
|
+
character.origin.y = character.y + offsetY;
|
|
48480
48486
|
context.fillText(key, character.origin.x, character.origin.y);
|
|
48481
48487
|
}
|
|
48482
48488
|
context.restore();
|
|
@@ -57656,28 +57662,32 @@
|
|
|
57656
57662
|
var index = this._index;
|
|
57657
57663
|
var shape = this._shape;
|
|
57658
57664
|
if (shape != null && container != null) {
|
|
57665
|
+
var parser = this._parser;
|
|
57659
57666
|
var plotArea = container.plotArea;
|
|
57660
|
-
var
|
|
57661
|
-
var
|
|
57662
|
-
var
|
|
57667
|
+
var plotAreaBounds = plotArea.getAxisBounds(parser.position);
|
|
57668
|
+
var plotAreaX = plotAreaBounds.x;
|
|
57669
|
+
var plotAreaY = plotAreaBounds.y;
|
|
57670
|
+
var plotAreaWidth = plotAreaBounds.width;
|
|
57671
|
+
var plotAreaHeight = plotAreaBounds.height;
|
|
57672
|
+
var offset = parser.padding * index;
|
|
57663
57673
|
shape.lock(EShapeLockPart.UPLOADED);
|
|
57664
57674
|
var position = shape.transform.position;
|
|
57665
57675
|
var size = shape.size;
|
|
57666
|
-
switch (
|
|
57676
|
+
switch (parser.position) {
|
|
57667
57677
|
case DChartAxisPosition.TOP:
|
|
57668
|
-
position.set(plotAreaWidth * 0.5,
|
|
57678
|
+
position.set(plotAreaX + plotAreaWidth * 0.5, plotAreaY - offset);
|
|
57669
57679
|
size.set(plotAreaWidth, 0);
|
|
57670
57680
|
break;
|
|
57671
57681
|
case DChartAxisPosition.BOTTOM:
|
|
57672
|
-
position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
|
|
57682
|
+
position.set(plotAreaX + plotAreaWidth * 0.5, plotAreaY + plotAreaHeight + offset);
|
|
57673
57683
|
size.set(plotAreaWidth, 0);
|
|
57674
57684
|
break;
|
|
57675
57685
|
case DChartAxisPosition.LEFT:
|
|
57676
|
-
position.set(
|
|
57686
|
+
position.set(plotAreaX - offset, plotAreaY + plotAreaHeight * 0.5);
|
|
57677
57687
|
size.set(0, plotAreaHeight);
|
|
57678
57688
|
break;
|
|
57679
57689
|
case DChartAxisPosition.RIGHT:
|
|
57680
|
-
position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
|
|
57690
|
+
position.set(plotAreaX + plotAreaWidth + offset, plotAreaY + plotAreaHeight * 0.5);
|
|
57681
57691
|
size.set(0, plotAreaHeight);
|
|
57682
57692
|
break;
|
|
57683
57693
|
}
|
|
@@ -57689,6 +57699,7 @@
|
|
|
57689
57699
|
DChartAxisBaseBar.prototype.destroy = function () {
|
|
57690
57700
|
var shape = this._shape;
|
|
57691
57701
|
if (shape != null) {
|
|
57702
|
+
this._shape = undefined;
|
|
57692
57703
|
shape.destroy();
|
|
57693
57704
|
}
|
|
57694
57705
|
this._index = 0;
|
|
@@ -57765,6 +57776,7 @@
|
|
|
57765
57776
|
for (var i = 0, imax = list.length; i < imax; ++i) {
|
|
57766
57777
|
list[i].destroy();
|
|
57767
57778
|
}
|
|
57779
|
+
list.length = 0;
|
|
57768
57780
|
this._index = 0;
|
|
57769
57781
|
this._container = undefined;
|
|
57770
57782
|
};
|
|
@@ -58240,12 +58252,8 @@
|
|
|
58240
58252
|
}
|
|
58241
58253
|
Object.defineProperty(DChartAxisBaseTickMajorGridline.prototype, "shapes", {
|
|
58242
58254
|
get: function () {
|
|
58243
|
-
var
|
|
58244
|
-
|
|
58245
|
-
result = this.newShapes();
|
|
58246
|
-
this._shapes = result;
|
|
58247
|
-
}
|
|
58248
|
-
return result;
|
|
58255
|
+
var _a;
|
|
58256
|
+
return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
|
|
58249
58257
|
},
|
|
58250
58258
|
enumerable: false,
|
|
58251
58259
|
configurable: true
|
|
@@ -58304,6 +58312,8 @@
|
|
|
58304
58312
|
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
58305
58313
|
shapes[i].destroy();
|
|
58306
58314
|
}
|
|
58315
|
+
shapes.length = 0;
|
|
58316
|
+
this._shapes = undefined;
|
|
58307
58317
|
}
|
|
58308
58318
|
this._index = 0;
|
|
58309
58319
|
this._container = undefined;
|
|
@@ -58319,12 +58329,8 @@
|
|
|
58319
58329
|
}
|
|
58320
58330
|
Object.defineProperty(DChartAxisBaseTickMajor.prototype, "shapes", {
|
|
58321
58331
|
get: function () {
|
|
58322
|
-
var
|
|
58323
|
-
|
|
58324
|
-
result = this.newShapes();
|
|
58325
|
-
this._shapes = result;
|
|
58326
|
-
}
|
|
58327
|
-
return result;
|
|
58332
|
+
var _a;
|
|
58333
|
+
return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
|
|
58328
58334
|
},
|
|
58329
58335
|
enumerable: false,
|
|
58330
58336
|
configurable: true
|
|
@@ -58388,6 +58394,8 @@
|
|
|
58388
58394
|
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
58389
58395
|
shapes[i].destroy();
|
|
58390
58396
|
}
|
|
58397
|
+
shapes.length = 0;
|
|
58398
|
+
this._shapes = undefined;
|
|
58391
58399
|
}
|
|
58392
58400
|
this._gridline.destroy();
|
|
58393
58401
|
this._index = 0;
|
|
@@ -58403,12 +58411,8 @@
|
|
|
58403
58411
|
}
|
|
58404
58412
|
Object.defineProperty(DChartAxisBaseTickMinor.prototype, "shapes", {
|
|
58405
58413
|
get: function () {
|
|
58406
|
-
var
|
|
58407
|
-
|
|
58408
|
-
result = this.newShapes();
|
|
58409
|
-
this._shapes = result;
|
|
58410
|
-
}
|
|
58411
|
-
return result;
|
|
58414
|
+
var _a;
|
|
58415
|
+
return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
|
|
58412
58416
|
},
|
|
58413
58417
|
enumerable: false,
|
|
58414
58418
|
configurable: true
|
|
@@ -58462,6 +58466,8 @@
|
|
|
58462
58466
|
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
58463
58467
|
shapes[i].destroy();
|
|
58464
58468
|
}
|
|
58469
|
+
shapes.length = 0;
|
|
58470
|
+
this._shapes = undefined;
|
|
58465
58471
|
}
|
|
58466
58472
|
this._index = 0;
|
|
58467
58473
|
this._container = undefined;
|
|
@@ -58553,6 +58559,11 @@
|
|
|
58553
58559
|
var minorShapes = this._minor.shapes;
|
|
58554
58560
|
if (parser.tick.enable && container != null && majorShapes && minorShapes) {
|
|
58555
58561
|
var plotArea = container.plotArea;
|
|
58562
|
+
var plotAreaBounds = plotArea.getAxisBounds(parser.position);
|
|
58563
|
+
var plotAreaX = plotAreaBounds.x;
|
|
58564
|
+
var plotAreaY = plotAreaBounds.y;
|
|
58565
|
+
var plotAreaWidth = plotAreaBounds.width;
|
|
58566
|
+
var plotAreaHeight = plotAreaBounds.height;
|
|
58556
58567
|
var transform = plotArea.container.transform.localTransform;
|
|
58557
58568
|
var gridlineShapes = this._major.gridline.shapes;
|
|
58558
58569
|
var offset = parser.padding * this._index;
|
|
@@ -58568,8 +58579,7 @@
|
|
|
58568
58579
|
var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
|
|
58569
58580
|
var domainVisibleFrom = domainVisible.from;
|
|
58570
58581
|
var domainVisibleTo = domainVisible.to;
|
|
58571
|
-
|
|
58572
|
-
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaHeight);
|
|
58582
|
+
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaY - offset, transform, plotAreaY, plotAreaHeight);
|
|
58573
58583
|
}
|
|
58574
58584
|
break;
|
|
58575
58585
|
case DChartAxisPosition.BOTTOM:
|
|
@@ -58581,8 +58591,7 @@
|
|
|
58581
58591
|
var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
|
|
58582
58592
|
var domainVisibleFrom = domainVisible.from;
|
|
58583
58593
|
var domainVisibleTo = domainVisible.to;
|
|
58584
|
-
|
|
58585
|
-
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + offset, transform, plotAreaHeight);
|
|
58594
|
+
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaY + plotAreaHeight + offset, transform, plotAreaY, plotAreaHeight);
|
|
58586
58595
|
}
|
|
58587
58596
|
break;
|
|
58588
58597
|
case DChartAxisPosition.LEFT:
|
|
@@ -58594,8 +58603,7 @@
|
|
|
58594
58603
|
var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
|
|
58595
58604
|
var rangeVisibleFrom = rangeVisible.from;
|
|
58596
58605
|
var rangeVisibleTo = rangeVisible.to;
|
|
58597
|
-
|
|
58598
|
-
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaWidth);
|
|
58606
|
+
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaX - offset, transform, plotAreaX, plotAreaWidth);
|
|
58599
58607
|
}
|
|
58600
58608
|
break;
|
|
58601
58609
|
case DChartAxisPosition.RIGHT:
|
|
@@ -58607,8 +58615,7 @@
|
|
|
58607
58615
|
var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
|
|
58608
58616
|
var rangeVisibleFrom = rangeVisible.from;
|
|
58609
58617
|
var rangeVisibleTo = rangeVisible.to;
|
|
58610
|
-
|
|
58611
|
-
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaWidth + offset, transform, plotAreaWidth);
|
|
58618
|
+
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaX + plotAreaWidth + offset, transform, plotAreaX, plotAreaWidth);
|
|
58612
58619
|
}
|
|
58613
58620
|
break;
|
|
58614
58621
|
}
|
|
@@ -58616,7 +58623,7 @@
|
|
|
58616
58623
|
return false;
|
|
58617
58624
|
};
|
|
58618
58625
|
DChartAxisBaseTickContainer.prototype.getDomain = function (plotArea, coordinate, result) {
|
|
58619
|
-
var bounds = plotArea.
|
|
58626
|
+
var bounds = plotArea.getContainerBounds();
|
|
58620
58627
|
var transform = coordinate.transform;
|
|
58621
58628
|
return result.set(coordinate.unmap(transform.unmap(bounds.x)), coordinate.unmap(transform.unmap(bounds.x + bounds.width)));
|
|
58622
58629
|
};
|
|
@@ -58624,14 +58631,14 @@
|
|
|
58624
58631
|
return result;
|
|
58625
58632
|
};
|
|
58626
58633
|
DChartAxisBaseTickContainer.prototype.getRange = function (plotArea, coordinate, result) {
|
|
58627
|
-
var bounds = plotArea.
|
|
58634
|
+
var bounds = plotArea.getContainerBounds();
|
|
58628
58635
|
var transform = coordinate.transform;
|
|
58629
58636
|
return result.set(coordinate.unmap(transform.unmap(bounds.y)), coordinate.unmap(transform.unmap(bounds.y + bounds.height)));
|
|
58630
58637
|
};
|
|
58631
58638
|
DChartAxisBaseTickContainer.prototype.getRangeVisible = function (plotArea, coordinate, result) {
|
|
58632
58639
|
return result;
|
|
58633
58640
|
};
|
|
58634
|
-
DChartAxisBaseTickContainer.prototype.updateX = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionY, transform, plotAreaHeight) {
|
|
58641
|
+
DChartAxisBaseTickContainer.prototype.updateX = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionY, transform, plotAreaY, plotAreaHeight) {
|
|
58635
58642
|
var tick = this._parser.tick;
|
|
58636
58643
|
var majorTick = tick.major;
|
|
58637
58644
|
var majorCount = majorTick.count;
|
|
@@ -58658,7 +58665,7 @@
|
|
|
58658
58665
|
var majorTickStep = majorTicks[imajorTick + 2];
|
|
58659
58666
|
this.showMajor(majorShape, majotTickPositionX, shapePositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
|
|
58660
58667
|
if (i < gridlineShapes.length) {
|
|
58661
|
-
this.showMajorGridline(gridlineShapes[i], majorTickPosition, majotTickPositionX, plotAreaHeight * 0.5, 0, plotAreaHeight);
|
|
58668
|
+
this.showMajorGridline(gridlineShapes[i], majorTickPosition, majotTickPositionX, plotAreaY + plotAreaHeight * 0.5, 0, plotAreaHeight);
|
|
58662
58669
|
}
|
|
58663
58670
|
}
|
|
58664
58671
|
else {
|
|
@@ -58684,7 +58691,7 @@
|
|
|
58684
58691
|
}
|
|
58685
58692
|
return true;
|
|
58686
58693
|
};
|
|
58687
|
-
DChartAxisBaseTickContainer.prototype.updateY = function (rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaWidth) {
|
|
58694
|
+
DChartAxisBaseTickContainer.prototype.updateY = function (rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaX, plotAreaWidth) {
|
|
58688
58695
|
var tick = this._parser.tick;
|
|
58689
58696
|
var majorTick = tick.major;
|
|
58690
58697
|
var majorCount = majorTick.count;
|
|
@@ -58711,7 +58718,7 @@
|
|
|
58711
58718
|
var majorTickStep = majorTicks[imajorTick + 2];
|
|
58712
58719
|
this.showMajor(majorShape, shapePositionX, majotTickPositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
|
|
58713
58720
|
if (i < gridlineShapes.length) {
|
|
58714
|
-
this.showMajorGridline(gridlineShapes[i], majorTickPosition, plotAreaWidth * 0.5, majotTickPositionY, plotAreaWidth, 0);
|
|
58721
|
+
this.showMajorGridline(gridlineShapes[i], majorTickPosition, plotAreaX + plotAreaWidth * 0.5, majotTickPositionY, plotAreaWidth, 0);
|
|
58715
58722
|
}
|
|
58716
58723
|
}
|
|
58717
58724
|
else {
|
|
@@ -58916,9 +58923,9 @@
|
|
|
58916
58923
|
* SPDX-License-Identifier: Apache-2.0
|
|
58917
58924
|
*/
|
|
58918
58925
|
var DChartAxisContainerImpl = /** @class */ (function () {
|
|
58919
|
-
function DChartAxisContainerImpl(plotArea, options) {
|
|
58926
|
+
function DChartAxisContainerImpl(plotArea, container, options) {
|
|
58920
58927
|
this._plotArea = plotArea;
|
|
58921
|
-
this._container =
|
|
58928
|
+
this._container = container;
|
|
58922
58929
|
this._list = new Map();
|
|
58923
58930
|
}
|
|
58924
58931
|
Object.defineProperty(DChartAxisContainerImpl.prototype, "container", {
|
|
@@ -59393,9 +59400,12 @@
|
|
|
59393
59400
|
var axis = this._axis;
|
|
59394
59401
|
if (shape != null && container != null && axis != null) {
|
|
59395
59402
|
var plotArea = container.plotArea;
|
|
59403
|
+
var plotAreaBounds = plotArea.getAxisBounds(axis.position);
|
|
59404
|
+
var plotAreaX = plotAreaBounds.x;
|
|
59405
|
+
var plotAreaY = plotAreaBounds.y;
|
|
59406
|
+
var plotAreaWidth = plotAreaBounds.width;
|
|
59407
|
+
var plotAreaHeight = plotAreaBounds.height;
|
|
59396
59408
|
var transform = plotArea.container.transform.localTransform;
|
|
59397
|
-
var plotAreaWidth = plotArea.width;
|
|
59398
|
-
var plotAreaHeight = plotArea.height;
|
|
59399
59409
|
var offset = axis.padding * index;
|
|
59400
59410
|
switch (axis.position) {
|
|
59401
59411
|
case DChartAxisPosition.TOP:
|
|
@@ -59406,10 +59416,10 @@
|
|
|
59406
59416
|
work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
|
|
59407
59417
|
transform.apply(work, work);
|
|
59408
59418
|
var x = work.x;
|
|
59409
|
-
shape.update(axis.position, x, plotAreaHeight * 0.5, this._isShown &&
|
|
59419
|
+
shape.update(axis.position, x, plotAreaY + plotAreaHeight * 0.5, this._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
|
|
59410
59420
|
}
|
|
59411
59421
|
else {
|
|
59412
|
-
shape.update(axis.position,
|
|
59422
|
+
shape.update(axis.position, plotAreaX, plotAreaY + plotAreaHeight * 0.5, false, plotAreaWidth, plotAreaHeight, offset);
|
|
59413
59423
|
}
|
|
59414
59424
|
break;
|
|
59415
59425
|
case DChartAxisPosition.LEFT:
|
|
@@ -59420,10 +59430,10 @@
|
|
|
59420
59430
|
work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
|
|
59421
59431
|
transform.apply(work, work);
|
|
59422
59432
|
var y = work.y;
|
|
59423
|
-
shape.update(axis.position, plotAreaWidth * 0.5, y, this._isShown &&
|
|
59433
|
+
shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, y, this._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
|
|
59424
59434
|
}
|
|
59425
59435
|
else {
|
|
59426
|
-
shape.update(axis.position, plotAreaWidth * 0.5,
|
|
59436
|
+
shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, plotAreaY, false, plotAreaWidth, plotAreaHeight, offset);
|
|
59427
59437
|
}
|
|
59428
59438
|
break;
|
|
59429
59439
|
}
|
|
@@ -59723,24 +59733,16 @@
|
|
|
59723
59733
|
var work = this._work;
|
|
59724
59734
|
switch (this._direction) {
|
|
59725
59735
|
case DChartCoordinateDirection.X:
|
|
59726
|
-
|
|
59736
|
+
plotArea.getPixelDomain(work);
|
|
59727
59737
|
this.doFit_(work.from, work.to, this.toFitDomain(from, to, plotArea, work), result);
|
|
59728
59738
|
break;
|
|
59729
59739
|
case DChartCoordinateDirection.Y:
|
|
59730
|
-
|
|
59740
|
+
plotArea.getPixelRange(work);
|
|
59731
59741
|
this.doFit_(work.from, work.to, this.toFitRange(from, to, plotArea, work), result);
|
|
59732
59742
|
break;
|
|
59733
59743
|
}
|
|
59734
59744
|
}
|
|
59735
59745
|
};
|
|
59736
|
-
DChartCoordinateBase.prototype.getPixelDomain = function (plotArea, result) {
|
|
59737
|
-
var padding = plotArea.padding;
|
|
59738
|
-
return result.set(padding.getLeft(), plotArea.width - padding.getRight());
|
|
59739
|
-
};
|
|
59740
|
-
DChartCoordinateBase.prototype.getPixelRange = function (plotArea, result) {
|
|
59741
|
-
var padding = plotArea.padding;
|
|
59742
|
-
return result.set(plotArea.height - padding.getBottom(), padding.getTop());
|
|
59743
|
-
};
|
|
59744
59746
|
DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
59745
59747
|
if (from == null) {
|
|
59746
59748
|
from = this._from;
|
|
@@ -60373,6 +60375,119 @@
|
|
|
60373
60375
|
return DChartOverview;
|
|
60374
60376
|
}(DBase));
|
|
60375
60377
|
|
|
60378
|
+
/*
|
|
60379
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
60380
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
60381
|
+
*/
|
|
60382
|
+
var DChartPlotAreaBase = /** @class */ (function (_super) {
|
|
60383
|
+
__extends(DChartPlotAreaBase, _super);
|
|
60384
|
+
function DChartPlotAreaBase(chart, options) {
|
|
60385
|
+
var _this = _super.call(this, options) || this;
|
|
60386
|
+
_this._isContainerBoundsDirty = true;
|
|
60387
|
+
_this._containerBounds = new pixi_js.Rectangle();
|
|
60388
|
+
_this._workPoint = new pixi_js.Point();
|
|
60389
|
+
_this._pixelBounds = new pixi_js.Rectangle();
|
|
60390
|
+
_this._chart = chart;
|
|
60391
|
+
_this._blendStartTime = 0;
|
|
60392
|
+
_this._blendDuration = 1000;
|
|
60393
|
+
_this._blendTimeout = null;
|
|
60394
|
+
_this._onBlendBound = function () {
|
|
60395
|
+
_this.onBlend();
|
|
60396
|
+
};
|
|
60397
|
+
_this._isViewDirty = true;
|
|
60398
|
+
_this._view = _this.newView(options);
|
|
60399
|
+
return _this;
|
|
60400
|
+
}
|
|
60401
|
+
DChartPlotAreaBase.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
|
|
60402
|
+
this._isViewDirty = true;
|
|
60403
|
+
this._isContainerBoundsDirty = true;
|
|
60404
|
+
_super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
|
|
60405
|
+
};
|
|
60406
|
+
Object.defineProperty(DChartPlotAreaBase.prototype, "chart", {
|
|
60407
|
+
get: function () {
|
|
60408
|
+
return this._chart;
|
|
60409
|
+
},
|
|
60410
|
+
enumerable: false,
|
|
60411
|
+
configurable: true
|
|
60412
|
+
});
|
|
60413
|
+
Object.defineProperty(DChartPlotAreaBase.prototype, "view", {
|
|
60414
|
+
get: function () {
|
|
60415
|
+
return this._view;
|
|
60416
|
+
},
|
|
60417
|
+
enumerable: false,
|
|
60418
|
+
configurable: true
|
|
60419
|
+
});
|
|
60420
|
+
DChartPlotAreaBase.prototype.onWheel = function (e, deltas, global) {
|
|
60421
|
+
var vresult = this._view.onWheel(e, deltas, global);
|
|
60422
|
+
var sresult = _super.prototype.onWheel.call(this, e, deltas, global);
|
|
60423
|
+
return vresult || sresult;
|
|
60424
|
+
};
|
|
60425
|
+
DChartPlotAreaBase.prototype.onDblClick = function (e, interactionManager) {
|
|
60426
|
+
var vresult = this._view.onDblClick(e, interactionManager);
|
|
60427
|
+
var sresult = _super.prototype.onDblClick.call(this, e, interactionManager);
|
|
60428
|
+
return vresult || sresult;
|
|
60429
|
+
};
|
|
60430
|
+
DChartPlotAreaBase.prototype.onDown = function (e) {
|
|
60431
|
+
this._view.onDown(e);
|
|
60432
|
+
_super.prototype.onDown.call(this, e);
|
|
60433
|
+
};
|
|
60434
|
+
DChartPlotAreaBase.prototype.render = function (renderer) {
|
|
60435
|
+
if (this._isViewDirty) {
|
|
60436
|
+
this._isViewDirty = false;
|
|
60437
|
+
this.onViewDirty();
|
|
60438
|
+
}
|
|
60439
|
+
_super.prototype.render.call(this, renderer);
|
|
60440
|
+
};
|
|
60441
|
+
DChartPlotAreaBase.prototype.getPixelDomain = function (result) {
|
|
60442
|
+
var padding = this.padding;
|
|
60443
|
+
return result.set(padding.getLeft(), this.width - padding.getRight());
|
|
60444
|
+
};
|
|
60445
|
+
DChartPlotAreaBase.prototype.getPixelRange = function (result) {
|
|
60446
|
+
var padding = this.padding;
|
|
60447
|
+
return result.set(this.height - padding.getBottom(), padding.getTop());
|
|
60448
|
+
};
|
|
60449
|
+
DChartPlotAreaBase.prototype.getPixelBounds = function () {
|
|
60450
|
+
var result = this._pixelBounds;
|
|
60451
|
+
result.x = 0;
|
|
60452
|
+
result.y = 0;
|
|
60453
|
+
result.width = this.width;
|
|
60454
|
+
result.height = this.height;
|
|
60455
|
+
return result;
|
|
60456
|
+
};
|
|
60457
|
+
DChartPlotAreaBase.prototype.getAxisBounds = function (position) {
|
|
60458
|
+
return this.getPixelBounds();
|
|
60459
|
+
};
|
|
60460
|
+
DChartPlotAreaBase.prototype.getSelectionBoundsX = function () {
|
|
60461
|
+
return this.getPixelBounds();
|
|
60462
|
+
};
|
|
60463
|
+
DChartPlotAreaBase.prototype.getSelectionBoundsY = function () {
|
|
60464
|
+
return this.getPixelBounds();
|
|
60465
|
+
};
|
|
60466
|
+
DChartPlotAreaBase.prototype.getContainerBounds = function () {
|
|
60467
|
+
var result = this._containerBounds;
|
|
60468
|
+
if (this._isContainerBoundsDirty) {
|
|
60469
|
+
this._isContainerBoundsDirty = false;
|
|
60470
|
+
var container = this.container;
|
|
60471
|
+
container.updateTransform();
|
|
60472
|
+
var transform = container.transform.localTransform;
|
|
60473
|
+
var work = this._workPoint;
|
|
60474
|
+
work.set(0, 0);
|
|
60475
|
+
transform.applyInverse(work, work);
|
|
60476
|
+
result.x = work.x;
|
|
60477
|
+
result.y = work.y;
|
|
60478
|
+
work.set(this.width, this.height);
|
|
60479
|
+
transform.applyInverse(work, work);
|
|
60480
|
+
result.width = work.x - result.x;
|
|
60481
|
+
result.height = work.y - result.y;
|
|
60482
|
+
}
|
|
60483
|
+
return result;
|
|
60484
|
+
};
|
|
60485
|
+
DChartPlotAreaBase.prototype.getType = function () {
|
|
60486
|
+
return "DChartPlotArea";
|
|
60487
|
+
};
|
|
60488
|
+
return DChartPlotAreaBase;
|
|
60489
|
+
}(DBase));
|
|
60490
|
+
|
|
60376
60491
|
/*
|
|
60377
60492
|
* Copyright (C) 2019 Toshiba Corporation
|
|
60378
60493
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -60649,11 +60764,10 @@
|
|
|
60649
60764
|
*/
|
|
60650
60765
|
var DChartSeriesContainerImpl = /** @class */ (function () {
|
|
60651
60766
|
function DChartSeriesContainerImpl(plotArea, options) {
|
|
60652
|
-
var _a;
|
|
60653
60767
|
this._plotArea = plotArea;
|
|
60654
60768
|
this._domain = new DChartRegionImpl(NaN, NaN);
|
|
60655
60769
|
this._range = new DChartRegionImpl(NaN, NaN);
|
|
60656
|
-
this._selection =
|
|
60770
|
+
this._selection = null;
|
|
60657
60771
|
this._fill = new DChartSeriesFillImpl(options === null || options === void 0 ? void 0 : options.fill);
|
|
60658
60772
|
this._stroke = new DChartSeriesStrokeImpl(options === null || options === void 0 ? void 0 : options.stroke);
|
|
60659
60773
|
this._size = new DChartSeriesPointImpl(options === null || options === void 0 ? void 0 : options.size);
|
|
@@ -60687,6 +60801,9 @@
|
|
|
60687
60801
|
get: function () {
|
|
60688
60802
|
return this._selection;
|
|
60689
60803
|
},
|
|
60804
|
+
set: function (selection) {
|
|
60805
|
+
this._selection = selection;
|
|
60806
|
+
},
|
|
60690
60807
|
enumerable: false,
|
|
60691
60808
|
configurable: true
|
|
60692
60809
|
});
|
|
@@ -60835,90 +60952,51 @@
|
|
|
60835
60952
|
* Copyright (C) 2019 Toshiba Corporation
|
|
60836
60953
|
* SPDX-License-Identifier: Apache-2.0
|
|
60837
60954
|
*/
|
|
60838
|
-
var
|
|
60839
|
-
__extends(
|
|
60840
|
-
function
|
|
60841
|
-
var _this = _super.call(this, options) || this;
|
|
60842
|
-
_this._chart = chart;
|
|
60843
|
-
_this._blendStartTime = 0;
|
|
60844
|
-
_this._blendDuration = 1000;
|
|
60845
|
-
_this._blendTimeout = null;
|
|
60846
|
-
_this._onBlendBound = function () {
|
|
60847
|
-
_this.onBlend();
|
|
60848
|
-
};
|
|
60849
|
-
return _this;
|
|
60850
|
-
}
|
|
60851
|
-
DChartPlotAreaImpl.prototype.init = function (options) {
|
|
60852
|
-
var _this = this;
|
|
60955
|
+
var DChartPlotAreaOnefold = /** @class */ (function (_super) {
|
|
60956
|
+
__extends(DChartPlotAreaOnefold, _super);
|
|
60957
|
+
function DChartPlotAreaOnefold(chart, options) {
|
|
60853
60958
|
var _a;
|
|
60854
|
-
_super.
|
|
60855
|
-
this._isBoundsInContainerDirty = true;
|
|
60856
|
-
this._boundsInContainer = new pixi_js.Rectangle();
|
|
60857
|
-
this._workPoint = new pixi_js.Point();
|
|
60959
|
+
var _this = _super.call(this, chart, options) || this;
|
|
60858
60960
|
// Container
|
|
60859
60961
|
var container = new DChartPlotAreaContainer(function () {
|
|
60860
60962
|
_this._isViewDirty = true;
|
|
60861
|
-
_this.
|
|
60963
|
+
_this._isContainerBoundsDirty = true;
|
|
60862
60964
|
DApplications.update(_this);
|
|
60863
60965
|
});
|
|
60864
|
-
|
|
60865
|
-
|
|
60866
|
-
// View
|
|
60867
|
-
this._isViewDirty = true;
|
|
60868
|
-
this._view = new DViewImpl(this, function () { return container; }, options === null || options === void 0 ? void 0 : options.view);
|
|
60869
|
-
// Coordinate container
|
|
60870
|
-
this._coordinate = new DChartCoordinateContainerImpl(this, options === null || options === void 0 ? void 0 : options.coordinate);
|
|
60871
|
-
// Series container
|
|
60872
|
-
var series = new DChartSeriesContainerImpl(this, options === null || options === void 0 ? void 0 : options.series);
|
|
60873
|
-
this._series = series;
|
|
60874
|
-
// Axis container
|
|
60875
|
-
var axis = new DChartAxisContainerImpl(this, options === null || options === void 0 ? void 0 : options.axis);
|
|
60876
|
-
this._axis = axis;
|
|
60877
|
-
this.addChild(axis.container);
|
|
60878
|
-
// Selection
|
|
60879
|
-
var selection = series.selection;
|
|
60880
|
-
if (selection) {
|
|
60881
|
-
selection.bind(series);
|
|
60882
|
-
}
|
|
60966
|
+
_this._container = container;
|
|
60967
|
+
_this.addChild(container);
|
|
60883
60968
|
// Overflow mask
|
|
60884
|
-
var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a :
|
|
60969
|
+
var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : _this.theme.isOverflowMaskEnabled();
|
|
60885
60970
|
if (mask) {
|
|
60886
|
-
container.mask =
|
|
60971
|
+
container.mask = _this.getOverflowMask();
|
|
60887
60972
|
}
|
|
60888
|
-
//
|
|
60889
|
-
|
|
60890
|
-
|
|
60891
|
-
|
|
60892
|
-
|
|
60893
|
-
|
|
60894
|
-
|
|
60895
|
-
|
|
60896
|
-
|
|
60897
|
-
|
|
60898
|
-
|
|
60899
|
-
|
|
60900
|
-
|
|
60901
|
-
|
|
60902
|
-
|
|
60903
|
-
|
|
60904
|
-
|
|
60905
|
-
|
|
60906
|
-
|
|
60907
|
-
|
|
60908
|
-
|
|
60909
|
-
|
|
60910
|
-
|
|
60911
|
-
}
|
|
60912
|
-
}
|
|
60913
|
-
}
|
|
60973
|
+
// View
|
|
60974
|
+
_this._isViewDirty = true;
|
|
60975
|
+
_this._view = new DViewImpl(_this, function () { return container; }, options === null || options === void 0 ? void 0 : options.view);
|
|
60976
|
+
// Coordinate
|
|
60977
|
+
_this._coordinate = new DChartCoordinateContainerImpl(_this, options === null || options === void 0 ? void 0 : options.coordinate);
|
|
60978
|
+
// Series
|
|
60979
|
+
var seriesOptions = options === null || options === void 0 ? void 0 : options.series;
|
|
60980
|
+
var series = new DChartSeriesContainerImpl(_this, seriesOptions);
|
|
60981
|
+
_this._series = series;
|
|
60982
|
+
// Axis
|
|
60983
|
+
var axisOptions = options === null || options === void 0 ? void 0 : options.axis;
|
|
60984
|
+
var axis = new DChartAxisContainerImpl(_this, new EShapeContainer(), axisOptions);
|
|
60985
|
+
_this._axis = axis;
|
|
60986
|
+
_this.addChild(axis.container);
|
|
60987
|
+
// Add series
|
|
60988
|
+
_this.addSeries(series, seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.list);
|
|
60989
|
+
// Add axes
|
|
60990
|
+
_this.addAxes(axis, axisOptions === null || axisOptions === void 0 ? void 0 : axisOptions.list);
|
|
60991
|
+
// Selection
|
|
60992
|
+
var selection = seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.selection;
|
|
60993
|
+
if (selection != null) {
|
|
60994
|
+
series.selection = selection;
|
|
60995
|
+
selection.bind(series);
|
|
60914
60996
|
}
|
|
60915
|
-
|
|
60916
|
-
|
|
60917
|
-
|
|
60918
|
-
this._isBoundsInContainerDirty = true;
|
|
60919
|
-
_super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
|
|
60920
|
-
};
|
|
60921
|
-
DChartPlotAreaImpl.prototype.getOverflowMask = function () {
|
|
60997
|
+
return _this;
|
|
60998
|
+
}
|
|
60999
|
+
DChartPlotAreaOnefold.prototype.getOverflowMask = function () {
|
|
60922
61000
|
if (this._overflowMask == null) {
|
|
60923
61001
|
this._overflowMask = new DBaseOverflowMask(this);
|
|
60924
61002
|
this.reflowable.add(this._overflowMask);
|
|
@@ -60926,111 +61004,1056 @@
|
|
|
60926
61004
|
}
|
|
60927
61005
|
return this._overflowMask;
|
|
60928
61006
|
};
|
|
60929
|
-
|
|
60930
|
-
|
|
60931
|
-
|
|
60932
|
-
|
|
60933
|
-
|
|
60934
|
-
|
|
60935
|
-
|
|
60936
|
-
|
|
61007
|
+
DChartPlotAreaOnefold.prototype.addSeries = function (series, list) {
|
|
61008
|
+
if (list != null) {
|
|
61009
|
+
var listLength = list.length;
|
|
61010
|
+
if (0 < listLength) {
|
|
61011
|
+
for (var i = 0; i < listLength; ++i) {
|
|
61012
|
+
series.add(list[i]);
|
|
61013
|
+
}
|
|
61014
|
+
series.update();
|
|
61015
|
+
}
|
|
61016
|
+
}
|
|
61017
|
+
};
|
|
61018
|
+
DChartPlotAreaOnefold.prototype.addAxes = function (axis, list) {
|
|
61019
|
+
if (list != null) {
|
|
61020
|
+
for (var i = 0, imax = list.length; i < imax; ++i) {
|
|
61021
|
+
axis.add(list[i]);
|
|
61022
|
+
}
|
|
61023
|
+
}
|
|
61024
|
+
};
|
|
61025
|
+
Object.defineProperty(DChartPlotAreaOnefold.prototype, "coordinate", {
|
|
60937
61026
|
get: function () {
|
|
60938
61027
|
return this._coordinate;
|
|
60939
61028
|
},
|
|
60940
61029
|
enumerable: false,
|
|
60941
61030
|
configurable: true
|
|
60942
61031
|
});
|
|
60943
|
-
Object.defineProperty(
|
|
61032
|
+
Object.defineProperty(DChartPlotAreaOnefold.prototype, "series", {
|
|
60944
61033
|
get: function () {
|
|
60945
61034
|
return this._series;
|
|
60946
61035
|
},
|
|
60947
61036
|
enumerable: false,
|
|
60948
61037
|
configurable: true
|
|
60949
61038
|
});
|
|
60950
|
-
Object.defineProperty(
|
|
61039
|
+
Object.defineProperty(DChartPlotAreaOnefold.prototype, "container", {
|
|
60951
61040
|
get: function () {
|
|
60952
61041
|
return this._container;
|
|
60953
61042
|
},
|
|
60954
61043
|
enumerable: false,
|
|
60955
61044
|
configurable: true
|
|
60956
61045
|
});
|
|
60957
|
-
Object.defineProperty(
|
|
61046
|
+
Object.defineProperty(DChartPlotAreaOnefold.prototype, "axis", {
|
|
60958
61047
|
get: function () {
|
|
60959
61048
|
return this._axis;
|
|
60960
61049
|
},
|
|
60961
61050
|
enumerable: false,
|
|
60962
61051
|
configurable: true
|
|
60963
61052
|
});
|
|
60964
|
-
|
|
61053
|
+
DChartPlotAreaOnefold.prototype.newView = function (options) {
|
|
61054
|
+
var _this = this;
|
|
61055
|
+
return new DViewImpl(this, function () { return _this._container; }, options === null || options === void 0 ? void 0 : options.view);
|
|
61056
|
+
};
|
|
61057
|
+
DChartPlotAreaOnefold.prototype.onViewDirty = function () {
|
|
61058
|
+
this._coordinate.fit();
|
|
61059
|
+
this._axis.onRender();
|
|
61060
|
+
this._series.onRender();
|
|
61061
|
+
};
|
|
61062
|
+
DChartPlotAreaOnefold.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
|
|
61063
|
+
var coordinate = this._coordinate;
|
|
61064
|
+
var axis = this._axis;
|
|
61065
|
+
var series = this._series;
|
|
61066
|
+
if (duration != null && duration <= 0) {
|
|
61067
|
+
coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
|
|
61068
|
+
axis.update();
|
|
61069
|
+
series.update();
|
|
61070
|
+
}
|
|
61071
|
+
else {
|
|
61072
|
+
this._blendDuration = duration != null ? duration : 200;
|
|
61073
|
+
this._blendStartTime = Date.now();
|
|
61074
|
+
coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
|
|
61075
|
+
var blendTimeout = this._blendTimeout;
|
|
61076
|
+
if (blendTimeout != null) {
|
|
61077
|
+
window.clearTimeout(blendTimeout);
|
|
61078
|
+
}
|
|
61079
|
+
this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
|
|
61080
|
+
}
|
|
61081
|
+
return this;
|
|
61082
|
+
};
|
|
61083
|
+
DChartPlotAreaOnefold.prototype.onBlend = function () {
|
|
61084
|
+
var now = Date.now();
|
|
61085
|
+
var ratio = (now - this._blendStartTime) / this._blendDuration;
|
|
61086
|
+
if (ratio < 1) {
|
|
61087
|
+
this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
|
|
61088
|
+
}
|
|
61089
|
+
else {
|
|
61090
|
+
this._blendTimeout = null;
|
|
61091
|
+
ratio = 1;
|
|
61092
|
+
}
|
|
61093
|
+
this._coordinate.blend(DAnimationTimings.ELASTIC(ratio));
|
|
61094
|
+
this._axis.update();
|
|
61095
|
+
this._series.update();
|
|
61096
|
+
};
|
|
61097
|
+
DChartPlotAreaOnefold.prototype.destroy = function () {
|
|
61098
|
+
this._container.destroy();
|
|
61099
|
+
this._series.destroy();
|
|
61100
|
+
this._axis.destroy();
|
|
61101
|
+
};
|
|
61102
|
+
return DChartPlotAreaOnefold;
|
|
61103
|
+
}(DChartPlotAreaBase));
|
|
61104
|
+
|
|
61105
|
+
/*
|
|
61106
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61107
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61108
|
+
*/
|
|
61109
|
+
var DChartPlotAreaTwofoldAxisContainer = /** @class */ (function () {
|
|
61110
|
+
function DChartPlotAreaTwofoldAxisContainer(plotArea, container, primary, secondary) {
|
|
61111
|
+
this._plotArea = plotArea;
|
|
61112
|
+
this._container = container;
|
|
61113
|
+
this._list = new Map();
|
|
61114
|
+
this._primary = primary;
|
|
61115
|
+
this._secondary = secondary;
|
|
61116
|
+
}
|
|
61117
|
+
Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "container", {
|
|
60965
61118
|
get: function () {
|
|
60966
|
-
return this.
|
|
61119
|
+
return this._container;
|
|
60967
61120
|
},
|
|
60968
61121
|
enumerable: false,
|
|
60969
61122
|
configurable: true
|
|
60970
61123
|
});
|
|
60971
|
-
|
|
60972
|
-
|
|
60973
|
-
|
|
60974
|
-
|
|
61124
|
+
Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "plotArea", {
|
|
61125
|
+
get: function () {
|
|
61126
|
+
return this._plotArea;
|
|
61127
|
+
},
|
|
61128
|
+
enumerable: false,
|
|
61129
|
+
configurable: true
|
|
61130
|
+
});
|
|
61131
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.add = function (axis) {
|
|
61132
|
+
var list = this._list;
|
|
61133
|
+
var axes = list.get(axis.position);
|
|
61134
|
+
if (axes == null) {
|
|
61135
|
+
axes = [];
|
|
61136
|
+
list.set(axis.position, axes);
|
|
61137
|
+
}
|
|
61138
|
+
axes.push(axis);
|
|
61139
|
+
axis.bind(this, axes.length - 1);
|
|
60975
61140
|
};
|
|
60976
|
-
|
|
60977
|
-
var
|
|
60978
|
-
var
|
|
60979
|
-
|
|
61141
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.get = function (position, index) {
|
|
61142
|
+
var primary = this._primary;
|
|
61143
|
+
var primarySize = primary.size(position);
|
|
61144
|
+
if (0 <= index && index < primarySize) {
|
|
61145
|
+
return primary.get(position, index);
|
|
61146
|
+
}
|
|
61147
|
+
var secondary = this._secondary;
|
|
61148
|
+
var secondarySize = secondary.size(position);
|
|
61149
|
+
if (primarySize <= index && index < primarySize + secondarySize) {
|
|
61150
|
+
return secondary.get(position, index);
|
|
61151
|
+
}
|
|
61152
|
+
var list = this._list;
|
|
61153
|
+
var axes = list.get(toEnum(position, DChartAxisPosition));
|
|
61154
|
+
if (axes) {
|
|
61155
|
+
if (primarySize + secondarySize <= index &&
|
|
61156
|
+
index < primarySize + secondarySize + axes.length) {
|
|
61157
|
+
return axes[index - primarySize - secondarySize];
|
|
61158
|
+
}
|
|
61159
|
+
}
|
|
61160
|
+
return null;
|
|
60980
61161
|
};
|
|
60981
|
-
|
|
60982
|
-
this.
|
|
60983
|
-
|
|
61162
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.indexOf = function (axis) {
|
|
61163
|
+
var primary = this._primary;
|
|
61164
|
+
var result = primary.indexOf(axis);
|
|
61165
|
+
if (0 <= result) {
|
|
61166
|
+
return result;
|
|
61167
|
+
}
|
|
61168
|
+
result = this._secondary.indexOf(axis);
|
|
61169
|
+
if (0 <= result) {
|
|
61170
|
+
return primary.size(axis.position) + result;
|
|
61171
|
+
}
|
|
61172
|
+
var list = this._list;
|
|
61173
|
+
var axes = list.get(axis.position);
|
|
61174
|
+
if (axes) {
|
|
61175
|
+
return axes.indexOf(axis);
|
|
61176
|
+
}
|
|
61177
|
+
return -1;
|
|
60984
61178
|
};
|
|
60985
|
-
|
|
60986
|
-
|
|
60987
|
-
|
|
60988
|
-
|
|
60989
|
-
|
|
60990
|
-
|
|
61179
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.clear = function (position) {
|
|
61180
|
+
this._primary.clear(position);
|
|
61181
|
+
this._secondary.clear(position);
|
|
61182
|
+
var list = this._list;
|
|
61183
|
+
var axes = list.get(toEnum(position, DChartAxisPosition));
|
|
61184
|
+
if (axes) {
|
|
61185
|
+
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
61186
|
+
axes[i].destroy();
|
|
61187
|
+
}
|
|
61188
|
+
axes.length = 0;
|
|
60991
61189
|
}
|
|
60992
|
-
|
|
61190
|
+
return this;
|
|
61191
|
+
};
|
|
61192
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.size = function (position) {
|
|
61193
|
+
var list = this._list;
|
|
61194
|
+
var axes = list.get(toEnum(position, DChartAxisPosition));
|
|
61195
|
+
return (this._primary.size(position) +
|
|
61196
|
+
this._secondary.size(position) +
|
|
61197
|
+
(axes != null ? axes.length : 0));
|
|
61198
|
+
};
|
|
61199
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.update = function () {
|
|
61200
|
+
this._primary.update();
|
|
61201
|
+
this._secondary.update();
|
|
61202
|
+
this._list.forEach(function (axes) {
|
|
61203
|
+
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
61204
|
+
axes[i].update();
|
|
61205
|
+
}
|
|
61206
|
+
});
|
|
61207
|
+
};
|
|
61208
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.onRender = function () {
|
|
61209
|
+
this._primary.onRender();
|
|
61210
|
+
this._secondary.onRender();
|
|
61211
|
+
this._list.forEach(function (axes) {
|
|
61212
|
+
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
61213
|
+
axes[i].onRender();
|
|
61214
|
+
}
|
|
61215
|
+
});
|
|
61216
|
+
};
|
|
61217
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.destroy = function () {
|
|
61218
|
+
this._primary.destroy();
|
|
61219
|
+
this._secondary.destroy();
|
|
61220
|
+
this._list.forEach(function (axes) {
|
|
61221
|
+
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
61222
|
+
axes[i].destroy();
|
|
61223
|
+
}
|
|
61224
|
+
axes.length = 0;
|
|
61225
|
+
});
|
|
61226
|
+
};
|
|
61227
|
+
return DChartPlotAreaTwofoldAxisContainer;
|
|
61228
|
+
}());
|
|
61229
|
+
|
|
61230
|
+
/*
|
|
61231
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61232
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61233
|
+
*/
|
|
61234
|
+
var DChartPlotAreaTwofoldCoorinateContainerSub = /** @class */ (function () {
|
|
61235
|
+
function DChartPlotAreaTwofoldCoorinateContainerSub(container, primary, secondary) {
|
|
61236
|
+
this._container = container;
|
|
61237
|
+
this._primary = primary;
|
|
61238
|
+
this._secondary = secondary;
|
|
61239
|
+
}
|
|
61240
|
+
Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainerSub.prototype, "container", {
|
|
61241
|
+
get: function () {
|
|
61242
|
+
return this._container;
|
|
61243
|
+
},
|
|
61244
|
+
enumerable: false,
|
|
61245
|
+
configurable: true
|
|
61246
|
+
});
|
|
61247
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.add = function (coordinate, index) {
|
|
61248
|
+
if (index != null) {
|
|
61249
|
+
var primary = this._primary;
|
|
61250
|
+
var primarySize = primary.size();
|
|
61251
|
+
if (index < primarySize) {
|
|
61252
|
+
if (0 <= index) {
|
|
61253
|
+
primary.add(coordinate, index);
|
|
61254
|
+
}
|
|
61255
|
+
}
|
|
61256
|
+
else {
|
|
61257
|
+
this._secondary.add(coordinate, index - primarySize);
|
|
61258
|
+
}
|
|
61259
|
+
return this;
|
|
61260
|
+
}
|
|
61261
|
+
else {
|
|
61262
|
+
this._secondary.add(coordinate);
|
|
61263
|
+
}
|
|
61264
|
+
return this;
|
|
61265
|
+
};
|
|
61266
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.get = function (index) {
|
|
61267
|
+
var primary = this._primary;
|
|
61268
|
+
var primarySize = primary.size();
|
|
61269
|
+
if (0 <= index && index < primarySize) {
|
|
61270
|
+
return primary.get(index);
|
|
61271
|
+
}
|
|
61272
|
+
var secondary = this._secondary;
|
|
61273
|
+
var secondarySize = secondary.size();
|
|
61274
|
+
if (primarySize <= index && index < primarySize + secondarySize) {
|
|
61275
|
+
secondary.get(index - primarySize);
|
|
61276
|
+
}
|
|
61277
|
+
return null;
|
|
61278
|
+
};
|
|
61279
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.indexOf = function (coordinate) {
|
|
61280
|
+
var result = this._primary.indexOf(coordinate);
|
|
61281
|
+
if (0 <= result) {
|
|
61282
|
+
return result;
|
|
61283
|
+
}
|
|
61284
|
+
result = this._secondary.indexOf(coordinate);
|
|
61285
|
+
if (0 <= result) {
|
|
61286
|
+
return this._primary.size() + result;
|
|
61287
|
+
}
|
|
61288
|
+
return -1;
|
|
61289
|
+
};
|
|
61290
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.remove = function (coordinateOrIndex) {
|
|
61291
|
+
if (isNumber(coordinateOrIndex)) {
|
|
61292
|
+
var index = coordinateOrIndex;
|
|
61293
|
+
var primary = this._primary;
|
|
61294
|
+
var primarySize = primary.size();
|
|
61295
|
+
if (0 <= index && index < primarySize) {
|
|
61296
|
+
return primary.remove(index);
|
|
61297
|
+
}
|
|
61298
|
+
var secondary = this._secondary;
|
|
61299
|
+
var secondarySize = secondary.size();
|
|
61300
|
+
if (primarySize <= index && index < primarySize + secondarySize) {
|
|
61301
|
+
secondary.remove(index - primarySize);
|
|
61302
|
+
}
|
|
61303
|
+
}
|
|
61304
|
+
else {
|
|
61305
|
+
var coordinate = coordinateOrIndex;
|
|
61306
|
+
var result = this._primary.remove(coordinate);
|
|
61307
|
+
if (result != null) {
|
|
61308
|
+
return result;
|
|
61309
|
+
}
|
|
61310
|
+
result = this._secondary.remove(coordinate);
|
|
61311
|
+
if (result != null) {
|
|
61312
|
+
return result;
|
|
61313
|
+
}
|
|
61314
|
+
}
|
|
61315
|
+
return null;
|
|
61316
|
+
};
|
|
61317
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.clear = function () {
|
|
61318
|
+
this._primary.clear();
|
|
61319
|
+
this._secondary.clear();
|
|
61320
|
+
return this;
|
|
61321
|
+
};
|
|
61322
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.destroy = function () {
|
|
61323
|
+
return this.clear();
|
|
61324
|
+
};
|
|
61325
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.size = function () {
|
|
61326
|
+
return this._primary.size() + this._secondary.size();
|
|
61327
|
+
};
|
|
61328
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.fit = function (from, to) {
|
|
61329
|
+
this._primary.fit(from, to);
|
|
61330
|
+
this._secondary.fit(from, to);
|
|
61331
|
+
return this;
|
|
61332
|
+
};
|
|
61333
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.mark = function (from, to) {
|
|
61334
|
+
this._primary.mark(from, to);
|
|
61335
|
+
this._secondary.mark(from, to);
|
|
61336
|
+
return this;
|
|
61337
|
+
};
|
|
61338
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.blend = function (ratio) {
|
|
61339
|
+
this._primary.blend(ratio);
|
|
61340
|
+
this._secondary.blend(ratio);
|
|
61341
|
+
return this;
|
|
61342
|
+
};
|
|
61343
|
+
return DChartPlotAreaTwofoldCoorinateContainerSub;
|
|
61344
|
+
}());
|
|
61345
|
+
|
|
61346
|
+
/*
|
|
61347
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61348
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61349
|
+
*/
|
|
61350
|
+
var DChartPlotAreaTwofoldCoorinateContainer = /** @class */ (function () {
|
|
61351
|
+
function DChartPlotAreaTwofoldCoorinateContainer(plotArea, primary, secondary) {
|
|
61352
|
+
this._plotArea = plotArea;
|
|
61353
|
+
this._primary = primary;
|
|
61354
|
+
this._secondary = secondary;
|
|
61355
|
+
this._x = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.x, secondary.x);
|
|
61356
|
+
this._y = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.y, secondary.y);
|
|
61357
|
+
}
|
|
61358
|
+
Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "x", {
|
|
61359
|
+
get: function () {
|
|
61360
|
+
return this._x;
|
|
61361
|
+
},
|
|
61362
|
+
enumerable: false,
|
|
61363
|
+
configurable: true
|
|
61364
|
+
});
|
|
61365
|
+
Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "y", {
|
|
61366
|
+
get: function () {
|
|
61367
|
+
return this._y;
|
|
61368
|
+
},
|
|
61369
|
+
enumerable: false,
|
|
61370
|
+
configurable: true
|
|
61371
|
+
});
|
|
61372
|
+
Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "plotArea", {
|
|
61373
|
+
get: function () {
|
|
61374
|
+
return this._plotArea;
|
|
61375
|
+
},
|
|
61376
|
+
enumerable: false,
|
|
61377
|
+
configurable: true
|
|
61378
|
+
});
|
|
61379
|
+
DChartPlotAreaTwofoldCoorinateContainer.prototype.fit = function (domainFrom, domainTo, rangeFrom, rangeTo) {
|
|
61380
|
+
this._x.fit(domainFrom, domainTo);
|
|
61381
|
+
this._y.fit(rangeFrom, rangeTo);
|
|
61382
|
+
return this;
|
|
61383
|
+
};
|
|
61384
|
+
DChartPlotAreaTwofoldCoorinateContainer.prototype.mark = function (domainFrom, domainTo, rangeFrom, rangeTo) {
|
|
61385
|
+
this._x.mark(domainFrom, domainTo);
|
|
61386
|
+
this._y.mark(rangeFrom, rangeTo);
|
|
61387
|
+
return this;
|
|
61388
|
+
};
|
|
61389
|
+
DChartPlotAreaTwofoldCoorinateContainer.prototype.blend = function (ratio) {
|
|
61390
|
+
this._x.blend(ratio);
|
|
61391
|
+
this._y.blend(ratio);
|
|
61392
|
+
return this;
|
|
61393
|
+
};
|
|
61394
|
+
return DChartPlotAreaTwofoldCoorinateContainer;
|
|
61395
|
+
}());
|
|
61396
|
+
|
|
61397
|
+
/*
|
|
61398
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61399
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61400
|
+
*/
|
|
61401
|
+
var DChartPlotAreaTwofoldOverflowMaskPrimary = /** @class */ (function (_super) {
|
|
61402
|
+
__extends(DChartPlotAreaTwofoldOverflowMaskPrimary, _super);
|
|
61403
|
+
function DChartPlotAreaTwofoldOverflowMaskPrimary() {
|
|
61404
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
61405
|
+
}
|
|
61406
|
+
DChartPlotAreaTwofoldOverflowMaskPrimary.prototype.onReflow = function (base, width, height) {
|
|
61407
|
+
if (this._isInitialized && this._width === width && this._height === height) {
|
|
61408
|
+
return;
|
|
61409
|
+
}
|
|
61410
|
+
this._isInitialized = true;
|
|
61411
|
+
this._width = width;
|
|
61412
|
+
this._height = height;
|
|
61413
|
+
var hh = height * 0.5;
|
|
61414
|
+
this.clear();
|
|
61415
|
+
this.beginFill(0xffffff, 1);
|
|
61416
|
+
this.drawRect(0, 0, width, hh);
|
|
61417
|
+
this.endFill();
|
|
61418
|
+
};
|
|
61419
|
+
return DChartPlotAreaTwofoldOverflowMaskPrimary;
|
|
61420
|
+
}(DBaseOverflowMaskSimple));
|
|
61421
|
+
|
|
61422
|
+
/*
|
|
61423
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61424
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61425
|
+
*/
|
|
61426
|
+
var DChartPlotAreaTwofoldOverflowMaskSecondary = /** @class */ (function (_super) {
|
|
61427
|
+
__extends(DChartPlotAreaTwofoldOverflowMaskSecondary, _super);
|
|
61428
|
+
function DChartPlotAreaTwofoldOverflowMaskSecondary() {
|
|
61429
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
61430
|
+
}
|
|
61431
|
+
DChartPlotAreaTwofoldOverflowMaskSecondary.prototype.onReflow = function (base, width, height) {
|
|
61432
|
+
if (this._isInitialized && this._width === width && this._height === height) {
|
|
61433
|
+
return;
|
|
61434
|
+
}
|
|
61435
|
+
this._isInitialized = true;
|
|
61436
|
+
this._width = width;
|
|
61437
|
+
this._height = height;
|
|
61438
|
+
var hh = height * 0.5;
|
|
61439
|
+
this.clear();
|
|
61440
|
+
this.beginFill(0xffffff, 1);
|
|
61441
|
+
this.drawRect(0, hh, width, hh);
|
|
61442
|
+
this.endFill();
|
|
61443
|
+
};
|
|
61444
|
+
return DChartPlotAreaTwofoldOverflowMaskSecondary;
|
|
61445
|
+
}(DBaseOverflowMaskSimple));
|
|
61446
|
+
|
|
61447
|
+
/*
|
|
61448
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61449
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61450
|
+
*/
|
|
61451
|
+
var DChartPlotAreaTwofoldSeriesContainer = /** @class */ (function () {
|
|
61452
|
+
function DChartPlotAreaTwofoldSeriesContainer(plotArea, primary, secondary) {
|
|
61453
|
+
this._plotArea = plotArea;
|
|
61454
|
+
this._primary = primary;
|
|
61455
|
+
this._secondary = secondary;
|
|
61456
|
+
this._domain = new DChartRegionImpl(NaN, NaN);
|
|
61457
|
+
this._range = new DChartRegionImpl(NaN, NaN);
|
|
61458
|
+
}
|
|
61459
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newFill = function (index, options) {
|
|
61460
|
+
return this._secondary.newFill(index, options);
|
|
61461
|
+
};
|
|
61462
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newStroke = function (index, options) {
|
|
61463
|
+
return this._secondary.newStroke(index, options);
|
|
61464
|
+
};
|
|
61465
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newSize = function (index, options, x, y) {
|
|
61466
|
+
return this._secondary.newSize(index, options, x, y);
|
|
61467
|
+
};
|
|
61468
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newOffset = function (index, options, x, y) {
|
|
61469
|
+
return this._secondary.newOffset(index, options, x, y);
|
|
61470
|
+
};
|
|
61471
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newPadding = function (index, options) {
|
|
61472
|
+
return this._secondary.newPadding(index, options);
|
|
61473
|
+
};
|
|
61474
|
+
Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "plotArea", {
|
|
61475
|
+
get: function () {
|
|
61476
|
+
return this._plotArea;
|
|
61477
|
+
},
|
|
61478
|
+
enumerable: false,
|
|
61479
|
+
configurable: true
|
|
61480
|
+
});
|
|
61481
|
+
Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "selection", {
|
|
61482
|
+
get: function () {
|
|
61483
|
+
return this._secondary.selection;
|
|
61484
|
+
},
|
|
61485
|
+
enumerable: false,
|
|
61486
|
+
configurable: true
|
|
61487
|
+
});
|
|
61488
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.update = function () {
|
|
61489
|
+
this._primary.update();
|
|
61490
|
+
this._secondary.update();
|
|
61491
|
+
var selection = this._secondary.selection;
|
|
61492
|
+
if (selection) {
|
|
61493
|
+
selection.update();
|
|
61494
|
+
}
|
|
61495
|
+
};
|
|
61496
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.onRender = function () {
|
|
61497
|
+
this._primary.onRender();
|
|
61498
|
+
this._secondary.onRender();
|
|
61499
|
+
var selection = this._secondary.selection;
|
|
61500
|
+
if (selection) {
|
|
61501
|
+
selection.onRender();
|
|
61502
|
+
}
|
|
61503
|
+
};
|
|
61504
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.add = function (series) {
|
|
61505
|
+
this._secondary.add(series);
|
|
61506
|
+
};
|
|
61507
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.get = function (index) {
|
|
61508
|
+
var primary = this._primary;
|
|
61509
|
+
var primarySize = primary.size();
|
|
61510
|
+
if (0 <= index && index < primarySize) {
|
|
61511
|
+
return primary.get(index);
|
|
61512
|
+
}
|
|
61513
|
+
var secondary = this._secondary;
|
|
61514
|
+
var secondarySize = secondary.size();
|
|
61515
|
+
if (primarySize <= index && index < primarySize + secondarySize) {
|
|
61516
|
+
return secondary.get(index - primarySize);
|
|
61517
|
+
}
|
|
61518
|
+
return null;
|
|
61519
|
+
};
|
|
61520
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.indexOf = function (series) {
|
|
61521
|
+
var primary = this._primary;
|
|
61522
|
+
var result = primary.indexOf(series);
|
|
61523
|
+
if (0 <= result) {
|
|
61524
|
+
return result;
|
|
61525
|
+
}
|
|
61526
|
+
result = this._secondary.indexOf(series);
|
|
61527
|
+
if (0 <= result) {
|
|
61528
|
+
return primary.size() + result;
|
|
61529
|
+
}
|
|
61530
|
+
return -1;
|
|
61531
|
+
};
|
|
61532
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.clear = function () {
|
|
61533
|
+
this._primary.clear();
|
|
61534
|
+
this._secondary.clear();
|
|
61535
|
+
return this;
|
|
61536
|
+
};
|
|
61537
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.size = function () {
|
|
61538
|
+
return this._primary.size() + this._secondary.size();
|
|
61539
|
+
};
|
|
61540
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.destroy = function () {
|
|
61541
|
+
this.clear();
|
|
61542
|
+
var selection = this._secondary.selection;
|
|
61543
|
+
if (selection) {
|
|
61544
|
+
selection.unbind();
|
|
61545
|
+
}
|
|
61546
|
+
};
|
|
61547
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.getDomain = function (coordinate, result) {
|
|
61548
|
+
this._primary.getDomain(coordinate, result);
|
|
61549
|
+
var from = result.from;
|
|
61550
|
+
var to = result.to;
|
|
61551
|
+
this._secondary.getDomain(coordinate, result);
|
|
61552
|
+
result.add(from, to);
|
|
61553
|
+
return result;
|
|
61554
|
+
};
|
|
61555
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.getRange = function (coordinate, result) {
|
|
61556
|
+
result.clear();
|
|
61557
|
+
this._primary.getRange(coordinate, result);
|
|
61558
|
+
var from = result.from;
|
|
61559
|
+
var to = result.to;
|
|
61560
|
+
this._secondary.getRange(coordinate, result);
|
|
61561
|
+
result.add(from, to);
|
|
61562
|
+
return result;
|
|
61563
|
+
};
|
|
61564
|
+
Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "domain", {
|
|
61565
|
+
get: function () {
|
|
61566
|
+
var result = this._domain;
|
|
61567
|
+
result.clear();
|
|
61568
|
+
var pdomain = this._primary.domain;
|
|
61569
|
+
result.add(pdomain.from, pdomain.to);
|
|
61570
|
+
var sdomain = this._secondary.domain;
|
|
61571
|
+
result.add(sdomain.from, sdomain.to);
|
|
61572
|
+
return result;
|
|
61573
|
+
},
|
|
61574
|
+
enumerable: false,
|
|
61575
|
+
configurable: true
|
|
61576
|
+
});
|
|
61577
|
+
Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "range", {
|
|
61578
|
+
get: function () {
|
|
61579
|
+
var result = this._domain;
|
|
61580
|
+
result.clear();
|
|
61581
|
+
var prange = this._primary.range;
|
|
61582
|
+
result.add(prange.from, prange.to);
|
|
61583
|
+
var srange = this._secondary.range;
|
|
61584
|
+
result.add(srange.from, srange.to);
|
|
61585
|
+
return result;
|
|
61586
|
+
},
|
|
61587
|
+
enumerable: false,
|
|
61588
|
+
configurable: true
|
|
61589
|
+
});
|
|
61590
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.hitTest = function (x, y) {
|
|
61591
|
+
var result = this._secondary.hitTest(x, y);
|
|
61592
|
+
if (result != null) {
|
|
61593
|
+
return result;
|
|
61594
|
+
}
|
|
61595
|
+
return this._primary.hitTest(x, y);
|
|
60993
61596
|
};
|
|
60994
|
-
|
|
61597
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.calcHitPoint = function (x, y, result) {
|
|
61598
|
+
var _a;
|
|
61599
|
+
var result1 = result;
|
|
61600
|
+
var result2 = ((_a = DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT) !== null && _a !== void 0 ? _a : (DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT = new DChartSeriesHitResult()));
|
|
61601
|
+
var series2 = this._secondary.calcHitPoint(x, y, result2);
|
|
61602
|
+
var series1 = this._primary.calcHitPoint(x, y, result1);
|
|
61603
|
+
if (series1 != null) {
|
|
61604
|
+
if (series2 != null) {
|
|
61605
|
+
if (result1.distance <= result2.distance) {
|
|
61606
|
+
return series1;
|
|
61607
|
+
}
|
|
61608
|
+
else {
|
|
61609
|
+
result1.copyFrom(result2);
|
|
61610
|
+
return series2;
|
|
61611
|
+
}
|
|
61612
|
+
}
|
|
61613
|
+
else {
|
|
61614
|
+
return series1;
|
|
61615
|
+
}
|
|
61616
|
+
}
|
|
61617
|
+
else {
|
|
61618
|
+
if (series2 != null) {
|
|
61619
|
+
result1.copyFrom(result2);
|
|
61620
|
+
return series2;
|
|
61621
|
+
}
|
|
61622
|
+
else {
|
|
61623
|
+
return null;
|
|
61624
|
+
}
|
|
61625
|
+
}
|
|
61626
|
+
};
|
|
61627
|
+
return DChartPlotAreaTwofoldSeriesContainer;
|
|
61628
|
+
}());
|
|
61629
|
+
|
|
61630
|
+
/*
|
|
61631
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61632
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61633
|
+
*/
|
|
61634
|
+
var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
|
|
61635
|
+
function DChartPlotAreaTwofoldSubBase(plotArea, onContainerChange, mask, margin, axisShapeContainer, options) {
|
|
61636
|
+
this._isContainerBoundsDirty = true;
|
|
61637
|
+
this._containerBounds = new pixi_js.Rectangle();
|
|
61638
|
+
this._workPoint = new pixi_js.Point();
|
|
61639
|
+
this._margin = margin;
|
|
61640
|
+
this._plotArea = plotArea;
|
|
61641
|
+
// Container
|
|
61642
|
+
var container = new DChartPlotAreaContainer(onContainerChange);
|
|
61643
|
+
this._container = container;
|
|
61644
|
+
// Coordinate
|
|
61645
|
+
this._coordinate = new DChartCoordinateContainerImpl(this, options === null || options === void 0 ? void 0 : options.coordinate);
|
|
61646
|
+
// Overflow mask
|
|
61647
|
+
if (mask) {
|
|
61648
|
+
container.mask = this.getOverflowMask();
|
|
61649
|
+
}
|
|
61650
|
+
// Series
|
|
61651
|
+
this._series = new DChartSeriesContainerImpl(this, options === null || options === void 0 ? void 0 : options.series);
|
|
61652
|
+
// Axis
|
|
61653
|
+
this._axis = new DChartAxisContainerImpl(this, axisShapeContainer, options === null || options === void 0 ? void 0 : options.axis);
|
|
61654
|
+
}
|
|
61655
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "plotArea", {
|
|
61656
|
+
get: function () {
|
|
61657
|
+
return this._plotArea;
|
|
61658
|
+
},
|
|
61659
|
+
enumerable: false,
|
|
61660
|
+
configurable: true
|
|
61661
|
+
});
|
|
61662
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "chart", {
|
|
61663
|
+
get: function () {
|
|
61664
|
+
return this._plotArea.chart;
|
|
61665
|
+
},
|
|
61666
|
+
enumerable: false,
|
|
61667
|
+
configurable: true
|
|
61668
|
+
});
|
|
61669
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "container", {
|
|
61670
|
+
get: function () {
|
|
61671
|
+
return this._container;
|
|
61672
|
+
},
|
|
61673
|
+
enumerable: false,
|
|
61674
|
+
configurable: true
|
|
61675
|
+
});
|
|
61676
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "series", {
|
|
61677
|
+
get: function () {
|
|
61678
|
+
return this._series;
|
|
61679
|
+
},
|
|
61680
|
+
enumerable: false,
|
|
61681
|
+
configurable: true
|
|
61682
|
+
});
|
|
61683
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "coordinate", {
|
|
61684
|
+
get: function () {
|
|
61685
|
+
return this._coordinate;
|
|
61686
|
+
},
|
|
61687
|
+
enumerable: false,
|
|
61688
|
+
configurable: true
|
|
61689
|
+
});
|
|
61690
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "axis", {
|
|
61691
|
+
get: function () {
|
|
61692
|
+
return this._axis;
|
|
61693
|
+
},
|
|
61694
|
+
enumerable: false,
|
|
61695
|
+
configurable: true
|
|
61696
|
+
});
|
|
61697
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
61698
|
+
DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
|
|
61699
|
+
this._plotArea.on(name, callback, context);
|
|
61700
|
+
return this;
|
|
61701
|
+
};
|
|
61702
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
61703
|
+
DChartPlotAreaTwofoldSubBase.prototype.off = function (name, callback, context) {
|
|
61704
|
+
this._plotArea.off(name, callback, context);
|
|
61705
|
+
return this;
|
|
61706
|
+
};
|
|
61707
|
+
DChartPlotAreaTwofoldSubBase.prototype.getPixelDomain = function (result) {
|
|
61708
|
+
var plotArea = this._plotArea;
|
|
61709
|
+
var padding = plotArea.padding;
|
|
61710
|
+
var width = plotArea.width;
|
|
61711
|
+
return result.set(padding.getLeft(), width - padding.getRight());
|
|
61712
|
+
};
|
|
61713
|
+
DChartPlotAreaTwofoldSubBase.prototype.getAxisBounds = function (position) {
|
|
61714
|
+
return this.getPixelBounds();
|
|
61715
|
+
};
|
|
61716
|
+
DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsX = function () {
|
|
61717
|
+
return this.getPixelBounds();
|
|
61718
|
+
};
|
|
61719
|
+
DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsY = function () {
|
|
61720
|
+
return this.getPixelBounds();
|
|
61721
|
+
};
|
|
61722
|
+
DChartPlotAreaTwofoldSubBase.prototype.toBoundsDirty = function () {
|
|
61723
|
+
this._isContainerBoundsDirty = true;
|
|
61724
|
+
};
|
|
61725
|
+
DChartPlotAreaTwofoldSubBase.prototype.destroy = function () {
|
|
60995
61726
|
this._container.destroy();
|
|
60996
61727
|
this._series.destroy();
|
|
60997
61728
|
this._axis.destroy();
|
|
60998
61729
|
};
|
|
60999
|
-
|
|
61000
|
-
|
|
61730
|
+
return DChartPlotAreaTwofoldSubBase;
|
|
61731
|
+
}());
|
|
61732
|
+
|
|
61733
|
+
/*
|
|
61734
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61735
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61736
|
+
*/
|
|
61737
|
+
var DChartPlotAreaTwofoldSubPrimary = /** @class */ (function (_super) {
|
|
61738
|
+
__extends(DChartPlotAreaTwofoldSubPrimary, _super);
|
|
61739
|
+
function DChartPlotAreaTwofoldSubPrimary() {
|
|
61740
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
61741
|
+
}
|
|
61742
|
+
DChartPlotAreaTwofoldSubPrimary.prototype.getOverflowMask = function () {
|
|
61743
|
+
if (this._overflowMask == null) {
|
|
61744
|
+
var plotArea = this._plotArea;
|
|
61745
|
+
this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskPrimary(plotArea);
|
|
61746
|
+
plotArea.reflowable.add(this._overflowMask);
|
|
61747
|
+
plotArea.toDirty();
|
|
61748
|
+
}
|
|
61749
|
+
return this._overflowMask;
|
|
61001
61750
|
};
|
|
61002
|
-
|
|
61003
|
-
var
|
|
61004
|
-
|
|
61005
|
-
|
|
61006
|
-
|
|
61007
|
-
|
|
61008
|
-
|
|
61009
|
-
|
|
61010
|
-
|
|
61011
|
-
|
|
61012
|
-
|
|
61013
|
-
|
|
61014
|
-
|
|
61015
|
-
|
|
61016
|
-
|
|
61017
|
-
|
|
61751
|
+
DChartPlotAreaTwofoldSubPrimary.prototype.getPixelRange = function (result) {
|
|
61752
|
+
var plotArea = this._plotArea;
|
|
61753
|
+
var padding = plotArea.padding;
|
|
61754
|
+
var paddingTop = padding.getTop();
|
|
61755
|
+
var height = plotArea.height;
|
|
61756
|
+
return result.set((height - this._margin) * 0.5, paddingTop);
|
|
61757
|
+
};
|
|
61758
|
+
DChartPlotAreaTwofoldSubPrimary.prototype.getPixelBounds = function () {
|
|
61759
|
+
var result = this._plotArea.getPixelBounds();
|
|
61760
|
+
result.height *= 0.5;
|
|
61761
|
+
return result;
|
|
61762
|
+
};
|
|
61763
|
+
DChartPlotAreaTwofoldSubPrimary.prototype.getContainerBounds = function () {
|
|
61764
|
+
var result = this._containerBounds;
|
|
61765
|
+
if (this._isContainerBoundsDirty) {
|
|
61766
|
+
this._isContainerBoundsDirty = false;
|
|
61767
|
+
var bounds = this._plotArea.getContainerBounds();
|
|
61768
|
+
result.width = bounds.width;
|
|
61769
|
+
result.height = bounds.height * 0.5;
|
|
61770
|
+
result.x = bounds.x;
|
|
61771
|
+
result.y = bounds.y;
|
|
61018
61772
|
}
|
|
61019
61773
|
return result;
|
|
61020
61774
|
};
|
|
61021
|
-
|
|
61022
|
-
|
|
61023
|
-
|
|
61024
|
-
|
|
61775
|
+
return DChartPlotAreaTwofoldSubPrimary;
|
|
61776
|
+
}(DChartPlotAreaTwofoldSubBase));
|
|
61777
|
+
|
|
61778
|
+
/*
|
|
61779
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61780
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61781
|
+
*/
|
|
61782
|
+
var DChartPlotAreaTwofoldSubSecondary = /** @class */ (function (_super) {
|
|
61783
|
+
__extends(DChartPlotAreaTwofoldSubSecondary, _super);
|
|
61784
|
+
function DChartPlotAreaTwofoldSubSecondary() {
|
|
61785
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
61786
|
+
}
|
|
61787
|
+
DChartPlotAreaTwofoldSubSecondary.prototype.getOverflowMask = function () {
|
|
61788
|
+
if (this._overflowMask == null) {
|
|
61789
|
+
var plotArea = this._plotArea;
|
|
61790
|
+
this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskSecondary(plotArea);
|
|
61791
|
+
plotArea.reflowable.add(this._overflowMask);
|
|
61792
|
+
plotArea.toDirty();
|
|
61793
|
+
}
|
|
61794
|
+
return this._overflowMask;
|
|
61795
|
+
};
|
|
61796
|
+
DChartPlotAreaTwofoldSubSecondary.prototype.getPixelRange = function (result) {
|
|
61797
|
+
var plotArea = this._plotArea;
|
|
61798
|
+
var padding = plotArea.padding;
|
|
61799
|
+
var paddingBottom = padding.getBottom();
|
|
61800
|
+
var height = plotArea.height;
|
|
61801
|
+
return result.set(height - paddingBottom, (height + this._margin) * 0.5);
|
|
61802
|
+
};
|
|
61803
|
+
DChartPlotAreaTwofoldSubSecondary.prototype.getPixelBounds = function () {
|
|
61804
|
+
var result = this._plotArea.getPixelBounds();
|
|
61805
|
+
result.height *= 0.5;
|
|
61806
|
+
result.y = result.height;
|
|
61807
|
+
return result;
|
|
61808
|
+
};
|
|
61809
|
+
DChartPlotAreaTwofoldSubSecondary.prototype.getContainerBounds = function () {
|
|
61810
|
+
var result = this._containerBounds;
|
|
61811
|
+
if (this._isContainerBoundsDirty) {
|
|
61812
|
+
this._isContainerBoundsDirty = false;
|
|
61813
|
+
var bounds = this._plotArea.getContainerBounds();
|
|
61814
|
+
result.width = bounds.width;
|
|
61815
|
+
result.height = bounds.height * 0.5;
|
|
61816
|
+
result.x = bounds.x;
|
|
61817
|
+
result.y = bounds.y + result.height;
|
|
61818
|
+
}
|
|
61819
|
+
return result;
|
|
61820
|
+
};
|
|
61821
|
+
return DChartPlotAreaTwofoldSubSecondary;
|
|
61822
|
+
}(DChartPlotAreaTwofoldSubBase));
|
|
61823
|
+
|
|
61824
|
+
var DChartPlotAreaTwofoldViewTargetPoint = /** @class */ (function () {
|
|
61825
|
+
function DChartPlotAreaTwofoldViewTargetPoint(primary, secondary) {
|
|
61826
|
+
this._primary = primary;
|
|
61827
|
+
this._secondary = secondary;
|
|
61828
|
+
}
|
|
61829
|
+
Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "x", {
|
|
61830
|
+
get: function () {
|
|
61831
|
+
return this._secondary.x;
|
|
61832
|
+
},
|
|
61833
|
+
set: function (x) {
|
|
61834
|
+
this._primary.x = x;
|
|
61835
|
+
this._secondary.x = x;
|
|
61836
|
+
},
|
|
61837
|
+
enumerable: false,
|
|
61838
|
+
configurable: true
|
|
61839
|
+
});
|
|
61840
|
+
Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "y", {
|
|
61841
|
+
get: function () {
|
|
61842
|
+
return this._secondary.y;
|
|
61843
|
+
},
|
|
61844
|
+
set: function (y) {
|
|
61845
|
+
this._primary.y = y;
|
|
61846
|
+
this._secondary.y = y;
|
|
61847
|
+
},
|
|
61848
|
+
enumerable: false,
|
|
61849
|
+
configurable: true
|
|
61850
|
+
});
|
|
61851
|
+
DChartPlotAreaTwofoldViewTargetPoint.prototype.set = function (x, y) {
|
|
61852
|
+
this._primary.set(x, y);
|
|
61853
|
+
this._secondary.set(x, y);
|
|
61854
|
+
return this;
|
|
61855
|
+
};
|
|
61856
|
+
return DChartPlotAreaTwofoldViewTargetPoint;
|
|
61857
|
+
}());
|
|
61858
|
+
var DChartPlotAreaTwofoldViewTarget = /** @class */ (function () {
|
|
61859
|
+
function DChartPlotAreaTwofoldViewTarget(primary, secondary) {
|
|
61860
|
+
this._primary = primary;
|
|
61861
|
+
this._secondary = secondary;
|
|
61862
|
+
this._scale = new DChartPlotAreaTwofoldViewTargetPoint(primary.scale, secondary.scale);
|
|
61863
|
+
this._position = new DChartPlotAreaTwofoldViewTargetPoint(primary.position, secondary.position);
|
|
61864
|
+
}
|
|
61865
|
+
Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "scale", {
|
|
61866
|
+
get: function () {
|
|
61867
|
+
return this._scale;
|
|
61868
|
+
},
|
|
61869
|
+
enumerable: false,
|
|
61870
|
+
configurable: true
|
|
61871
|
+
});
|
|
61872
|
+
Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "position", {
|
|
61873
|
+
get: function () {
|
|
61874
|
+
return this._position;
|
|
61875
|
+
},
|
|
61876
|
+
enumerable: false,
|
|
61877
|
+
configurable: true
|
|
61878
|
+
});
|
|
61879
|
+
DChartPlotAreaTwofoldViewTarget.prototype.getLocalBounds = function (rect) {
|
|
61880
|
+
this._primary.getLocalBounds(rect);
|
|
61881
|
+
var x1 = rect.x;
|
|
61882
|
+
var y1 = rect.y;
|
|
61883
|
+
var w1 = rect.width;
|
|
61884
|
+
var h1 = rect.height;
|
|
61885
|
+
this._secondary.getLocalBounds(rect);
|
|
61886
|
+
var x2 = rect.x;
|
|
61887
|
+
var y2 = rect.y;
|
|
61888
|
+
var w2 = rect.width;
|
|
61889
|
+
var h2 = rect.height;
|
|
61890
|
+
var x3 = Math.min(x1, x2);
|
|
61891
|
+
var y3 = Math.min(y1, y2);
|
|
61892
|
+
var x4 = Math.max(x1 + w1, x2 + w2);
|
|
61893
|
+
var y4 = Math.max(y1 + h1, y2 + h2);
|
|
61894
|
+
rect.x = x3;
|
|
61895
|
+
rect.y = y3;
|
|
61896
|
+
rect.width = x4 - x3;
|
|
61897
|
+
rect.height = y4 - y3;
|
|
61898
|
+
return rect;
|
|
61899
|
+
};
|
|
61900
|
+
return DChartPlotAreaTwofoldViewTarget;
|
|
61901
|
+
}());
|
|
61902
|
+
|
|
61903
|
+
/*
|
|
61904
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
61905
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
61906
|
+
*/
|
|
61907
|
+
var DChartPlotAreaTwofold = /** @class */ (function (_super) {
|
|
61908
|
+
__extends(DChartPlotAreaTwofold, _super);
|
|
61909
|
+
function DChartPlotAreaTwofold(chart, options) {
|
|
61910
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
61911
|
+
var _this = _super.call(this, chart, options) || this;
|
|
61912
|
+
// Margin
|
|
61913
|
+
var theme = _this.theme;
|
|
61914
|
+
var margin = (_a = options === null || options === void 0 ? void 0 : options.margin) !== null && _a !== void 0 ? _a : theme.getMargin();
|
|
61915
|
+
_this._margin = margin;
|
|
61916
|
+
// Primary
|
|
61917
|
+
var axisShapeContainer = new EShapeContainer();
|
|
61918
|
+
var onContainerChangeBound = function () {
|
|
61919
|
+
_this.onContainerChange();
|
|
61920
|
+
};
|
|
61921
|
+
var mask = (_b = options === null || options === void 0 ? void 0 : options.mask) !== null && _b !== void 0 ? _b : theme.isOverflowMaskEnabled();
|
|
61922
|
+
var primaryOptions = options === null || options === void 0 ? void 0 : options.primary;
|
|
61923
|
+
var primary = new DChartPlotAreaTwofoldSubPrimary(_this, onContainerChangeBound, mask, margin, axisShapeContainer, primaryOptions);
|
|
61924
|
+
_this._primary = primary;
|
|
61925
|
+
// Secondary
|
|
61926
|
+
var secondaryOptions = options === null || options === void 0 ? void 0 : options.secondary;
|
|
61927
|
+
var secondary = new DChartPlotAreaTwofoldSubSecondary(_this, onContainerChangeBound, mask, margin, axisShapeContainer, secondaryOptions);
|
|
61928
|
+
_this._secondary = secondary;
|
|
61929
|
+
// Container
|
|
61930
|
+
_this.addChild(primary.container);
|
|
61931
|
+
_this.addChild(secondary.container);
|
|
61932
|
+
// Coordinate
|
|
61933
|
+
_this._coordinate = new DChartPlotAreaTwofoldCoorinateContainer(_this, primary.coordinate, secondary.coordinate);
|
|
61934
|
+
// Series
|
|
61935
|
+
var primarySeries = primary.series;
|
|
61936
|
+
var secondarySeries = secondary.series;
|
|
61937
|
+
var series = new DChartPlotAreaTwofoldSeriesContainer(_this, primarySeries, secondarySeries);
|
|
61938
|
+
_this._series = series;
|
|
61939
|
+
// Axis
|
|
61940
|
+
var primaryAxis = primary.axis;
|
|
61941
|
+
var secondaryAxis = secondary.axis;
|
|
61942
|
+
_this.addChild(axisShapeContainer);
|
|
61943
|
+
var axis = new DChartPlotAreaTwofoldAxisContainer(_this, axisShapeContainer, primaryAxis, secondaryAxis);
|
|
61944
|
+
_this._axis = axis;
|
|
61945
|
+
// Add Series
|
|
61946
|
+
_this.addSeries(primarySeries, (_c = primaryOptions === null || primaryOptions === void 0 ? void 0 : primaryOptions.series) === null || _c === void 0 ? void 0 : _c.list);
|
|
61947
|
+
_this.addSeries(secondarySeries, (_d = secondaryOptions === null || secondaryOptions === void 0 ? void 0 : secondaryOptions.series) === null || _d === void 0 ? void 0 : _d.list);
|
|
61948
|
+
// Add Axes
|
|
61949
|
+
_this.addAxes(primaryAxis, (_e = primaryOptions === null || primaryOptions === void 0 ? void 0 : primaryOptions.axis) === null || _e === void 0 ? void 0 : _e.list);
|
|
61950
|
+
_this.addAxes(secondaryAxis, (_f = secondaryOptions === null || secondaryOptions === void 0 ? void 0 : secondaryOptions.axis) === null || _f === void 0 ? void 0 : _f.list);
|
|
61951
|
+
_this.addAxes(axis, (_g = options === null || options === void 0 ? void 0 : options.axis) === null || _g === void 0 ? void 0 : _g.list);
|
|
61952
|
+
// Selection
|
|
61953
|
+
var selection = options === null || options === void 0 ? void 0 : options.selection;
|
|
61954
|
+
if (selection != null) {
|
|
61955
|
+
primarySeries.selection = selection;
|
|
61956
|
+
secondarySeries.selection = selection;
|
|
61957
|
+
selection.bind(series);
|
|
61958
|
+
}
|
|
61959
|
+
return _this;
|
|
61960
|
+
}
|
|
61961
|
+
DChartPlotAreaTwofold.prototype.addSeries = function (series, list) {
|
|
61962
|
+
if (list != null) {
|
|
61963
|
+
var listLength = list.length;
|
|
61964
|
+
if (0 < listLength) {
|
|
61965
|
+
for (var i = 0; i < listLength; ++i) {
|
|
61966
|
+
series.add(list[i]);
|
|
61967
|
+
}
|
|
61968
|
+
series.update();
|
|
61969
|
+
}
|
|
61970
|
+
}
|
|
61971
|
+
};
|
|
61972
|
+
DChartPlotAreaTwofold.prototype.addAxes = function (axis, list) {
|
|
61973
|
+
if (list != null) {
|
|
61974
|
+
for (var i = 0, imax = list.length; i < imax; ++i) {
|
|
61975
|
+
axis.add(list[i]);
|
|
61976
|
+
}
|
|
61977
|
+
}
|
|
61978
|
+
};
|
|
61979
|
+
Object.defineProperty(DChartPlotAreaTwofold.prototype, "primary", {
|
|
61980
|
+
get: function () {
|
|
61981
|
+
return this._primary;
|
|
61982
|
+
},
|
|
61983
|
+
enumerable: false,
|
|
61984
|
+
configurable: true
|
|
61985
|
+
});
|
|
61986
|
+
Object.defineProperty(DChartPlotAreaTwofold.prototype, "secondary", {
|
|
61987
|
+
get: function () {
|
|
61988
|
+
return this._secondary;
|
|
61989
|
+
},
|
|
61990
|
+
enumerable: false,
|
|
61991
|
+
configurable: true
|
|
61992
|
+
});
|
|
61993
|
+
Object.defineProperty(DChartPlotAreaTwofold.prototype, "container", {
|
|
61994
|
+
get: function () {
|
|
61995
|
+
return this.secondary.container;
|
|
61996
|
+
},
|
|
61997
|
+
enumerable: false,
|
|
61998
|
+
configurable: true
|
|
61999
|
+
});
|
|
62000
|
+
DChartPlotAreaTwofold.prototype.onContainerChange = function () {
|
|
62001
|
+
this._isViewDirty = true;
|
|
62002
|
+
this._isContainerBoundsDirty = true;
|
|
62003
|
+
this._primary.toBoundsDirty();
|
|
62004
|
+
this._secondary.toBoundsDirty();
|
|
62005
|
+
DApplications.update(this);
|
|
62006
|
+
};
|
|
62007
|
+
Object.defineProperty(DChartPlotAreaTwofold.prototype, "coordinate", {
|
|
62008
|
+
get: function () {
|
|
62009
|
+
return this._coordinate;
|
|
62010
|
+
},
|
|
62011
|
+
enumerable: false,
|
|
62012
|
+
configurable: true
|
|
62013
|
+
});
|
|
62014
|
+
Object.defineProperty(DChartPlotAreaTwofold.prototype, "series", {
|
|
62015
|
+
get: function () {
|
|
62016
|
+
return this._series;
|
|
62017
|
+
},
|
|
62018
|
+
enumerable: false,
|
|
62019
|
+
configurable: true
|
|
62020
|
+
});
|
|
62021
|
+
Object.defineProperty(DChartPlotAreaTwofold.prototype, "axis", {
|
|
62022
|
+
get: function () {
|
|
62023
|
+
return this._axis;
|
|
62024
|
+
},
|
|
62025
|
+
enumerable: false,
|
|
62026
|
+
configurable: true
|
|
62027
|
+
});
|
|
62028
|
+
DChartPlotAreaTwofold.prototype.newView = function (options) {
|
|
62029
|
+
var _this = this;
|
|
62030
|
+
var viewTarget;
|
|
62031
|
+
var toViewTarget = function () {
|
|
62032
|
+
return (viewTarget !== null && viewTarget !== void 0 ? viewTarget : (viewTarget = new DChartPlotAreaTwofoldViewTarget(_this._primary.container, _this._secondary.container)));
|
|
62033
|
+
};
|
|
62034
|
+
return new DViewImpl(this, toViewTarget, options === null || options === void 0 ? void 0 : options.view);
|
|
62035
|
+
};
|
|
62036
|
+
DChartPlotAreaTwofold.prototype.onViewDirty = function () {
|
|
62037
|
+
this._coordinate.fit();
|
|
62038
|
+
this._axis.onRender();
|
|
62039
|
+
this._series.onRender();
|
|
62040
|
+
};
|
|
62041
|
+
DChartPlotAreaTwofold.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
|
|
61025
62042
|
if (duration != null && duration <= 0) {
|
|
61026
|
-
|
|
61027
|
-
|
|
61028
|
-
|
|
62043
|
+
var primary = this.primary;
|
|
62044
|
+
primary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
|
|
62045
|
+
primary.axis.update();
|
|
62046
|
+
primary.series.update();
|
|
62047
|
+
var secondary = this.secondary;
|
|
62048
|
+
secondary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
|
|
62049
|
+
secondary.axis.update();
|
|
62050
|
+
secondary.series.update();
|
|
61029
62051
|
}
|
|
61030
62052
|
else {
|
|
61031
62053
|
this._blendDuration = duration != null ? duration : 200;
|
|
61032
62054
|
this._blendStartTime = Date.now();
|
|
61033
|
-
coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
|
|
62055
|
+
this.primary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
|
|
62056
|
+
this.secondary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
|
|
61034
62057
|
var blendTimeout = this._blendTimeout;
|
|
61035
62058
|
if (blendTimeout != null) {
|
|
61036
62059
|
window.clearTimeout(blendTimeout);
|
|
@@ -61039,7 +62062,7 @@
|
|
|
61039
62062
|
}
|
|
61040
62063
|
return this;
|
|
61041
62064
|
};
|
|
61042
|
-
|
|
62065
|
+
DChartPlotAreaTwofold.prototype.onBlend = function () {
|
|
61043
62066
|
var now = Date.now();
|
|
61044
62067
|
var ratio = (now - this._blendStartTime) / this._blendDuration;
|
|
61045
62068
|
if (ratio < 1) {
|
|
@@ -61049,12 +62072,24 @@
|
|
|
61049
62072
|
this._blendTimeout = null;
|
|
61050
62073
|
ratio = 1;
|
|
61051
62074
|
}
|
|
61052
|
-
|
|
61053
|
-
this.
|
|
61054
|
-
|
|
62075
|
+
var t = DAnimationTimings.ELASTIC(ratio);
|
|
62076
|
+
var primary = this.primary;
|
|
62077
|
+
primary.coordinate.blend(t);
|
|
62078
|
+
primary.axis.update();
|
|
62079
|
+
primary.series.update();
|
|
62080
|
+
var secondary = this.secondary;
|
|
62081
|
+
secondary.coordinate.blend(t);
|
|
62082
|
+
secondary.axis.update();
|
|
62083
|
+
secondary.series.update();
|
|
62084
|
+
};
|
|
62085
|
+
DChartPlotAreaTwofold.prototype.destroy = function () {
|
|
62086
|
+
var _a, _b;
|
|
62087
|
+
(_a = this._primary) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
62088
|
+
(_b = this._secondary) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
62089
|
+
this._axis.destroy();
|
|
61055
62090
|
};
|
|
61056
|
-
return
|
|
61057
|
-
}(
|
|
62091
|
+
return DChartPlotAreaTwofold;
|
|
62092
|
+
}(DChartPlotAreaBase));
|
|
61058
62093
|
|
|
61059
62094
|
/*
|
|
61060
62095
|
* Copyright (C) 2019 Toshiba Corporation
|
|
@@ -61268,18 +62303,14 @@
|
|
|
61268
62303
|
var shape = this._shape;
|
|
61269
62304
|
if (shape) {
|
|
61270
62305
|
var mappedX = mappedPosition.x;
|
|
61271
|
-
var
|
|
61272
|
-
shape.transform.position.set(mappedX, height * 0.5);
|
|
61273
|
-
shape.size.set(0, height);
|
|
61274
|
-
shape.visible =
|
|
62306
|
+
var bounds = container.plotArea.getSelectionBoundsX();
|
|
62307
|
+
shape.transform.position.set(mappedX, bounds.y + bounds.height * 0.5);
|
|
62308
|
+
shape.size.set(0, bounds.height);
|
|
62309
|
+
shape.visible = bounds.x <= mappedX && mappedX <= bounds.x + bounds.width;
|
|
61275
62310
|
return true;
|
|
61276
62311
|
}
|
|
61277
62312
|
return false;
|
|
61278
62313
|
};
|
|
61279
|
-
DChartSelectionGridlineX.prototype.isVisible = function (container, position, mappedPosition) {
|
|
61280
|
-
var x = mappedPosition.x;
|
|
61281
|
-
return 0 <= x && x <= container.plotArea.width;
|
|
61282
|
-
};
|
|
61283
62314
|
DChartSelectionGridlineX.prototype.getType = function () {
|
|
61284
62315
|
return "DChartSelectionGridlineX";
|
|
61285
62316
|
};
|
|
@@ -61299,18 +62330,14 @@
|
|
|
61299
62330
|
var shape = this._shape;
|
|
61300
62331
|
if (shape) {
|
|
61301
62332
|
var mappedY = mappedPosition.y;
|
|
61302
|
-
var
|
|
61303
|
-
shape.transform.position.set(width * 0.5, mappedY);
|
|
61304
|
-
shape.size.set(width, 0);
|
|
61305
|
-
shape.visible =
|
|
62333
|
+
var bounds = container.plotArea.getSelectionBoundsY();
|
|
62334
|
+
shape.transform.position.set(bounds.x + bounds.width * 0.5, mappedY);
|
|
62335
|
+
shape.size.set(bounds.width, 0);
|
|
62336
|
+
shape.visible = bounds.y <= mappedY && mappedY <= bounds.y + bounds.height;
|
|
61306
62337
|
return true;
|
|
61307
62338
|
}
|
|
61308
62339
|
return false;
|
|
61309
62340
|
};
|
|
61310
|
-
DChartSelectionGridlineY.prototype.isVisible = function (container, position, mappedPosition) {
|
|
61311
|
-
var y = mappedPosition.y;
|
|
61312
|
-
return 0 <= y && y <= container.plotArea.height;
|
|
61313
|
-
};
|
|
61314
62341
|
DChartSelectionGridlineY.prototype.getType = function () {
|
|
61315
62342
|
return "DChartSelectionGridlineY";
|
|
61316
62343
|
};
|
|
@@ -61338,8 +62365,11 @@
|
|
|
61338
62365
|
DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition) {
|
|
61339
62366
|
var x = mappedPosition.x;
|
|
61340
62367
|
var y = mappedPosition.y;
|
|
61341
|
-
var
|
|
61342
|
-
return
|
|
62368
|
+
var bounds = container.plotArea.getPixelBounds();
|
|
62369
|
+
return (bounds.x <= x &&
|
|
62370
|
+
x <= bounds.x + bounds.width &&
|
|
62371
|
+
bounds.y <= y &&
|
|
62372
|
+
y <= bounds.y + bounds.height);
|
|
61343
62373
|
};
|
|
61344
62374
|
DChartSelectionMarker.prototype.getType = function () {
|
|
61345
62375
|
return "DChartSelectionMarker";
|
|
@@ -62965,7 +63995,7 @@
|
|
|
62965
63995
|
var p1x = NaN;
|
|
62966
63996
|
var p1y = NaN;
|
|
62967
63997
|
var threshold = 0.00001;
|
|
62968
|
-
var bounds = container.plotArea.
|
|
63998
|
+
var bounds = container.plotArea.getContainerBounds();
|
|
62969
63999
|
if (babs <= aabs) {
|
|
62970
64000
|
var xfrom = xcoordinate.unmap(xcoordinate.transform.unmap(bounds.x));
|
|
62971
64001
|
var xto = xcoordinate.unmap(xcoordinate.transform.unmap(bounds.x + bounds.width));
|
|
@@ -63130,10 +64160,8 @@
|
|
|
63130
64160
|
DChart.prototype.init = function (options) {
|
|
63131
64161
|
var _a;
|
|
63132
64162
|
_super.prototype.init.call(this, options);
|
|
63133
|
-
// Plot area
|
|
63134
|
-
var plotArea = this.plotArea;
|
|
63135
|
-
this.addChild(plotArea);
|
|
63136
64163
|
// Overflow mask
|
|
64164
|
+
var plotArea = this.plotArea;
|
|
63137
64165
|
var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : this.theme.isOverflowMaskEnabled();
|
|
63138
64166
|
if (mask) {
|
|
63139
64167
|
plotArea.axis.container.mask = this.getOverflowMask();
|
|
@@ -63149,22 +64177,25 @@
|
|
|
63149
64177
|
};
|
|
63150
64178
|
Object.defineProperty(DChart.prototype, "plotArea", {
|
|
63151
64179
|
get: function () {
|
|
63152
|
-
var
|
|
63153
|
-
|
|
63154
|
-
result = this.newPlotArea();
|
|
63155
|
-
this._plotArea = result;
|
|
63156
|
-
}
|
|
63157
|
-
return result;
|
|
64180
|
+
var _a;
|
|
64181
|
+
return ((_a = this._plotArea) !== null && _a !== void 0 ? _a : (this._plotArea = this.newPlotArea()));
|
|
63158
64182
|
},
|
|
63159
64183
|
enumerable: false,
|
|
63160
64184
|
configurable: true
|
|
63161
64185
|
});
|
|
63162
64186
|
DChart.prototype.newPlotArea = function () {
|
|
63163
64187
|
var _a;
|
|
63164
|
-
|
|
63165
|
-
|
|
63166
|
-
|
|
63167
|
-
|
|
64188
|
+
var plotArea = (_a = this._options) === null || _a === void 0 ? void 0 : _a.plotArea;
|
|
64189
|
+
if (plotArea != null && ("primary" in plotArea || "secondary" in plotArea)) {
|
|
64190
|
+
var result = new DChartPlotAreaTwofold(this, plotArea);
|
|
64191
|
+
this.addChild(result);
|
|
64192
|
+
return result;
|
|
64193
|
+
}
|
|
64194
|
+
else {
|
|
64195
|
+
var result = new DChartPlotAreaOnefold(this, plotArea);
|
|
64196
|
+
this.addChild(result);
|
|
64197
|
+
return result;
|
|
64198
|
+
}
|
|
63168
64199
|
};
|
|
63169
64200
|
DChart.prototype.destroy = function () {
|
|
63170
64201
|
var _a;
|
|
@@ -63173,6 +64204,9 @@
|
|
|
63173
64204
|
_super.prototype.destroy.call(this);
|
|
63174
64205
|
}
|
|
63175
64206
|
};
|
|
64207
|
+
DChart.prototype.getType = function () {
|
|
64208
|
+
return "DChart";
|
|
64209
|
+
};
|
|
63176
64210
|
return DChart;
|
|
63177
64211
|
}(DBase));
|
|
63178
64212
|
|
|
@@ -79071,6 +80105,7 @@
|
|
|
79071
80105
|
DynamicFontAtlasFont: DynamicFontAtlasFont,
|
|
79072
80106
|
DynamicFontAtlas: DynamicFontAtlas,
|
|
79073
80107
|
DynamicFontAtlases: DynamicFontAtlases,
|
|
80108
|
+
DynamicSDFFontAtlasFont: DynamicSDFFontAtlasFont,
|
|
79074
80109
|
DynamicSDFFontAtlas: DynamicSDFFontAtlas,
|
|
79075
80110
|
DynamicSDFFontAtlases: DynamicSDFFontAtlases,
|
|
79076
80111
|
DynamicSDFFontGenerator: DynamicSDFFontGenerator,
|
|
@@ -79236,8 +80271,21 @@
|
|
|
79236
80271
|
DChartLegendItem: DChartLegendItem,
|
|
79237
80272
|
DChartLegend: DChartLegend,
|
|
79238
80273
|
DChartOverview: DChartOverview,
|
|
80274
|
+
DChartPlotAreaBase: DChartPlotAreaBase,
|
|
79239
80275
|
DChartPlotAreaContainer: DChartPlotAreaContainer,
|
|
79240
|
-
|
|
80276
|
+
DChartPlotAreaOnefold: DChartPlotAreaOnefold,
|
|
80277
|
+
DChartPlotAreaTwofoldAxisContainer: DChartPlotAreaTwofoldAxisContainer,
|
|
80278
|
+
DChartPlotAreaTwofoldCoorinateContainerSub: DChartPlotAreaTwofoldCoorinateContainerSub,
|
|
80279
|
+
DChartPlotAreaTwofoldCoorinateContainer: DChartPlotAreaTwofoldCoorinateContainer,
|
|
80280
|
+
DChartPlotAreaTwofoldOverflowMaskPrimary: DChartPlotAreaTwofoldOverflowMaskPrimary,
|
|
80281
|
+
DChartPlotAreaTwofoldOverflowMaskSecondary: DChartPlotAreaTwofoldOverflowMaskSecondary,
|
|
80282
|
+
DChartPlotAreaTwofoldSeriesContainer: DChartPlotAreaTwofoldSeriesContainer,
|
|
80283
|
+
DChartPlotAreaTwofoldSubBase: DChartPlotAreaTwofoldSubBase,
|
|
80284
|
+
DChartPlotAreaTwofoldSubPrimary: DChartPlotAreaTwofoldSubPrimary,
|
|
80285
|
+
DChartPlotAreaTwofoldSubSecondary: DChartPlotAreaTwofoldSubSecondary,
|
|
80286
|
+
DChartPlotAreaTwofoldViewTargetPoint: DChartPlotAreaTwofoldViewTargetPoint,
|
|
80287
|
+
DChartPlotAreaTwofoldViewTarget: DChartPlotAreaTwofoldViewTarget,
|
|
80288
|
+
DChartPlotAreaTwofold: DChartPlotAreaTwofold,
|
|
79241
80289
|
DChartRegionImplObservable: DChartRegionImplObservable,
|
|
79242
80290
|
DChartRegionImpl: DChartRegionImpl,
|
|
79243
80291
|
DChartSelectionContainerImpl: DChartSelectionContainerImpl,
|