@wcardinal/wcardinal-ui 0.282.0 → 0.283.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-bar.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-bar.d.ts +20 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-options-parser.d.ts +19 -24
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +29 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-major-gridline.d.ts +19 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-major.d.ts +20 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-minor.d.ts +17 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base.d.ts +11 -19
- package/dist/types/wcardinal/ui/d-chart-axis-container-impl.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-chart-axis-container.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-chart-axis-tick-container.d.ts +7 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-major-gridline.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-major.d.ts +7 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-minor.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis.d.ts +4 -0
- package/dist/wcardinal/ui/d-chart-axis-bar.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-bar.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js +105 -0
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js +3 -7
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +225 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js +83 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js +89 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +75 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base.js +35 -388
- package/dist/wcardinal/ui/d-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-container-impl.js +5 -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-tick-container.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-major-gridline.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-major-gridline.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-major.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-major.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-minor.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-minor.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +488 -286
- package/dist/wcardinal-ui.js +488 -286
- 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.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.283.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -31636,7 +31636,7 @@ var DDialogTime = /** @class */ (function (_super) {
|
|
|
31636
31636
|
* Copyright (C) 2019 Toshiba Corporation
|
|
31637
31637
|
* SPDX-License-Identifier: Apache-2.0
|
|
31638
31638
|
*/
|
|
31639
|
-
var isNaN = function (target) {
|
|
31639
|
+
var isNaN$1 = function (target) {
|
|
31640
31640
|
return target !== target;
|
|
31641
31641
|
};
|
|
31642
31642
|
|
|
@@ -31726,7 +31726,7 @@ var EShapeActionRuntimeOpenDialogTime = /** @class */ (function (_super) {
|
|
|
31726
31726
|
EShapeActionRuntimeOpenDialogTime.prototype.toNumber = function (value, min, max) {
|
|
31727
31727
|
if (value != null) {
|
|
31728
31728
|
var num = +value;
|
|
31729
|
-
if (!isNaN(num)) {
|
|
31729
|
+
if (!isNaN$1(num)) {
|
|
31730
31730
|
return Math.min(max, Math.max(min, num));
|
|
31731
31731
|
}
|
|
31732
31732
|
}
|
|
@@ -45028,8 +45028,8 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45028
45028
|
this.grid.snap(px, x);
|
|
45029
45029
|
this.grid.snap(py, y);
|
|
45030
45030
|
//
|
|
45031
|
-
result.x = isNaN(x.distance) ? NaN : x.result;
|
|
45032
|
-
result.y = isNaN(y.distance) ? NaN : y.result;
|
|
45031
|
+
result.x = isNaN$1(x.distance) ? NaN : x.result;
|
|
45032
|
+
result.y = isNaN$1(y.distance) ? NaN : y.result;
|
|
45033
45033
|
return result;
|
|
45034
45034
|
};
|
|
45035
45035
|
ESnapper.prototype.toSnapped = function (point, result) {
|
|
@@ -45039,7 +45039,7 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45039
45039
|
this.snap(point, result);
|
|
45040
45040
|
var x = result.x;
|
|
45041
45041
|
var y = result.y;
|
|
45042
|
-
result.set(isNaN(x) ? px : x, isNaN(y) ? py : y);
|
|
45042
|
+
result.set(isNaN$1(x) ? px : x, isNaN$1(y) ? py : y);
|
|
45043
45043
|
}
|
|
45044
45044
|
else {
|
|
45045
45045
|
result.set(px, py);
|
|
@@ -45059,23 +45059,23 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45059
45059
|
workTranslate.set(point.x + dx, point.y + dy);
|
|
45060
45060
|
this.snap(workTranslate, workTranslate);
|
|
45061
45061
|
// X
|
|
45062
|
-
if (!isNaN(workTranslate.x)) {
|
|
45062
|
+
if (!isNaN$1(workTranslate.x)) {
|
|
45063
45063
|
var newDx = workTranslate.x - point.x;
|
|
45064
|
-
if (isNaN(x) || Math.abs(newDx - dx) < Math.abs(x - dx)) {
|
|
45064
|
+
if (isNaN$1(x) || Math.abs(newDx - dx) < Math.abs(x - dx)) {
|
|
45065
45065
|
x = newDx;
|
|
45066
45066
|
}
|
|
45067
45067
|
}
|
|
45068
45068
|
// Y
|
|
45069
|
-
if (!isNaN(workTranslate.y)) {
|
|
45069
|
+
if (!isNaN$1(workTranslate.y)) {
|
|
45070
45070
|
var newDy = workTranslate.y - point.y;
|
|
45071
|
-
if (isNaN(y) || Math.abs(newDy - dy) < Math.abs(y - dy)) {
|
|
45071
|
+
if (isNaN$1(y) || Math.abs(newDy - dy) < Math.abs(y - dy)) {
|
|
45072
45072
|
y = newDy;
|
|
45073
45073
|
}
|
|
45074
45074
|
}
|
|
45075
45075
|
}
|
|
45076
45076
|
}
|
|
45077
|
-
result.x = isNaN(x) ? dx : x;
|
|
45078
|
-
result.y = isNaN(y) ? dy : y;
|
|
45077
|
+
result.x = isNaN$1(x) ? dx : x;
|
|
45078
|
+
result.y = isNaN$1(y) ? dy : y;
|
|
45079
45079
|
return result;
|
|
45080
45080
|
};
|
|
45081
45081
|
ESnapper.prototype.prepareForRotate = function (modifier) {
|
|
@@ -45173,7 +45173,7 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45173
45173
|
ESnapper.prototype.setScaleSnappedResult = function (distance, length, move, axis, // true => x axis, false y axis
|
|
45174
45174
|
result) {
|
|
45175
45175
|
if (EPSILON < length) {
|
|
45176
|
-
if (isNaN(result.distance) || distance < result.distance) {
|
|
45176
|
+
if (isNaN$1(result.distance) || distance < result.distance) {
|
|
45177
45177
|
result.distance = distance;
|
|
45178
45178
|
var newScale = 1 + move / length;
|
|
45179
45179
|
if (axis) {
|
|
@@ -45194,7 +45194,7 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45194
45194
|
var x = work.x;
|
|
45195
45195
|
var y = work.y;
|
|
45196
45196
|
// X coordinate
|
|
45197
|
-
if (!isNaN(x)) {
|
|
45197
|
+
if (!isNaN$1(x)) {
|
|
45198
45198
|
var nx = Math.abs(normal.x);
|
|
45199
45199
|
if (EPSILON < nx) {
|
|
45200
45200
|
var dx = (x - tx) / normal.x;
|
|
@@ -45204,7 +45204,7 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45204
45204
|
}
|
|
45205
45205
|
}
|
|
45206
45206
|
// Y coordinate
|
|
45207
|
-
if (!isNaN(y)) {
|
|
45207
|
+
if (!isNaN$1(y)) {
|
|
45208
45208
|
var ny = Math.abs(normal.y);
|
|
45209
45209
|
if (EPSILON < ny) {
|
|
45210
45210
|
var dy = (y - ty) / normal.y;
|
|
@@ -45228,8 +45228,8 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45228
45228
|
this.snap(work, work);
|
|
45229
45229
|
var x = work.x;
|
|
45230
45230
|
var y = work.y;
|
|
45231
|
-
if (isNaN(x)) {
|
|
45232
|
-
if (isNaN(y)) {
|
|
45231
|
+
if (isNaN$1(x)) {
|
|
45232
|
+
if (isNaN$1(y)) {
|
|
45233
45233
|
return;
|
|
45234
45234
|
}
|
|
45235
45235
|
else {
|
|
@@ -45237,7 +45237,7 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45237
45237
|
}
|
|
45238
45238
|
}
|
|
45239
45239
|
else {
|
|
45240
|
-
if (isNaN(y)) {
|
|
45240
|
+
if (isNaN$1(y)) {
|
|
45241
45241
|
y = ty;
|
|
45242
45242
|
}
|
|
45243
45243
|
}
|
|
@@ -45257,7 +45257,7 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45257
45257
|
var dx = x - tx;
|
|
45258
45258
|
var dy = y - ty;
|
|
45259
45259
|
var distance = Math.abs(dx * dx + dy * dy);
|
|
45260
|
-
if (isNaN(result.distance) || distance < result.distance) {
|
|
45260
|
+
if (isNaN$1(result.distance) || distance < result.distance) {
|
|
45261
45261
|
result.distance = distance;
|
|
45262
45262
|
var mdx = x - point.x;
|
|
45263
45263
|
var mdy = y - point.y;
|
|
@@ -45312,7 +45312,7 @@ var ESnapper = /** @class */ (function (_super) {
|
|
|
45312
45312
|
this.calcScaleSnappedXY(transform, points[2], points[3], points[1], normals, lengths, work);
|
|
45313
45313
|
break;
|
|
45314
45314
|
}
|
|
45315
|
-
if (!isNaN(work.distance)) {
|
|
45315
|
+
if (!isNaN$1(work.distance)) {
|
|
45316
45316
|
scale.copyFrom(work.scale);
|
|
45317
45317
|
if (keepRatio) {
|
|
45318
45318
|
switch (anchor) {
|
|
@@ -72447,8 +72447,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72447
72447
|
var _a;
|
|
72448
72448
|
return {
|
|
72449
72449
|
style: (_a = options === null || options === void 0 ? void 0 : options.style) !== null && _a !== void 0 ? _a : theme.getStyle(),
|
|
72450
|
-
stroke: this.toBarStroke(theme, options === null || options === void 0 ? void 0 : options.stroke)
|
|
72451
|
-
shape: undefined
|
|
72450
|
+
stroke: this.toBarStroke(theme, options === null || options === void 0 ? void 0 : options.stroke)
|
|
72452
72451
|
};
|
|
72453
72452
|
};
|
|
72454
72453
|
DChartAxisBaseOptionParser.prototype.toTickContainer = function (theme, options) {
|
|
@@ -72480,7 +72479,6 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72480
72479
|
stroke: stroke,
|
|
72481
72480
|
text: this.toMajorTickText(theme, major === null || major === void 0 ? void 0 : major.text),
|
|
72482
72481
|
formatter: this.toMajorTickFormatter(theme, major),
|
|
72483
|
-
shapes: undefined,
|
|
72484
72482
|
gridline: this.toTickMajorGridline(theme, major === null || major === void 0 ? void 0 : major.gridline, optionsStyle, optionsStroke)
|
|
72485
72483
|
};
|
|
72486
72484
|
};
|
|
@@ -72490,8 +72488,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72490
72488
|
return {
|
|
72491
72489
|
enable: (_c = options === null || options === void 0 ? void 0 : options.enable) !== null && _c !== void 0 ? _c : theme.getMajorTickGridlineEnable(),
|
|
72492
72490
|
style: style,
|
|
72493
|
-
stroke: this.toTickMajorGridlineStroke(theme, options === null || options === void 0 ? void 0 : options.stroke, optionsStroke)
|
|
72494
|
-
shapes: undefined
|
|
72491
|
+
stroke: this.toTickMajorGridlineStroke(theme, options === null || options === void 0 ? void 0 : options.stroke, optionsStroke)
|
|
72495
72492
|
};
|
|
72496
72493
|
};
|
|
72497
72494
|
DChartAxisBaseOptionParser.prototype.toTickPosition = function (tickPosition) {
|
|
@@ -72536,8 +72533,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72536
72533
|
size: (_g = minor === null || minor === void 0 ? void 0 : minor.size) !== null && _g !== void 0 ? _g : theme.getMinorTickSize(),
|
|
72537
72534
|
position: this.toTickPosition(position),
|
|
72538
72535
|
style: style,
|
|
72539
|
-
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke)
|
|
72540
|
-
shapes: undefined
|
|
72536
|
+
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke)
|
|
72541
72537
|
};
|
|
72542
72538
|
};
|
|
72543
72539
|
DChartAxisBaseOptionParser.prototype.toBarStroke = function (theme, options) {
|
|
@@ -72760,55 +72756,83 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72760
72756
|
* Copyright (C) 2019 Toshiba Corporation
|
|
72761
72757
|
* SPDX-License-Identifier: Apache-2.0
|
|
72762
72758
|
*/
|
|
72763
|
-
var
|
|
72764
|
-
function
|
|
72765
|
-
|
|
72766
|
-
this._theme = theme;
|
|
72759
|
+
var DChartAxisBaseBar = /** @class */ (function () {
|
|
72760
|
+
function DChartAxisBaseBar(parser) {
|
|
72761
|
+
this._parser = parser;
|
|
72767
72762
|
this._index = 0;
|
|
72768
|
-
var parser = new DChartAxisBaseOptionParser(theme, options);
|
|
72769
|
-
this._coordinateIndex = parser.coordinateIndex;
|
|
72770
|
-
this._padding = parser.padding;
|
|
72771
|
-
this._position = parser.position;
|
|
72772
|
-
var tick = parser.tick;
|
|
72773
|
-
this._tick = tick;
|
|
72774
|
-
this._label = parser.label;
|
|
72775
|
-
this._bar = parser.bar;
|
|
72776
|
-
this._majorTicks = [];
|
|
72777
|
-
this._minorTicks = [];
|
|
72778
72763
|
}
|
|
72779
|
-
Object.defineProperty(
|
|
72764
|
+
Object.defineProperty(DChartAxisBaseBar.prototype, "shape", {
|
|
72780
72765
|
get: function () {
|
|
72781
|
-
|
|
72766
|
+
var result = this._shape;
|
|
72767
|
+
if (result == null) {
|
|
72768
|
+
result = this.newShape();
|
|
72769
|
+
this._shape = result;
|
|
72770
|
+
}
|
|
72771
|
+
return result;
|
|
72782
72772
|
},
|
|
72783
72773
|
enumerable: false,
|
|
72784
72774
|
configurable: true
|
|
72785
72775
|
});
|
|
72786
|
-
|
|
72787
|
-
var
|
|
72788
|
-
var
|
|
72789
|
-
|
|
72776
|
+
DChartAxisBaseBar.prototype.newShape = function () {
|
|
72777
|
+
var _a;
|
|
72778
|
+
var parser = this._parser;
|
|
72779
|
+
var bar = parser.bar;
|
|
72780
|
+
var result = new EShapeBar();
|
|
72781
|
+
result.points.position = this.newShapePosition();
|
|
72782
|
+
result.points.style = (_a = bar.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
|
|
72783
|
+
result.stroke.copy(bar.stroke);
|
|
72784
|
+
result.text.copy(parser.label);
|
|
72785
|
+
return result;
|
|
72786
|
+
};
|
|
72787
|
+
DChartAxisBaseBar.prototype.newShapePosition = function () {
|
|
72788
|
+
switch (this._parser.position) {
|
|
72789
|
+
case DChartAxisPosition.LEFT:
|
|
72790
|
+
case DChartAxisPosition.RIGHT:
|
|
72791
|
+
return EShapeBarPosition.TOP;
|
|
72792
|
+
default:
|
|
72793
|
+
return EShapeBarPosition.LEFT;
|
|
72794
|
+
}
|
|
72795
|
+
};
|
|
72796
|
+
DChartAxisBaseBar.prototype.bind = function (container, index) {
|
|
72797
|
+
this._container = container;
|
|
72798
|
+
this._index = index;
|
|
72799
|
+
this.shape.attach(container.container);
|
|
72800
|
+
};
|
|
72801
|
+
DChartAxisBaseBar.prototype.unbind = function () {
|
|
72802
|
+
var shape = this._shape;
|
|
72803
|
+
if (shape != null) {
|
|
72804
|
+
shape.detach();
|
|
72805
|
+
}
|
|
72806
|
+
this._index = 0;
|
|
72807
|
+
this._container = undefined;
|
|
72808
|
+
};
|
|
72809
|
+
DChartAxisBaseBar.prototype.update = function () {
|
|
72810
|
+
var container = this._container;
|
|
72811
|
+
var index = this._index;
|
|
72812
|
+
var shape = this._shape;
|
|
72813
|
+
if (shape != null && container != null) {
|
|
72790
72814
|
var plotArea = container.plotArea;
|
|
72791
72815
|
var plotAreaWidth = plotArea.width;
|
|
72792
72816
|
var plotAreaHeight = plotArea.height;
|
|
72793
|
-
var
|
|
72817
|
+
var offset = this._parser.padding * index;
|
|
72794
72818
|
shape.disallowUploadedUpdate();
|
|
72795
72819
|
var position = shape.transform.position;
|
|
72796
72820
|
var size = shape.size;
|
|
72797
|
-
switch (this.
|
|
72821
|
+
switch (this._parser.position) {
|
|
72798
72822
|
case DChartAxisPosition.TOP:
|
|
72799
|
-
position.set(plotAreaWidth * 0.5, 0 -
|
|
72823
|
+
position.set(plotAreaWidth * 0.5, 0 - offset);
|
|
72800
72824
|
size.set(plotAreaWidth, 0);
|
|
72801
72825
|
break;
|
|
72802
72826
|
case DChartAxisPosition.BOTTOM:
|
|
72803
|
-
position.set(plotAreaWidth * 0.5, plotAreaHeight +
|
|
72827
|
+
position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
|
|
72804
72828
|
size.set(plotAreaWidth, 0);
|
|
72805
72829
|
break;
|
|
72806
72830
|
case DChartAxisPosition.LEFT:
|
|
72807
|
-
position.set(0 -
|
|
72831
|
+
position.set(0 - offset, plotAreaHeight * 0.5);
|
|
72808
72832
|
size.set(0, plotAreaHeight);
|
|
72809
72833
|
break;
|
|
72810
72834
|
case DChartAxisPosition.RIGHT:
|
|
72811
|
-
position.set(plotAreaWidth +
|
|
72835
|
+
position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
|
|
72812
72836
|
size.set(0, plotAreaHeight);
|
|
72813
72837
|
break;
|
|
72814
72838
|
}
|
|
@@ -72817,8 +72841,342 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
72817
72841
|
}
|
|
72818
72842
|
return false;
|
|
72819
72843
|
};
|
|
72820
|
-
|
|
72821
|
-
var
|
|
72844
|
+
DChartAxisBaseBar.prototype.destroy = function () {
|
|
72845
|
+
var shape = this._shape;
|
|
72846
|
+
if (shape != null) {
|
|
72847
|
+
shape.destroy();
|
|
72848
|
+
}
|
|
72849
|
+
this._index = 0;
|
|
72850
|
+
this._container = undefined;
|
|
72851
|
+
};
|
|
72852
|
+
return DChartAxisBaseBar;
|
|
72853
|
+
}());
|
|
72854
|
+
|
|
72855
|
+
var DChartAxisBaseTickMajorGridline = /** @class */ (function () {
|
|
72856
|
+
function DChartAxisBaseTickMajorGridline(parser) {
|
|
72857
|
+
this._parser = parser;
|
|
72858
|
+
this._index = 0;
|
|
72859
|
+
}
|
|
72860
|
+
Object.defineProperty(DChartAxisBaseTickMajorGridline.prototype, "shapes", {
|
|
72861
|
+
get: function () {
|
|
72862
|
+
var result = this._shapes;
|
|
72863
|
+
if (result == null) {
|
|
72864
|
+
result = this.newShapes();
|
|
72865
|
+
this._shapes = result;
|
|
72866
|
+
}
|
|
72867
|
+
return result;
|
|
72868
|
+
},
|
|
72869
|
+
enumerable: false,
|
|
72870
|
+
configurable: true
|
|
72871
|
+
});
|
|
72872
|
+
DChartAxisBaseTickMajorGridline.prototype.newShapes = function () {
|
|
72873
|
+
var _a;
|
|
72874
|
+
var result = [];
|
|
72875
|
+
var tick = this._parser.tick;
|
|
72876
|
+
var major = tick.major;
|
|
72877
|
+
var gridline = major.gridline;
|
|
72878
|
+
if (tick.enable && gridline.enable) {
|
|
72879
|
+
var capacity = major.capacity;
|
|
72880
|
+
var style = (_a = gridline.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
|
|
72881
|
+
var position = this.newShapePosition();
|
|
72882
|
+
for (var i = 0; i < capacity; ++i) {
|
|
72883
|
+
var shape = new EShapeBar();
|
|
72884
|
+
shape.points.position = position;
|
|
72885
|
+
shape.points.style = style;
|
|
72886
|
+
shape.stroke.copy(gridline.stroke);
|
|
72887
|
+
result.push(shape);
|
|
72888
|
+
}
|
|
72889
|
+
}
|
|
72890
|
+
return result;
|
|
72891
|
+
};
|
|
72892
|
+
DChartAxisBaseTickMajorGridline.prototype.newShapePosition = function () {
|
|
72893
|
+
switch (this._parser.position) {
|
|
72894
|
+
case DChartAxisPosition.LEFT:
|
|
72895
|
+
case DChartAxisPosition.RIGHT:
|
|
72896
|
+
return EShapeBarPosition.LEFT;
|
|
72897
|
+
default:
|
|
72898
|
+
return EShapeBarPosition.TOP;
|
|
72899
|
+
}
|
|
72900
|
+
};
|
|
72901
|
+
DChartAxisBaseTickMajorGridline.prototype.bind = function (container, index) {
|
|
72902
|
+
this._container = container;
|
|
72903
|
+
this._index = index;
|
|
72904
|
+
var shapes = this.shapes;
|
|
72905
|
+
var containerContainer = container.container;
|
|
72906
|
+
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
72907
|
+
shapes[i].attach(containerContainer);
|
|
72908
|
+
}
|
|
72909
|
+
};
|
|
72910
|
+
DChartAxisBaseTickMajorGridline.prototype.unbind = function () {
|
|
72911
|
+
var shapes = this._shapes;
|
|
72912
|
+
if (shapes != null) {
|
|
72913
|
+
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
72914
|
+
shapes[i].detach();
|
|
72915
|
+
}
|
|
72916
|
+
}
|
|
72917
|
+
this._index = 0;
|
|
72918
|
+
this._container = undefined;
|
|
72919
|
+
};
|
|
72920
|
+
DChartAxisBaseTickMajorGridline.prototype.destroy = function () {
|
|
72921
|
+
var shapes = this._shapes;
|
|
72922
|
+
if (shapes != null) {
|
|
72923
|
+
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
72924
|
+
shapes[i].destroy();
|
|
72925
|
+
}
|
|
72926
|
+
}
|
|
72927
|
+
this._index = 0;
|
|
72928
|
+
this._container = undefined;
|
|
72929
|
+
};
|
|
72930
|
+
return DChartAxisBaseTickMajorGridline;
|
|
72931
|
+
}());
|
|
72932
|
+
|
|
72933
|
+
var DChartAxisBaseTickMajor = /** @class */ (function () {
|
|
72934
|
+
function DChartAxisBaseTickMajor(parser) {
|
|
72935
|
+
this._parser = parser;
|
|
72936
|
+
this._index = 0;
|
|
72937
|
+
this._gridline = new DChartAxisBaseTickMajorGridline(parser);
|
|
72938
|
+
}
|
|
72939
|
+
Object.defineProperty(DChartAxisBaseTickMajor.prototype, "shapes", {
|
|
72940
|
+
get: function () {
|
|
72941
|
+
var result = this._shapes;
|
|
72942
|
+
if (result == null) {
|
|
72943
|
+
result = this.newShapes();
|
|
72944
|
+
this._shapes = result;
|
|
72945
|
+
}
|
|
72946
|
+
return result;
|
|
72947
|
+
},
|
|
72948
|
+
enumerable: false,
|
|
72949
|
+
configurable: true
|
|
72950
|
+
});
|
|
72951
|
+
DChartAxisBaseTickMajor.prototype.newShapes = function () {
|
|
72952
|
+
var _a;
|
|
72953
|
+
var result = [];
|
|
72954
|
+
var tick = this._parser.tick;
|
|
72955
|
+
if (tick.enable) {
|
|
72956
|
+
var major = tick.major;
|
|
72957
|
+
var capacity = major.capacity;
|
|
72958
|
+
var size = major.size;
|
|
72959
|
+
var position = major.position;
|
|
72960
|
+
var style = (_a = major.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
|
|
72961
|
+
for (var i = 0; i < capacity; ++i) {
|
|
72962
|
+
var shape = new EShapeBar();
|
|
72963
|
+
shape.points.position = position;
|
|
72964
|
+
shape.points.size = size;
|
|
72965
|
+
shape.points.style = style;
|
|
72966
|
+
shape.stroke.copy(major.stroke);
|
|
72967
|
+
shape.text.copy(major.text);
|
|
72968
|
+
shape.size.set(0, 0);
|
|
72969
|
+
result.push(shape);
|
|
72970
|
+
}
|
|
72971
|
+
}
|
|
72972
|
+
return result;
|
|
72973
|
+
};
|
|
72974
|
+
Object.defineProperty(DChartAxisBaseTickMajor.prototype, "gridline", {
|
|
72975
|
+
get: function () {
|
|
72976
|
+
return this._gridline;
|
|
72977
|
+
},
|
|
72978
|
+
enumerable: false,
|
|
72979
|
+
configurable: true
|
|
72980
|
+
});
|
|
72981
|
+
DChartAxisBaseTickMajor.prototype.bind = function (container, index) {
|
|
72982
|
+
this._container = container;
|
|
72983
|
+
this._index = index;
|
|
72984
|
+
// Gridline
|
|
72985
|
+
this._gridline.bind(container, index);
|
|
72986
|
+
// Ticks
|
|
72987
|
+
var shapes = this.shapes;
|
|
72988
|
+
var containerContainer = container.container;
|
|
72989
|
+
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
72990
|
+
shapes[i].attach(containerContainer);
|
|
72991
|
+
}
|
|
72992
|
+
};
|
|
72993
|
+
DChartAxisBaseTickMajor.prototype.unbind = function () {
|
|
72994
|
+
var shapes = this._shapes;
|
|
72995
|
+
if (shapes != null) {
|
|
72996
|
+
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
72997
|
+
shapes[i].detach();
|
|
72998
|
+
}
|
|
72999
|
+
}
|
|
73000
|
+
this._gridline.unbind();
|
|
73001
|
+
this._index = 0;
|
|
73002
|
+
this._container = undefined;
|
|
73003
|
+
};
|
|
73004
|
+
DChartAxisBaseTickMajor.prototype.destroy = function () {
|
|
73005
|
+
var shapes = this._shapes;
|
|
73006
|
+
if (shapes != null) {
|
|
73007
|
+
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
73008
|
+
shapes[i].destroy();
|
|
73009
|
+
}
|
|
73010
|
+
}
|
|
73011
|
+
this._gridline.destroy();
|
|
73012
|
+
this._index = 0;
|
|
73013
|
+
this._container = undefined;
|
|
73014
|
+
};
|
|
73015
|
+
return DChartAxisBaseTickMajor;
|
|
73016
|
+
}());
|
|
73017
|
+
|
|
73018
|
+
var DChartAxisBaseTickMinor = /** @class */ (function () {
|
|
73019
|
+
function DChartAxisBaseTickMinor(parser) {
|
|
73020
|
+
this._parser = parser;
|
|
73021
|
+
this._index = 0;
|
|
73022
|
+
}
|
|
73023
|
+
Object.defineProperty(DChartAxisBaseTickMinor.prototype, "shapes", {
|
|
73024
|
+
get: function () {
|
|
73025
|
+
var result = this._shapes;
|
|
73026
|
+
if (result == null) {
|
|
73027
|
+
result = this.newShapes();
|
|
73028
|
+
this._shapes = result;
|
|
73029
|
+
}
|
|
73030
|
+
return result;
|
|
73031
|
+
},
|
|
73032
|
+
enumerable: false,
|
|
73033
|
+
configurable: true
|
|
73034
|
+
});
|
|
73035
|
+
DChartAxisBaseTickMinor.prototype.newShapes = function () {
|
|
73036
|
+
var _a;
|
|
73037
|
+
var result = [];
|
|
73038
|
+
var tick = this._parser.tick;
|
|
73039
|
+
if (tick.enable) {
|
|
73040
|
+
var minor = tick.minor;
|
|
73041
|
+
var count = minor.count;
|
|
73042
|
+
var size = minor.size;
|
|
73043
|
+
var position = minor.position;
|
|
73044
|
+
var style = (_a = minor.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
|
|
73045
|
+
var major = tick.major;
|
|
73046
|
+
for (var i = 0, imax = (major.capacity + 1) * count; i < imax; ++i) {
|
|
73047
|
+
var shape = new EShapeBar();
|
|
73048
|
+
shape.points.position = position;
|
|
73049
|
+
shape.points.size = size;
|
|
73050
|
+
shape.points.style = style;
|
|
73051
|
+
shape.stroke.copy(minor.stroke);
|
|
73052
|
+
shape.size.set(0, 0);
|
|
73053
|
+
result.push(shape);
|
|
73054
|
+
}
|
|
73055
|
+
}
|
|
73056
|
+
return result;
|
|
73057
|
+
};
|
|
73058
|
+
DChartAxisBaseTickMinor.prototype.bind = function (container, index) {
|
|
73059
|
+
this._container = container;
|
|
73060
|
+
this._index = index;
|
|
73061
|
+
var shapes = this.shapes;
|
|
73062
|
+
var containerContainer = container.container;
|
|
73063
|
+
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
73064
|
+
shapes[i].attach(containerContainer);
|
|
73065
|
+
}
|
|
73066
|
+
};
|
|
73067
|
+
DChartAxisBaseTickMinor.prototype.unbind = function () {
|
|
73068
|
+
var shapes = this._shapes;
|
|
73069
|
+
if (shapes != null) {
|
|
73070
|
+
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
73071
|
+
shapes[i].detach();
|
|
73072
|
+
}
|
|
73073
|
+
}
|
|
73074
|
+
this._index = 0;
|
|
73075
|
+
this._container = undefined;
|
|
73076
|
+
};
|
|
73077
|
+
DChartAxisBaseTickMinor.prototype.destroy = function () {
|
|
73078
|
+
var shapes = this._shapes;
|
|
73079
|
+
if (shapes != null) {
|
|
73080
|
+
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
73081
|
+
shapes[i].destroy();
|
|
73082
|
+
}
|
|
73083
|
+
}
|
|
73084
|
+
this._index = 0;
|
|
73085
|
+
this._container = undefined;
|
|
73086
|
+
};
|
|
73087
|
+
return DChartAxisBaseTickMinor;
|
|
73088
|
+
}());
|
|
73089
|
+
|
|
73090
|
+
var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
73091
|
+
function DChartAxisBaseTickContainer(parser) {
|
|
73092
|
+
this._parser = parser;
|
|
73093
|
+
this._index = 0;
|
|
73094
|
+
this._major = new DChartAxisBaseTickMajor(parser);
|
|
73095
|
+
this._minor = new DChartAxisBaseTickMinor(parser);
|
|
73096
|
+
this._majorTicks = [];
|
|
73097
|
+
this._minorTicks = [];
|
|
73098
|
+
}
|
|
73099
|
+
Object.defineProperty(DChartAxisBaseTickContainer.prototype, "major", {
|
|
73100
|
+
get: function () {
|
|
73101
|
+
return this._major;
|
|
73102
|
+
},
|
|
73103
|
+
enumerable: false,
|
|
73104
|
+
configurable: true
|
|
73105
|
+
});
|
|
73106
|
+
Object.defineProperty(DChartAxisBaseTickContainer.prototype, "minor", {
|
|
73107
|
+
get: function () {
|
|
73108
|
+
return this._minor;
|
|
73109
|
+
},
|
|
73110
|
+
enumerable: false,
|
|
73111
|
+
configurable: true
|
|
73112
|
+
});
|
|
73113
|
+
DChartAxisBaseTickContainer.prototype.bind = function (container, index) {
|
|
73114
|
+
this._container = container;
|
|
73115
|
+
this._index = index;
|
|
73116
|
+
this._major.bind(container, index);
|
|
73117
|
+
this._minor.bind(container, index);
|
|
73118
|
+
};
|
|
73119
|
+
DChartAxisBaseTickContainer.prototype.unbind = function () {
|
|
73120
|
+
this._minor.unbind();
|
|
73121
|
+
this._major.unbind();
|
|
73122
|
+
this._index = 0;
|
|
73123
|
+
this._container = undefined;
|
|
73124
|
+
};
|
|
73125
|
+
DChartAxisBaseTickContainer.prototype.update = function () {
|
|
73126
|
+
var container = this._container;
|
|
73127
|
+
var majorShapes = this._major.shapes;
|
|
73128
|
+
var minorShapes = this._minor.shapes;
|
|
73129
|
+
if (container != null && majorShapes && minorShapes) {
|
|
73130
|
+
var plotArea = container.plotArea;
|
|
73131
|
+
var bounds = plotArea.getBoundsInContainer();
|
|
73132
|
+
var transform = plotArea.container.transform.localTransform;
|
|
73133
|
+
var gridlineShapes = this._major.gridline.shapes;
|
|
73134
|
+
var parser = this._parser;
|
|
73135
|
+
var offset = parser.padding * this._index;
|
|
73136
|
+
var coordinate = void 0;
|
|
73137
|
+
switch (parser.position) {
|
|
73138
|
+
case DChartAxisPosition.TOP:
|
|
73139
|
+
coordinate = plotArea.coordinate.x.get(parser.coordinateIndex);
|
|
73140
|
+
if (coordinate) {
|
|
73141
|
+
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
|
|
73142
|
+
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
|
|
73143
|
+
var plotAreaHeight = plotArea.height;
|
|
73144
|
+
return this.updateX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaHeight);
|
|
73145
|
+
}
|
|
73146
|
+
break;
|
|
73147
|
+
case DChartAxisPosition.BOTTOM:
|
|
73148
|
+
coordinate = plotArea.coordinate.x.get(parser.coordinateIndex);
|
|
73149
|
+
if (coordinate) {
|
|
73150
|
+
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
|
|
73151
|
+
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
|
|
73152
|
+
var plotAreaHeight = plotArea.height;
|
|
73153
|
+
return this.updateX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + offset, transform, plotAreaHeight);
|
|
73154
|
+
}
|
|
73155
|
+
break;
|
|
73156
|
+
case DChartAxisPosition.LEFT:
|
|
73157
|
+
coordinate = plotArea.coordinate.y.get(parser.coordinateIndex);
|
|
73158
|
+
if (coordinate) {
|
|
73159
|
+
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
|
|
73160
|
+
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
|
|
73161
|
+
var plotAreaWidth = plotArea.width;
|
|
73162
|
+
return this.updateY(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaWidth);
|
|
73163
|
+
}
|
|
73164
|
+
break;
|
|
73165
|
+
case DChartAxisPosition.RIGHT:
|
|
73166
|
+
coordinate = plotArea.coordinate.y.get(parser.coordinateIndex);
|
|
73167
|
+
if (coordinate) {
|
|
73168
|
+
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
|
|
73169
|
+
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
|
|
73170
|
+
var plotAreaWidth = plotArea.width;
|
|
73171
|
+
return this.updateY(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaWidth + offset, transform, plotAreaWidth);
|
|
73172
|
+
}
|
|
73173
|
+
break;
|
|
73174
|
+
}
|
|
73175
|
+
}
|
|
73176
|
+
return false;
|
|
73177
|
+
};
|
|
73178
|
+
DChartAxisBaseTickContainer.prototype.updateX = function (domainMin, domainMax, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionY, transform, plotAreaHeight) {
|
|
73179
|
+
var tick = this._parser.tick;
|
|
72822
73180
|
var majorTick = tick.major;
|
|
72823
73181
|
var majorCount = majorTick.count;
|
|
72824
73182
|
var majorCapacity = majorTick.capacity;
|
|
@@ -72879,8 +73237,8 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
72879
73237
|
}
|
|
72880
73238
|
return true;
|
|
72881
73239
|
};
|
|
72882
|
-
|
|
72883
|
-
var tick = this.
|
|
73240
|
+
DChartAxisBaseTickContainer.prototype.updateY = function (domainMin, domainMax, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaWidth) {
|
|
73241
|
+
var tick = this._parser.tick;
|
|
72884
73242
|
var majorTick = tick.major;
|
|
72885
73243
|
var majorCount = majorTick.count;
|
|
72886
73244
|
var majorCapacity = majorTick.capacity;
|
|
@@ -72941,235 +73299,79 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
72941
73299
|
}
|
|
72942
73300
|
return true;
|
|
72943
73301
|
};
|
|
72944
|
-
|
|
72945
|
-
|
|
72946
|
-
|
|
72947
|
-
|
|
72948
|
-
|
|
72949
|
-
var plotArea = container.plotArea;
|
|
72950
|
-
var bounds = plotArea.getBoundsInContainer();
|
|
72951
|
-
var transform = plotArea.container.transform.localTransform;
|
|
72952
|
-
var gridlineShapes = tick.major.gridline.shapes;
|
|
72953
|
-
var coordinateIndex = this._coordinateIndex;
|
|
72954
|
-
var padding = this._padding * this._index;
|
|
72955
|
-
var coordinate = void 0;
|
|
72956
|
-
switch (this._position) {
|
|
72957
|
-
case DChartAxisPosition.TOP:
|
|
72958
|
-
coordinate = plotArea.coordinate.x.get(coordinateIndex);
|
|
72959
|
-
if (coordinate) {
|
|
72960
|
-
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
|
|
72961
|
-
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
|
|
72962
|
-
var plotAreaHeight = plotArea.height;
|
|
72963
|
-
return this.updateTicksX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - padding, transform, plotAreaHeight);
|
|
72964
|
-
}
|
|
72965
|
-
break;
|
|
72966
|
-
case DChartAxisPosition.BOTTOM:
|
|
72967
|
-
coordinate = plotArea.coordinate.x.get(coordinateIndex);
|
|
72968
|
-
if (coordinate) {
|
|
72969
|
-
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
|
|
72970
|
-
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
|
|
72971
|
-
var plotAreaHeight = plotArea.height;
|
|
72972
|
-
return this.updateTicksX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + padding, transform, plotAreaHeight);
|
|
72973
|
-
}
|
|
72974
|
-
break;
|
|
72975
|
-
case DChartAxisPosition.LEFT:
|
|
72976
|
-
coordinate = plotArea.coordinate.y.get(coordinateIndex);
|
|
72977
|
-
if (coordinate) {
|
|
72978
|
-
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
|
|
72979
|
-
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
|
|
72980
|
-
var plotAreaWidth = plotArea.width;
|
|
72981
|
-
return this.updateTicksY(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - padding, transform, plotAreaWidth);
|
|
72982
|
-
}
|
|
72983
|
-
break;
|
|
72984
|
-
case DChartAxisPosition.RIGHT:
|
|
72985
|
-
coordinate = plotArea.coordinate.y.get(coordinateIndex);
|
|
72986
|
-
if (coordinate) {
|
|
72987
|
-
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
|
|
72988
|
-
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
|
|
72989
|
-
var plotAreaWidth = plotArea.width;
|
|
72990
|
-
return this.updateTicksY(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaWidth + padding, transform, plotAreaWidth);
|
|
72991
|
-
}
|
|
72992
|
-
break;
|
|
72993
|
-
}
|
|
72994
|
-
}
|
|
72995
|
-
return false;
|
|
73302
|
+
DChartAxisBaseTickContainer.prototype.destroy = function () {
|
|
73303
|
+
this._major.destroy();
|
|
73304
|
+
this._minor.destroy();
|
|
73305
|
+
this._index = 0;
|
|
73306
|
+
this._container = undefined;
|
|
72996
73307
|
};
|
|
73308
|
+
return DChartAxisBaseTickContainer;
|
|
73309
|
+
}());
|
|
73310
|
+
|
|
73311
|
+
/*
|
|
73312
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
73313
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
73314
|
+
*/
|
|
73315
|
+
var DChartAxisBase = /** @class */ (function () {
|
|
73316
|
+
function DChartAxisBase(options) {
|
|
73317
|
+
var theme = this.toTheme(options);
|
|
73318
|
+
this._theme = theme;
|
|
73319
|
+
var parser = new DChartAxisBaseOptionParser(theme, options);
|
|
73320
|
+
this._parser = parser;
|
|
73321
|
+
this._index = 0;
|
|
73322
|
+
this._bar = new DChartAxisBaseBar(parser);
|
|
73323
|
+
this._tick = new DChartAxisBaseTickContainer(parser);
|
|
73324
|
+
}
|
|
73325
|
+
Object.defineProperty(DChartAxisBase.prototype, "position", {
|
|
73326
|
+
get: function () {
|
|
73327
|
+
return this._parser.position;
|
|
73328
|
+
},
|
|
73329
|
+
enumerable: false,
|
|
73330
|
+
configurable: true
|
|
73331
|
+
});
|
|
73332
|
+
Object.defineProperty(DChartAxisBase.prototype, "bar", {
|
|
73333
|
+
get: function () {
|
|
73334
|
+
return this._bar;
|
|
73335
|
+
},
|
|
73336
|
+
enumerable: false,
|
|
73337
|
+
configurable: true
|
|
73338
|
+
});
|
|
73339
|
+
Object.defineProperty(DChartAxisBase.prototype, "tick", {
|
|
73340
|
+
get: function () {
|
|
73341
|
+
return this._tick;
|
|
73342
|
+
},
|
|
73343
|
+
enumerable: false,
|
|
73344
|
+
configurable: true
|
|
73345
|
+
});
|
|
72997
73346
|
DChartAxisBase.prototype.bind = function (container, index) {
|
|
72998
73347
|
this._container = container;
|
|
72999
73348
|
this._index = index;
|
|
73000
|
-
|
|
73001
|
-
|
|
73002
|
-
var bar = this._bar;
|
|
73003
|
-
var barShape = bar.shape;
|
|
73004
|
-
if (!barShape) {
|
|
73005
|
-
var position = this._position;
|
|
73006
|
-
var barPosition = position === DChartAxisPosition.LEFT || position === DChartAxisPosition.RIGHT
|
|
73007
|
-
? EShapeBarPosition.TOP
|
|
73008
|
-
: EShapeBarPosition.LEFT;
|
|
73009
|
-
var barStyle = bar.style || EShapePointsStyle.NONE;
|
|
73010
|
-
barShape = new EShapeBar();
|
|
73011
|
-
barShape.points.position = barPosition;
|
|
73012
|
-
barShape.points.style = barStyle;
|
|
73013
|
-
barShape.stroke.copy(bar.stroke);
|
|
73014
|
-
barShape.text.copy(this._label);
|
|
73015
|
-
this._bar.shape = barShape;
|
|
73016
|
-
}
|
|
73017
|
-
barShape.attach(container.container);
|
|
73018
|
-
// Major tick gridline
|
|
73019
|
-
var tick = this._tick;
|
|
73020
|
-
var tickMajor = tick.major;
|
|
73021
|
-
var gridline = tickMajor.gridline;
|
|
73022
|
-
var gridlineShapes = gridline.shapes;
|
|
73023
|
-
if (!gridlineShapes && tick.enable && gridline.enable) {
|
|
73024
|
-
gridlineShapes = [];
|
|
73025
|
-
gridline.shapes = gridlineShapes;
|
|
73026
|
-
var position = this._position;
|
|
73027
|
-
var gridlinePosition = position === DChartAxisPosition.LEFT || position === DChartAxisPosition.RIGHT
|
|
73028
|
-
? EShapeBarPosition.LEFT
|
|
73029
|
-
: EShapeBarPosition.TOP;
|
|
73030
|
-
var gridlineCapacity = tickMajor.capacity;
|
|
73031
|
-
var gridlineStyle = gridline.style || EShapePointsStyle.NONE;
|
|
73032
|
-
for (var i = 0; i < gridlineCapacity; ++i) {
|
|
73033
|
-
var gridlineShape = new EShapeBar();
|
|
73034
|
-
gridlineShape.points.position = gridlinePosition;
|
|
73035
|
-
gridlineShape.points.style = gridlineStyle;
|
|
73036
|
-
gridlineShape.stroke.copy(gridline.stroke);
|
|
73037
|
-
gridlineShapes.push(gridlineShape);
|
|
73038
|
-
}
|
|
73039
|
-
}
|
|
73040
|
-
if (gridlineShapes) {
|
|
73041
|
-
for (var i = 0, imax = gridlineShapes.length; i < imax; ++i) {
|
|
73042
|
-
gridlineShapes[i].attach(tickShapeContainer);
|
|
73043
|
-
}
|
|
73044
|
-
}
|
|
73045
|
-
// Major ticks
|
|
73046
|
-
var tickMajorShapes = tickMajor.shapes;
|
|
73047
|
-
if (!tickMajorShapes && tick.enable) {
|
|
73048
|
-
tickMajorShapes = [];
|
|
73049
|
-
tickMajor.shapes = tickMajorShapes;
|
|
73050
|
-
var tickMajorCapacity = tickMajor.capacity;
|
|
73051
|
-
var tickMajorSize = tickMajor.size;
|
|
73052
|
-
var tickMajorPosition = tickMajor.position;
|
|
73053
|
-
var tickMajorStyle = tickMajor.style || EShapePointsStyle.NONE;
|
|
73054
|
-
for (var i = 0; i < tickMajorCapacity; ++i) {
|
|
73055
|
-
var tickMajorShape = new EShapeBar();
|
|
73056
|
-
tickMajorShape.points.position = tickMajorPosition;
|
|
73057
|
-
tickMajorShape.points.size = tickMajorSize;
|
|
73058
|
-
tickMajorShape.points.style = tickMajorStyle;
|
|
73059
|
-
tickMajorShape.stroke.copy(tickMajor.stroke);
|
|
73060
|
-
tickMajorShape.text.copy(tickMajor.text);
|
|
73061
|
-
tickMajorShape.size.set(0, 0);
|
|
73062
|
-
tickMajorShapes.push(tickMajorShape);
|
|
73063
|
-
}
|
|
73064
|
-
}
|
|
73065
|
-
if (tickMajorShapes) {
|
|
73066
|
-
for (var i = 0, imax = tickMajorShapes.length; i < imax; ++i) {
|
|
73067
|
-
tickMajorShapes[i].attach(tickShapeContainer);
|
|
73068
|
-
}
|
|
73069
|
-
}
|
|
73070
|
-
// Minor ticks
|
|
73071
|
-
var tickMinor = tick.minor;
|
|
73072
|
-
var tickMinorShapes = tickMinor.shapes;
|
|
73073
|
-
if (!tickMinorShapes && tick.enable) {
|
|
73074
|
-
tickMinorShapes = [];
|
|
73075
|
-
tickMinor.shapes = tickMinorShapes;
|
|
73076
|
-
var tickMinorCount = tickMinor.count;
|
|
73077
|
-
var tickMinorSize = tickMinor.size;
|
|
73078
|
-
var tickMinorPosition = tickMinor.position;
|
|
73079
|
-
var tickMinorStyle = tickMinor.style || EShapePointsStyle.NONE;
|
|
73080
|
-
for (var i = 0, imax = (tickMajor.capacity + 1) * tickMinorCount; i < imax; ++i) {
|
|
73081
|
-
var tickMinorShape = new EShapeBar();
|
|
73082
|
-
tickMinorShape.points.position = tickMinorPosition;
|
|
73083
|
-
tickMinorShape.points.size = tickMinorSize;
|
|
73084
|
-
tickMinorShape.points.style = tickMinorStyle;
|
|
73085
|
-
tickMinorShape.stroke.copy(tickMinor.stroke);
|
|
73086
|
-
tickMinorShape.size.set(0, 0);
|
|
73087
|
-
tickMinorShapes.push(tickMinorShape);
|
|
73088
|
-
}
|
|
73089
|
-
}
|
|
73090
|
-
if (tickMinorShapes) {
|
|
73091
|
-
for (var i = 0, imax = tickMinorShapes.length; i < imax; ++i) {
|
|
73092
|
-
tickMinorShapes[i].attach(tickShapeContainer);
|
|
73093
|
-
}
|
|
73094
|
-
}
|
|
73349
|
+
this._bar.bind(container, index);
|
|
73350
|
+
this._tick.bind(container, index);
|
|
73095
73351
|
};
|
|
73096
73352
|
DChartAxisBase.prototype.unbind = function () {
|
|
73097
|
-
|
|
73098
|
-
|
|
73099
|
-
|
|
73100
|
-
barShape.detach();
|
|
73101
|
-
}
|
|
73102
|
-
// Major ticks
|
|
73103
|
-
var tick = this._tick;
|
|
73104
|
-
var tickMajorShapes = tick.major.shapes;
|
|
73105
|
-
if (tickMajorShapes) {
|
|
73106
|
-
for (var i = 0, imax = tickMajorShapes.length; i < imax; ++i) {
|
|
73107
|
-
tickMajorShapes[i].detach();
|
|
73108
|
-
}
|
|
73109
|
-
}
|
|
73110
|
-
// Major tick gridlines
|
|
73111
|
-
var tickMajorGridlineShapes = tick.major.gridline.shapes;
|
|
73112
|
-
if (tickMajorGridlineShapes) {
|
|
73113
|
-
for (var i = 0, imax = tickMajorGridlineShapes.length; i < imax; ++i) {
|
|
73114
|
-
tickMajorGridlineShapes[i].detach();
|
|
73115
|
-
}
|
|
73116
|
-
}
|
|
73117
|
-
// Minor ticks
|
|
73118
|
-
var tickMinorShapes = tick.minor.shapes;
|
|
73119
|
-
if (tickMinorShapes) {
|
|
73120
|
-
for (var i = 0, imax = tickMinorShapes.length; i < imax; ++i) {
|
|
73121
|
-
tickMinorShapes[i].detach();
|
|
73122
|
-
}
|
|
73123
|
-
}
|
|
73124
|
-
//
|
|
73353
|
+
this._tick.unbind();
|
|
73354
|
+
this._bar.unbind();
|
|
73355
|
+
this._index = 0;
|
|
73125
73356
|
this._container = undefined;
|
|
73126
73357
|
};
|
|
73127
73358
|
DChartAxisBase.prototype.update = function () {
|
|
73128
|
-
var
|
|
73129
|
-
|
|
73130
|
-
|
|
73131
|
-
var
|
|
73132
|
-
if (
|
|
73359
|
+
var isBarUpdated = this._bar.update();
|
|
73360
|
+
var isTicksUpdated = this._tick.update();
|
|
73361
|
+
if (isBarUpdated || isTicksUpdated) {
|
|
73362
|
+
var container = this._container;
|
|
73363
|
+
if (container) {
|
|
73133
73364
|
DApplications.update(container.plotArea);
|
|
73134
73365
|
}
|
|
73135
73366
|
}
|
|
73136
73367
|
};
|
|
73137
73368
|
DChartAxisBase.prototype.onRender = function () {
|
|
73138
|
-
|
|
73139
|
-
|
|
73140
|
-
this.updateBar(container);
|
|
73141
|
-
this.updateTicks(container);
|
|
73142
|
-
}
|
|
73369
|
+
this._bar.update();
|
|
73370
|
+
this._tick.update();
|
|
73143
73371
|
};
|
|
73144
73372
|
DChartAxisBase.prototype.destroy = function () {
|
|
73145
|
-
|
|
73146
|
-
|
|
73147
|
-
if (barShape) {
|
|
73148
|
-
barShape.destroy();
|
|
73149
|
-
}
|
|
73150
|
-
// Major ticks
|
|
73151
|
-
var tick = this._tick;
|
|
73152
|
-
var tickMajorShapes = tick.major.shapes;
|
|
73153
|
-
if (tickMajorShapes) {
|
|
73154
|
-
for (var i = 0, imax = tickMajorShapes.length; i < imax; ++i) {
|
|
73155
|
-
tickMajorShapes[i].destroy();
|
|
73156
|
-
}
|
|
73157
|
-
}
|
|
73158
|
-
// Major tick gridlines
|
|
73159
|
-
var tickMajorGridlineShapes = tick.major.gridline.shapes;
|
|
73160
|
-
if (tickMajorGridlineShapes) {
|
|
73161
|
-
for (var i = 0, imax = tickMajorGridlineShapes.length; i < imax; ++i) {
|
|
73162
|
-
tickMajorGridlineShapes[i].destroy();
|
|
73163
|
-
}
|
|
73164
|
-
}
|
|
73165
|
-
// Minor ticks
|
|
73166
|
-
var tickMinorShapes = tick.minor.shapes;
|
|
73167
|
-
if (tickMinorShapes) {
|
|
73168
|
-
for (var i = 0, imax = tickMinorShapes.length; i < imax; ++i) {
|
|
73169
|
-
tickMinorShapes[i].destroy();
|
|
73170
|
-
}
|
|
73171
|
-
}
|
|
73172
|
-
//
|
|
73373
|
+
this._bar.destroy();
|
|
73374
|
+
this._tick.destroy();
|
|
73173
73375
|
this._container = undefined;
|
|
73174
73376
|
};
|
|
73175
73377
|
DChartAxisBase.prototype.toTheme = function (options) {
|
|
@@ -73226,7 +73428,7 @@ var DChartAxisContainerImpl = /** @class */ (function () {
|
|
|
73226
73428
|
};
|
|
73227
73429
|
DChartAxisContainerImpl.prototype.get = function (position, index) {
|
|
73228
73430
|
var list = this._list;
|
|
73229
|
-
var axes = list.get(position);
|
|
73431
|
+
var axes = list.get(toEnum(position, DChartAxisPosition));
|
|
73230
73432
|
if (axes) {
|
|
73231
73433
|
if (0 <= index && index < axes.length) {
|
|
73232
73434
|
return axes[index];
|
|
@@ -73244,7 +73446,7 @@ var DChartAxisContainerImpl = /** @class */ (function () {
|
|
|
73244
73446
|
};
|
|
73245
73447
|
DChartAxisContainerImpl.prototype.clear = function (position) {
|
|
73246
73448
|
var list = this._list;
|
|
73247
|
-
var axes = list.get(position);
|
|
73449
|
+
var axes = list.get(toEnum(position, DChartAxisPosition));
|
|
73248
73450
|
if (axes) {
|
|
73249
73451
|
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
73250
73452
|
axes[i].destroy();
|
|
@@ -73255,7 +73457,7 @@ var DChartAxisContainerImpl = /** @class */ (function () {
|
|
|
73255
73457
|
};
|
|
73256
73458
|
DChartAxisContainerImpl.prototype.size = function (position) {
|
|
73257
73459
|
var list = this._list;
|
|
73258
|
-
var axes = list.get(position);
|
|
73460
|
+
var axes = list.get(toEnum(position, DChartAxisPosition));
|
|
73259
73461
|
if (axes) {
|
|
73260
73462
|
return axes.length;
|
|
73261
73463
|
}
|
|
@@ -73822,11 +74024,11 @@ var DChartRegionImpl = /** @class */ (function () {
|
|
|
73822
74024
|
return this;
|
|
73823
74025
|
};
|
|
73824
74026
|
DChartRegionImpl.prototype.add = function (from, to) {
|
|
73825
|
-
if (!isNaN(from)) {
|
|
73826
|
-
this.from = isNaN(this.from) ? from : Math.min(this.from, from);
|
|
74027
|
+
if (!isNaN$1(from)) {
|
|
74028
|
+
this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
73827
74029
|
}
|
|
73828
|
-
if (!isNaN(to)) {
|
|
73829
|
-
this.to = isNaN(this.to) ? to : Math.max(this.to, to);
|
|
74030
|
+
if (!isNaN$1(to)) {
|
|
74031
|
+
this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
73830
74032
|
}
|
|
73831
74033
|
return this;
|
|
73832
74034
|
};
|
|
@@ -73947,7 +74149,7 @@ var DChartCoordinateLinear = /** @class */ (function () {
|
|
|
73947
74149
|
DChartCoordinateLinear.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
|
|
73948
74150
|
var regionFrom = region.from;
|
|
73949
74151
|
var regionTo = region.to;
|
|
73950
|
-
if (!(isNaN(regionFrom) || isNaN(regionTo))) {
|
|
74152
|
+
if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
|
|
73951
74153
|
// Scale
|
|
73952
74154
|
var newScale = 1;
|
|
73953
74155
|
var regionSize = regionTo - regionFrom;
|
|
@@ -74246,7 +74448,7 @@ var DChartCoordinateLog = /** @class */ (function () {
|
|
|
74246
74448
|
DChartCoordinateLog.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
|
|
74247
74449
|
var regionFrom = region.from;
|
|
74248
74450
|
var regionTo = region.to;
|
|
74249
|
-
if (!(isNaN(regionFrom) || isNaN(regionTo))) {
|
|
74451
|
+
if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
|
|
74250
74452
|
// Scale
|
|
74251
74453
|
var newScale = 1;
|
|
74252
74454
|
var regionFromMapped = this.map(regionFrom);
|
|
@@ -75042,13 +75244,13 @@ var DChartRegionImplObservable = /** @class */ (function () {
|
|
|
75042
75244
|
DChartRegionImplObservable.prototype.set = function (from, to) {
|
|
75043
75245
|
var isChanged = false;
|
|
75044
75246
|
if (from != null && this._from !== from) {
|
|
75045
|
-
if (!isNaN(this._from) || !isNaN(from)) {
|
|
75247
|
+
if (!isNaN$1(this._from) || !isNaN$1(from)) {
|
|
75046
75248
|
this._from = from;
|
|
75047
75249
|
isChanged = true;
|
|
75048
75250
|
}
|
|
75049
75251
|
}
|
|
75050
75252
|
if (to != null && this._to !== to) {
|
|
75051
|
-
if (!isNaN(this._to) || !isNaN(to)) {
|
|
75253
|
+
if (!isNaN$1(this._to) || !isNaN$1(to)) {
|
|
75052
75254
|
this._to = to;
|
|
75053
75255
|
isChanged = true;
|
|
75054
75256
|
}
|
|
@@ -75060,12 +75262,12 @@ var DChartRegionImplObservable = /** @class */ (function () {
|
|
|
75060
75262
|
};
|
|
75061
75263
|
DChartRegionImplObservable.prototype.add = function (from, to) {
|
|
75062
75264
|
var newFrom;
|
|
75063
|
-
if (!isNaN(from)) {
|
|
75064
|
-
newFrom = isNaN(this.from) ? from : Math.min(this.from, from);
|
|
75265
|
+
if (!isNaN$1(from)) {
|
|
75266
|
+
newFrom = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
75065
75267
|
}
|
|
75066
75268
|
var newTo;
|
|
75067
|
-
if (!isNaN(to)) {
|
|
75068
|
-
newTo = isNaN(this.to) ? to : Math.max(this.to, to);
|
|
75269
|
+
if (!isNaN$1(to)) {
|
|
75270
|
+
newTo = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
75069
75271
|
}
|
|
75070
75272
|
return this.set(newFrom, newTo);
|
|
75071
75273
|
};
|
|
@@ -92356,7 +92558,7 @@ exports.hitTestTriangleFilled = hitTestTriangleFilled;
|
|
|
92356
92558
|
exports.hitTestTriangleRounded = hitTestTriangleRounded;
|
|
92357
92559
|
exports.isArray = isArray;
|
|
92358
92560
|
exports.isFunction = isFunction;
|
|
92359
|
-
exports.isNaN = isNaN;
|
|
92561
|
+
exports.isNaN = isNaN$1;
|
|
92360
92562
|
exports.isNumber = isNumber;
|
|
92361
92563
|
exports.isObject = isObject;
|
|
92362
92564
|
exports.isShapeClipperExLoaded = isShapeClipperExLoaded;
|