@wcardinal/wcardinal-ui 0.289.0 → 0.291.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-options-parser.d.ts +23 -12
- package/dist/types/wcardinal/ui/d-chart-axis-base-options.d.ts +12 -4
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +13 -4
- package/dist/types/wcardinal/ui/d-chart-axis-base.d.ts +5 -4
- package/dist/types/wcardinal/ui/d-chart-axis-tick-container.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-major.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-minor.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +52 -0
- package/dist/types/wcardinal/ui/d-chart-coordinate-linear.d.ts +4 -46
- package/dist/types/wcardinal/ui/d-chart-coordinate-log.d.ts +4 -42
- package/dist/types/wcardinal/ui/d-table-body.d.ts +7 -0
- package/dist/types/wcardinal/ui/index.d.ts +11 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.d.ts +7 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.d.ts +7 -0
- package/dist/wcardinal/ui/d-chart-axis-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js +123 -23
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-options.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +65 -44
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base.js +17 -3
- package/dist/wcardinal/ui/d-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-major.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-minor.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-base.js +186 -0
- package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js +2 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js +9 -165
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js +2 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log.js +9 -153
- package/dist/wcardinal/ui/d-chart-coordinate-log.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-line-of-any.js +4 -2
- package/dist/wcardinal/ui/d-chart-series-line-of-any.js.map +1 -1
- package/dist/wcardinal/ui/d-scroll-bar-vertical.js +1 -0
- package/dist/wcardinal/ui/d-scroll-bar-vertical.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body.js +39 -0
- package/dist/wcardinal/ui/d-table-body.js.map +1 -1
- package/dist/wcardinal/ui/d-table.js +3 -3
- package/dist/wcardinal/ui/d-table.js.map +1 -1
- package/dist/wcardinal/ui/index.js +11 -0
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js +21 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js +21 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +22 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +22 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +754 -641
- package/dist/wcardinal-ui.js +712 -641
- 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.291.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -48931,6 +48931,27 @@ var DThemeWhiteChartAxisBase = /** @class */ (function () {
|
|
|
48931
48931
|
DThemeWhiteChartAxisBase.prototype.getMinorTickStyle = function () {
|
|
48932
48932
|
return undefined;
|
|
48933
48933
|
};
|
|
48934
|
+
DThemeWhiteChartAxisBase.prototype.getMinorTickTextAlignHorizontal = function (position) {
|
|
48935
|
+
return this.getMajorTickTextAlignHorizontal(position);
|
|
48936
|
+
};
|
|
48937
|
+
DThemeWhiteChartAxisBase.prototype.getMinorTickTextAlignVertical = function (position) {
|
|
48938
|
+
return this.getMajorTickTextAlignVertical(position);
|
|
48939
|
+
};
|
|
48940
|
+
DThemeWhiteChartAxisBase.prototype.getMinorTickTextDirection = function () {
|
|
48941
|
+
return this.getMajorTickTextDirection();
|
|
48942
|
+
};
|
|
48943
|
+
DThemeWhiteChartAxisBase.prototype.getMinorTickTextColor = function () {
|
|
48944
|
+
return this.getStrokeColor();
|
|
48945
|
+
};
|
|
48946
|
+
DThemeWhiteChartAxisBase.prototype.getMinorTickTextFormat = function () {
|
|
48947
|
+
return undefined;
|
|
48948
|
+
};
|
|
48949
|
+
DThemeWhiteChartAxisBase.prototype.getMinorTickTextPaddingHorizontal = function () {
|
|
48950
|
+
return this.getMajorTickTextPaddingHorizontal();
|
|
48951
|
+
};
|
|
48952
|
+
DThemeWhiteChartAxisBase.prototype.getMinorTickTextPaddingVertical = function () {
|
|
48953
|
+
return this.getMajorTickTextPaddingVertical();
|
|
48954
|
+
};
|
|
48934
48955
|
DThemeWhiteChartAxisBase.prototype.getMinorTickStrokeEnable = function () {
|
|
48935
48956
|
return true;
|
|
48936
48957
|
};
|
|
@@ -58070,6 +58091,27 @@ var DThemeDarkChartAxisBase = /** @class */ (function () {
|
|
|
58070
58091
|
DThemeDarkChartAxisBase.prototype.getMinorTickStyle = function () {
|
|
58071
58092
|
return undefined;
|
|
58072
58093
|
};
|
|
58094
|
+
DThemeDarkChartAxisBase.prototype.getMinorTickTextAlignHorizontal = function (position) {
|
|
58095
|
+
return this.getMajorTickTextAlignHorizontal(position);
|
|
58096
|
+
};
|
|
58097
|
+
DThemeDarkChartAxisBase.prototype.getMinorTickTextAlignVertical = function (position) {
|
|
58098
|
+
return this.getMajorTickTextAlignVertical(position);
|
|
58099
|
+
};
|
|
58100
|
+
DThemeDarkChartAxisBase.prototype.getMinorTickTextDirection = function () {
|
|
58101
|
+
return this.getMajorTickTextDirection();
|
|
58102
|
+
};
|
|
58103
|
+
DThemeDarkChartAxisBase.prototype.getMinorTickTextColor = function () {
|
|
58104
|
+
return this.getStrokeColor();
|
|
58105
|
+
};
|
|
58106
|
+
DThemeDarkChartAxisBase.prototype.getMinorTickTextFormat = function () {
|
|
58107
|
+
return undefined;
|
|
58108
|
+
};
|
|
58109
|
+
DThemeDarkChartAxisBase.prototype.getMinorTickTextPaddingHorizontal = function () {
|
|
58110
|
+
return this.getMajorTickTextPaddingHorizontal();
|
|
58111
|
+
};
|
|
58112
|
+
DThemeDarkChartAxisBase.prototype.getMinorTickTextPaddingVertical = function () {
|
|
58113
|
+
return this.getMajorTickTextPaddingVertical();
|
|
58114
|
+
};
|
|
58073
58115
|
DThemeDarkChartAxisBase.prototype.getMinorTickStrokeEnable = function () {
|
|
58074
58116
|
return true;
|
|
58075
58117
|
};
|
|
@@ -71192,6 +71234,7 @@ var DScrollBarVertical = /** @class */ (function (_super) {
|
|
|
71192
71234
|
var barLength = space * this._end + thumbMinimumLength - barStart;
|
|
71193
71235
|
thumb.position.set(0, barStart);
|
|
71194
71236
|
thumb.resize(width, barLength);
|
|
71237
|
+
thumb.updateTransform();
|
|
71195
71238
|
};
|
|
71196
71239
|
return DScrollBarVertical;
|
|
71197
71240
|
}(DScrollBar));
|
|
@@ -72438,6 +72481,106 @@ var DCanvas = /** @class */ (function (_super) {
|
|
|
72438
72481
|
return DCanvas;
|
|
72439
72482
|
}(DBase));
|
|
72440
72483
|
|
|
72484
|
+
/*
|
|
72485
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
72486
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
72487
|
+
*/
|
|
72488
|
+
var DChartAxisBaseBar = /** @class */ (function () {
|
|
72489
|
+
function DChartAxisBaseBar(parser) {
|
|
72490
|
+
this._parser = parser;
|
|
72491
|
+
this._index = 0;
|
|
72492
|
+
}
|
|
72493
|
+
Object.defineProperty(DChartAxisBaseBar.prototype, "shape", {
|
|
72494
|
+
get: function () {
|
|
72495
|
+
var result = this._shape;
|
|
72496
|
+
if (result == null) {
|
|
72497
|
+
result = this.newShape();
|
|
72498
|
+
this._shape = result;
|
|
72499
|
+
}
|
|
72500
|
+
return result;
|
|
72501
|
+
},
|
|
72502
|
+
enumerable: false,
|
|
72503
|
+
configurable: true
|
|
72504
|
+
});
|
|
72505
|
+
DChartAxisBaseBar.prototype.newShape = function () {
|
|
72506
|
+
var _a;
|
|
72507
|
+
var parser = this._parser;
|
|
72508
|
+
var bar = parser.bar;
|
|
72509
|
+
var result = new EShapeBar();
|
|
72510
|
+
result.points.position = this.newShapePosition();
|
|
72511
|
+
result.points.style = (_a = bar.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
|
|
72512
|
+
result.stroke.copy(bar.stroke);
|
|
72513
|
+
result.text.copy(parser.label);
|
|
72514
|
+
return result;
|
|
72515
|
+
};
|
|
72516
|
+
DChartAxisBaseBar.prototype.newShapePosition = function () {
|
|
72517
|
+
switch (this._parser.position) {
|
|
72518
|
+
case DChartAxisPosition.LEFT:
|
|
72519
|
+
case DChartAxisPosition.RIGHT:
|
|
72520
|
+
return EShapeBarPosition.TOP;
|
|
72521
|
+
default:
|
|
72522
|
+
return EShapeBarPosition.LEFT;
|
|
72523
|
+
}
|
|
72524
|
+
};
|
|
72525
|
+
DChartAxisBaseBar.prototype.bind = function (container, index) {
|
|
72526
|
+
this._container = container;
|
|
72527
|
+
this._index = index;
|
|
72528
|
+
this.shape.attach(container.container);
|
|
72529
|
+
};
|
|
72530
|
+
DChartAxisBaseBar.prototype.unbind = function () {
|
|
72531
|
+
var shape = this._shape;
|
|
72532
|
+
if (shape != null) {
|
|
72533
|
+
shape.detach();
|
|
72534
|
+
}
|
|
72535
|
+
this._index = 0;
|
|
72536
|
+
this._container = undefined;
|
|
72537
|
+
};
|
|
72538
|
+
DChartAxisBaseBar.prototype.update = function () {
|
|
72539
|
+
var container = this._container;
|
|
72540
|
+
var index = this._index;
|
|
72541
|
+
var shape = this._shape;
|
|
72542
|
+
if (shape != null && container != null) {
|
|
72543
|
+
var plotArea = container.plotArea;
|
|
72544
|
+
var plotAreaWidth = plotArea.width;
|
|
72545
|
+
var plotAreaHeight = plotArea.height;
|
|
72546
|
+
var offset = this._parser.padding * index;
|
|
72547
|
+
shape.disallowUploadedUpdate();
|
|
72548
|
+
var position = shape.transform.position;
|
|
72549
|
+
var size = shape.size;
|
|
72550
|
+
switch (this._parser.position) {
|
|
72551
|
+
case DChartAxisPosition.TOP:
|
|
72552
|
+
position.set(plotAreaWidth * 0.5, 0 - offset);
|
|
72553
|
+
size.set(plotAreaWidth, 0);
|
|
72554
|
+
break;
|
|
72555
|
+
case DChartAxisPosition.BOTTOM:
|
|
72556
|
+
position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
|
|
72557
|
+
size.set(plotAreaWidth, 0);
|
|
72558
|
+
break;
|
|
72559
|
+
case DChartAxisPosition.LEFT:
|
|
72560
|
+
position.set(0 - offset, plotAreaHeight * 0.5);
|
|
72561
|
+
size.set(0, plotAreaHeight);
|
|
72562
|
+
break;
|
|
72563
|
+
case DChartAxisPosition.RIGHT:
|
|
72564
|
+
position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
|
|
72565
|
+
size.set(0, plotAreaHeight);
|
|
72566
|
+
break;
|
|
72567
|
+
}
|
|
72568
|
+
shape.allowUploadedUpdate();
|
|
72569
|
+
return true;
|
|
72570
|
+
}
|
|
72571
|
+
return false;
|
|
72572
|
+
};
|
|
72573
|
+
DChartAxisBaseBar.prototype.destroy = function () {
|
|
72574
|
+
var shape = this._shape;
|
|
72575
|
+
if (shape != null) {
|
|
72576
|
+
shape.destroy();
|
|
72577
|
+
}
|
|
72578
|
+
this._index = 0;
|
|
72579
|
+
this._container = undefined;
|
|
72580
|
+
};
|
|
72581
|
+
return DChartAxisBaseBar;
|
|
72582
|
+
}());
|
|
72583
|
+
|
|
72441
72584
|
/*
|
|
72442
72585
|
* Copyright (C) 2019 Toshiba Corporation
|
|
72443
72586
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -72517,7 +72660,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72517
72660
|
return {
|
|
72518
72661
|
enable: (_a = tick === null || tick === void 0 ? void 0 : tick.enable) !== null && _a !== void 0 ? _a : theme.getTickEnable(),
|
|
72519
72662
|
major: this.toTickMajor(theme, tick),
|
|
72520
|
-
minor: this.
|
|
72663
|
+
minor: this.toTickMinor(theme, tick)
|
|
72521
72664
|
};
|
|
72522
72665
|
};
|
|
72523
72666
|
DChartAxisBaseOptionParser.prototype.toTickMajor = function (theme, options) {
|
|
@@ -72538,8 +72681,8 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72538
72681
|
position: this.toTickPosition(position),
|
|
72539
72682
|
style: style,
|
|
72540
72683
|
stroke: stroke,
|
|
72541
|
-
text: this.
|
|
72542
|
-
formatter: this.
|
|
72684
|
+
text: this.toTickMajorText(theme, major === null || major === void 0 ? void 0 : major.text),
|
|
72685
|
+
formatter: this.toTickMajorFormatter(theme, major),
|
|
72543
72686
|
gridline: this.toTickMajorGridline(theme, major === null || major === void 0 ? void 0 : major.gridline, optionsStyle, optionsStroke)
|
|
72544
72687
|
};
|
|
72545
72688
|
};
|
|
@@ -72583,7 +72726,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72583
72726
|
}
|
|
72584
72727
|
}
|
|
72585
72728
|
};
|
|
72586
|
-
DChartAxisBaseOptionParser.prototype.
|
|
72729
|
+
DChartAxisBaseOptionParser.prototype.toTickMinor = function (theme, options) {
|
|
72587
72730
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
72588
72731
|
var minor = options === null || options === void 0 ? void 0 : options.minor;
|
|
72589
72732
|
var position = (_b = (_a = minor === null || minor === void 0 ? void 0 : minor.position) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.position) !== null && _b !== void 0 ? _b : theme.getMinorTickPosition();
|
|
@@ -72594,7 +72737,9 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72594
72737
|
size: (_g = minor === null || minor === void 0 ? void 0 : minor.size) !== null && _g !== void 0 ? _g : theme.getMinorTickSize(),
|
|
72595
72738
|
position: this.toTickPosition(position),
|
|
72596
72739
|
style: style,
|
|
72597
|
-
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke)
|
|
72740
|
+
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke),
|
|
72741
|
+
text: this.toTickMinorText(theme, minor === null || minor === void 0 ? void 0 : minor.text),
|
|
72742
|
+
formatter: this.toTickMinorFormatter(theme, minor)
|
|
72598
72743
|
};
|
|
72599
72744
|
};
|
|
72600
72745
|
DChartAxisBaseOptionParser.prototype.toBarStroke = function (theme, options) {
|
|
@@ -72658,12 +72803,15 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72658
72803
|
};
|
|
72659
72804
|
}
|
|
72660
72805
|
};
|
|
72661
|
-
DChartAxisBaseOptionParser.prototype.
|
|
72806
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorFormatter = function (theme, options) {
|
|
72662
72807
|
var text = options === null || options === void 0 ? void 0 : options.text;
|
|
72663
72808
|
if (text) {
|
|
72664
|
-
var
|
|
72665
|
-
if (
|
|
72666
|
-
return
|
|
72809
|
+
var format_1 = text.format;
|
|
72810
|
+
if (format_1 === null) {
|
|
72811
|
+
return undefined;
|
|
72812
|
+
}
|
|
72813
|
+
else if (format_1 != null) {
|
|
72814
|
+
return NumberFormatters.create(format_1);
|
|
72667
72815
|
}
|
|
72668
72816
|
else {
|
|
72669
72817
|
var formatter = text.formatter;
|
|
@@ -72674,28 +72822,32 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72674
72822
|
}
|
|
72675
72823
|
}
|
|
72676
72824
|
}
|
|
72677
|
-
|
|
72825
|
+
var format = theme.getMajorTickTextFormat();
|
|
72826
|
+
if (format != null) {
|
|
72827
|
+
return NumberFormatters.create(format);
|
|
72828
|
+
}
|
|
72829
|
+
return undefined;
|
|
72678
72830
|
};
|
|
72679
|
-
DChartAxisBaseOptionParser.prototype.
|
|
72831
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorText = function (theme, options) {
|
|
72680
72832
|
options = options || {};
|
|
72681
72833
|
return {
|
|
72682
72834
|
format: options.format,
|
|
72683
|
-
color: this.
|
|
72835
|
+
color: this.toTickMajorTextColor(theme, options.color),
|
|
72684
72836
|
alpha: options.alpha,
|
|
72685
72837
|
family: options.family,
|
|
72686
72838
|
size: options.size,
|
|
72687
72839
|
weight: options.weight,
|
|
72688
|
-
align: this.
|
|
72689
|
-
offset: this.
|
|
72840
|
+
align: this.toTickMajorTextAlign(theme, options.align),
|
|
72841
|
+
offset: this.toTickMajorTextOffset(theme, options.offset),
|
|
72690
72842
|
style: options.style,
|
|
72691
|
-
outline: this.
|
|
72692
|
-
spacing: this.
|
|
72843
|
+
outline: this.toTickMajorTextOutline(theme, options.outline),
|
|
72844
|
+
spacing: this.toTickMajorTextSpacing(theme, options.spacing),
|
|
72693
72845
|
direction: this.toTickMajorTextDirection(theme, options.direction),
|
|
72694
|
-
padding: this.
|
|
72846
|
+
padding: this.toTickMajorTextPadding(theme, options.padding),
|
|
72695
72847
|
clipping: options.clipping
|
|
72696
72848
|
};
|
|
72697
72849
|
};
|
|
72698
|
-
DChartAxisBaseOptionParser.prototype.
|
|
72850
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextOutline = function (theme, options) {
|
|
72699
72851
|
if (options) {
|
|
72700
72852
|
return {
|
|
72701
72853
|
enable: options.enable,
|
|
@@ -72705,7 +72857,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72705
72857
|
};
|
|
72706
72858
|
}
|
|
72707
72859
|
};
|
|
72708
|
-
DChartAxisBaseOptionParser.prototype.
|
|
72860
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextAlign = function (theme, options) {
|
|
72709
72861
|
var _a, _b;
|
|
72710
72862
|
var position = this._position;
|
|
72711
72863
|
return {
|
|
@@ -72713,7 +72865,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72713
72865
|
vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMajorTickTextAlignVertical(position)
|
|
72714
72866
|
};
|
|
72715
72867
|
};
|
|
72716
|
-
DChartAxisBaseOptionParser.prototype.
|
|
72868
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextOffset = function (theme, options) {
|
|
72717
72869
|
if (options) {
|
|
72718
72870
|
return {
|
|
72719
72871
|
horizontal: options.horizontal,
|
|
@@ -72721,7 +72873,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72721
72873
|
};
|
|
72722
72874
|
}
|
|
72723
72875
|
};
|
|
72724
|
-
DChartAxisBaseOptionParser.prototype.
|
|
72876
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextSpacing = function (theme, options) {
|
|
72725
72877
|
if (options) {
|
|
72726
72878
|
return {
|
|
72727
72879
|
horizontal: options.horizontal,
|
|
@@ -72729,7 +72881,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72729
72881
|
};
|
|
72730
72882
|
}
|
|
72731
72883
|
};
|
|
72732
|
-
DChartAxisBaseOptionParser.prototype.
|
|
72884
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextPadding = function (theme, options) {
|
|
72733
72885
|
var _a, _b;
|
|
72734
72886
|
return {
|
|
72735
72887
|
horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMajorTickTextPaddingHorizontal(),
|
|
@@ -72739,9 +72891,100 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72739
72891
|
DChartAxisBaseOptionParser.prototype.toTickMajorTextDirection = function (theme, options) {
|
|
72740
72892
|
return options !== null && options !== void 0 ? options : theme.getMajorTickTextDirection();
|
|
72741
72893
|
};
|
|
72742
|
-
DChartAxisBaseOptionParser.prototype.
|
|
72894
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextColor = function (theme, options) {
|
|
72743
72895
|
return options !== null && options !== void 0 ? options : theme.getMajorTickTextColor();
|
|
72744
72896
|
};
|
|
72897
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorFormatter = function (theme, options) {
|
|
72898
|
+
var text = options === null || options === void 0 ? void 0 : options.text;
|
|
72899
|
+
if (text) {
|
|
72900
|
+
var format_2 = text.format;
|
|
72901
|
+
if (format_2 === null) {
|
|
72902
|
+
return undefined;
|
|
72903
|
+
}
|
|
72904
|
+
else if (format_2 != null) {
|
|
72905
|
+
return NumberFormatters.create(format_2);
|
|
72906
|
+
}
|
|
72907
|
+
else {
|
|
72908
|
+
var formatter = text.formatter;
|
|
72909
|
+
if (formatter) {
|
|
72910
|
+
return {
|
|
72911
|
+
format: formatter
|
|
72912
|
+
};
|
|
72913
|
+
}
|
|
72914
|
+
}
|
|
72915
|
+
}
|
|
72916
|
+
var format = theme.getMinorTickTextFormat();
|
|
72917
|
+
if (format != null) {
|
|
72918
|
+
return NumberFormatters.create(format);
|
|
72919
|
+
}
|
|
72920
|
+
return undefined;
|
|
72921
|
+
};
|
|
72922
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorText = function (theme, options) {
|
|
72923
|
+
options = options || {};
|
|
72924
|
+
return {
|
|
72925
|
+
format: options.format,
|
|
72926
|
+
color: this.toTickMinorTextColor(theme, options.color),
|
|
72927
|
+
alpha: options.alpha,
|
|
72928
|
+
family: options.family,
|
|
72929
|
+
size: options.size,
|
|
72930
|
+
weight: options.weight,
|
|
72931
|
+
align: this.toTickMinorTextAlign(theme, options.align),
|
|
72932
|
+
offset: this.toTickMinorTextOffset(theme, options.offset),
|
|
72933
|
+
style: options.style,
|
|
72934
|
+
outline: this.toTickMinorTextOutline(theme, options.outline),
|
|
72935
|
+
spacing: this.toTickMinorTextSpacing(theme, options.spacing),
|
|
72936
|
+
direction: this.toTickMinorTextDirection(theme, options.direction),
|
|
72937
|
+
padding: this.toTickMinorTextPadding(theme, options.padding),
|
|
72938
|
+
clipping: options.clipping
|
|
72939
|
+
};
|
|
72940
|
+
};
|
|
72941
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextOutline = function (theme, options) {
|
|
72942
|
+
if (options) {
|
|
72943
|
+
return {
|
|
72944
|
+
enable: options.enable,
|
|
72945
|
+
color: options.color,
|
|
72946
|
+
alpha: options.alpha,
|
|
72947
|
+
width: options.width
|
|
72948
|
+
};
|
|
72949
|
+
}
|
|
72950
|
+
};
|
|
72951
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextAlign = function (theme, options) {
|
|
72952
|
+
var _a, _b;
|
|
72953
|
+
var position = this._position;
|
|
72954
|
+
return {
|
|
72955
|
+
horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextAlignHorizontal(position),
|
|
72956
|
+
vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextAlignVertical(position)
|
|
72957
|
+
};
|
|
72958
|
+
};
|
|
72959
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextOffset = function (theme, options) {
|
|
72960
|
+
if (options) {
|
|
72961
|
+
return {
|
|
72962
|
+
horizontal: options.horizontal,
|
|
72963
|
+
vertical: options.vertical
|
|
72964
|
+
};
|
|
72965
|
+
}
|
|
72966
|
+
};
|
|
72967
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextSpacing = function (theme, options) {
|
|
72968
|
+
if (options) {
|
|
72969
|
+
return {
|
|
72970
|
+
horizontal: options.horizontal,
|
|
72971
|
+
vertical: options.vertical
|
|
72972
|
+
};
|
|
72973
|
+
}
|
|
72974
|
+
};
|
|
72975
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextPadding = function (theme, options) {
|
|
72976
|
+
var _a, _b;
|
|
72977
|
+
return {
|
|
72978
|
+
horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextPaddingHorizontal(),
|
|
72979
|
+
vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextPaddingVertical()
|
|
72980
|
+
};
|
|
72981
|
+
};
|
|
72982
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextDirection = function (theme, options) {
|
|
72983
|
+
return options !== null && options !== void 0 ? options : theme.getMinorTickTextDirection();
|
|
72984
|
+
};
|
|
72985
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextColor = function (theme, options) {
|
|
72986
|
+
return options !== null && options !== void 0 ? options : theme.getMinorTickTextColor();
|
|
72987
|
+
};
|
|
72745
72988
|
DChartAxisBaseOptionParser.prototype.toLabel = function (theme, options) {
|
|
72746
72989
|
var label = options === null || options === void 0 ? void 0 : options.label;
|
|
72747
72990
|
if (label) {
|
|
@@ -72813,106 +73056,6 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
72813
73056
|
return DChartAxisBaseOptionParser;
|
|
72814
73057
|
}());
|
|
72815
73058
|
|
|
72816
|
-
/*
|
|
72817
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
72818
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
72819
|
-
*/
|
|
72820
|
-
var DChartAxisBaseBar = /** @class */ (function () {
|
|
72821
|
-
function DChartAxisBaseBar(parser) {
|
|
72822
|
-
this._parser = parser;
|
|
72823
|
-
this._index = 0;
|
|
72824
|
-
}
|
|
72825
|
-
Object.defineProperty(DChartAxisBaseBar.prototype, "shape", {
|
|
72826
|
-
get: function () {
|
|
72827
|
-
var result = this._shape;
|
|
72828
|
-
if (result == null) {
|
|
72829
|
-
result = this.newShape();
|
|
72830
|
-
this._shape = result;
|
|
72831
|
-
}
|
|
72832
|
-
return result;
|
|
72833
|
-
},
|
|
72834
|
-
enumerable: false,
|
|
72835
|
-
configurable: true
|
|
72836
|
-
});
|
|
72837
|
-
DChartAxisBaseBar.prototype.newShape = function () {
|
|
72838
|
-
var _a;
|
|
72839
|
-
var parser = this._parser;
|
|
72840
|
-
var bar = parser.bar;
|
|
72841
|
-
var result = new EShapeBar();
|
|
72842
|
-
result.points.position = this.newShapePosition();
|
|
72843
|
-
result.points.style = (_a = bar.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
|
|
72844
|
-
result.stroke.copy(bar.stroke);
|
|
72845
|
-
result.text.copy(parser.label);
|
|
72846
|
-
return result;
|
|
72847
|
-
};
|
|
72848
|
-
DChartAxisBaseBar.prototype.newShapePosition = function () {
|
|
72849
|
-
switch (this._parser.position) {
|
|
72850
|
-
case DChartAxisPosition.LEFT:
|
|
72851
|
-
case DChartAxisPosition.RIGHT:
|
|
72852
|
-
return EShapeBarPosition.TOP;
|
|
72853
|
-
default:
|
|
72854
|
-
return EShapeBarPosition.LEFT;
|
|
72855
|
-
}
|
|
72856
|
-
};
|
|
72857
|
-
DChartAxisBaseBar.prototype.bind = function (container, index) {
|
|
72858
|
-
this._container = container;
|
|
72859
|
-
this._index = index;
|
|
72860
|
-
this.shape.attach(container.container);
|
|
72861
|
-
};
|
|
72862
|
-
DChartAxisBaseBar.prototype.unbind = function () {
|
|
72863
|
-
var shape = this._shape;
|
|
72864
|
-
if (shape != null) {
|
|
72865
|
-
shape.detach();
|
|
72866
|
-
}
|
|
72867
|
-
this._index = 0;
|
|
72868
|
-
this._container = undefined;
|
|
72869
|
-
};
|
|
72870
|
-
DChartAxisBaseBar.prototype.update = function () {
|
|
72871
|
-
var container = this._container;
|
|
72872
|
-
var index = this._index;
|
|
72873
|
-
var shape = this._shape;
|
|
72874
|
-
if (shape != null && container != null) {
|
|
72875
|
-
var plotArea = container.plotArea;
|
|
72876
|
-
var plotAreaWidth = plotArea.width;
|
|
72877
|
-
var plotAreaHeight = plotArea.height;
|
|
72878
|
-
var offset = this._parser.padding * index;
|
|
72879
|
-
shape.disallowUploadedUpdate();
|
|
72880
|
-
var position = shape.transform.position;
|
|
72881
|
-
var size = shape.size;
|
|
72882
|
-
switch (this._parser.position) {
|
|
72883
|
-
case DChartAxisPosition.TOP:
|
|
72884
|
-
position.set(plotAreaWidth * 0.5, 0 - offset);
|
|
72885
|
-
size.set(plotAreaWidth, 0);
|
|
72886
|
-
break;
|
|
72887
|
-
case DChartAxisPosition.BOTTOM:
|
|
72888
|
-
position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
|
|
72889
|
-
size.set(plotAreaWidth, 0);
|
|
72890
|
-
break;
|
|
72891
|
-
case DChartAxisPosition.LEFT:
|
|
72892
|
-
position.set(0 - offset, plotAreaHeight * 0.5);
|
|
72893
|
-
size.set(0, plotAreaHeight);
|
|
72894
|
-
break;
|
|
72895
|
-
case DChartAxisPosition.RIGHT:
|
|
72896
|
-
position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
|
|
72897
|
-
size.set(0, plotAreaHeight);
|
|
72898
|
-
break;
|
|
72899
|
-
}
|
|
72900
|
-
shape.allowUploadedUpdate();
|
|
72901
|
-
return true;
|
|
72902
|
-
}
|
|
72903
|
-
return false;
|
|
72904
|
-
};
|
|
72905
|
-
DChartAxisBaseBar.prototype.destroy = function () {
|
|
72906
|
-
var shape = this._shape;
|
|
72907
|
-
if (shape != null) {
|
|
72908
|
-
shape.destroy();
|
|
72909
|
-
}
|
|
72910
|
-
this._index = 0;
|
|
72911
|
-
this._container = undefined;
|
|
72912
|
-
};
|
|
72913
|
-
return DChartAxisBaseBar;
|
|
72914
|
-
}());
|
|
72915
|
-
|
|
72916
73059
|
var DChartAxisBaseTickMajorGridline = /** @class */ (function () {
|
|
72917
73060
|
function DChartAxisBaseTickMajorGridline(parser) {
|
|
72918
73061
|
this._parser = parser;
|
|
@@ -73110,6 +73253,7 @@ var DChartAxisBaseTickMinor = /** @class */ (function () {
|
|
|
73110
73253
|
shape.points.size = size;
|
|
73111
73254
|
shape.points.style = style;
|
|
73112
73255
|
shape.stroke.copy(minor.stroke);
|
|
73256
|
+
shape.text.copy(minor.text);
|
|
73113
73257
|
shape.size.set(0, 0);
|
|
73114
73258
|
result.push(shape);
|
|
73115
73259
|
}
|
|
@@ -73152,8 +73296,8 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73152
73296
|
function DChartAxisBaseTickContainer(parser) {
|
|
73153
73297
|
this._parser = parser;
|
|
73154
73298
|
this._index = 0;
|
|
73155
|
-
this._major =
|
|
73156
|
-
this._minor =
|
|
73299
|
+
this._major = this.newMajor(parser);
|
|
73300
|
+
this._minor = this.newMinor(parser);
|
|
73157
73301
|
this._majorTicks = [];
|
|
73158
73302
|
this._minorTicks = [];
|
|
73159
73303
|
}
|
|
@@ -73164,6 +73308,9 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73164
73308
|
enumerable: false,
|
|
73165
73309
|
configurable: true
|
|
73166
73310
|
});
|
|
73311
|
+
DChartAxisBaseTickContainer.prototype.newMajor = function (parser) {
|
|
73312
|
+
return new DChartAxisBaseTickMajor(parser);
|
|
73313
|
+
};
|
|
73167
73314
|
Object.defineProperty(DChartAxisBaseTickContainer.prototype, "minor", {
|
|
73168
73315
|
get: function () {
|
|
73169
73316
|
return this._minor;
|
|
@@ -73171,6 +73318,9 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73171
73318
|
enumerable: false,
|
|
73172
73319
|
configurable: true
|
|
73173
73320
|
});
|
|
73321
|
+
DChartAxisBaseTickContainer.prototype.newMinor = function (parser) {
|
|
73322
|
+
return new DChartAxisBaseTickMinor(parser);
|
|
73323
|
+
};
|
|
73174
73324
|
DChartAxisBaseTickContainer.prototype.bind = function (container, index) {
|
|
73175
73325
|
this._container = container;
|
|
73176
73326
|
this._index = index;
|
|
@@ -73247,9 +73397,10 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73247
73397
|
var minorCountPerMajor = minorTick.count;
|
|
73248
73398
|
var minorCount = (majorCapacity + 1) * minorCountPerMajor;
|
|
73249
73399
|
var minorStep = minorTick.step;
|
|
73400
|
+
var minorFormatter = minorTick.formatter;
|
|
73250
73401
|
var majorTicks = this._majorTicks;
|
|
73251
73402
|
var minorTicks = this._minorTicks;
|
|
73252
|
-
|
|
73403
|
+
this.newTicks(coordinate, domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
73253
73404
|
var a = transform.a;
|
|
73254
73405
|
var tx = transform.tx;
|
|
73255
73406
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -73260,24 +73411,15 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73260
73411
|
var majorTickProjectedPosition = majorTicks[imajorTick + 1];
|
|
73261
73412
|
var majotTickPositionX = a * majorTickProjectedPosition + tx;
|
|
73262
73413
|
var majorTickStep = majorTicks[imajorTick + 2];
|
|
73263
|
-
majorShape.
|
|
73264
|
-
majorShape.visible = true;
|
|
73265
|
-
majorShape.transform.position.set(majotTickPositionX, shapePositionY);
|
|
73266
|
-
majorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);
|
|
73267
|
-
majorShape.allowUploadedUpdate();
|
|
73414
|
+
this.showMajor(majorShape, majotTickPositionX, shapePositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
|
|
73268
73415
|
if (i < gridlineShapes.length) {
|
|
73269
|
-
|
|
73270
|
-
gridlineShape.disallowUploadedUpdate();
|
|
73271
|
-
gridlineShape.visible = true;
|
|
73272
|
-
gridlineShape.transform.position.set(majotTickPositionX, plotAreaHeight * 0.5);
|
|
73273
|
-
gridlineShape.size.set(0, plotAreaHeight);
|
|
73274
|
-
gridlineShape.allowUploadedUpdate();
|
|
73416
|
+
this.showMajorGridline(gridlineShapes[i], majorTickPosition, majotTickPositionX, plotAreaHeight * 0.5, 0, plotAreaHeight);
|
|
73275
73417
|
}
|
|
73276
73418
|
}
|
|
73277
73419
|
else {
|
|
73278
|
-
majorShape
|
|
73279
|
-
if (gridlineShapes) {
|
|
73280
|
-
gridlineShapes[i]
|
|
73420
|
+
this.hideMajor(majorShape);
|
|
73421
|
+
if (i < gridlineShapes.length) {
|
|
73422
|
+
this.hideMajorGridline(gridlineShapes[i]);
|
|
73281
73423
|
}
|
|
73282
73424
|
}
|
|
73283
73425
|
}
|
|
@@ -73285,15 +73427,14 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73285
73427
|
var minorShape = minorShapes[i];
|
|
73286
73428
|
var iminorTick = i * 3;
|
|
73287
73429
|
var minorTickPosition = minorTicks[iminorTick + 0];
|
|
73288
|
-
var minorTickProjectedPosition = minorTicks[iminorTick + 1];
|
|
73289
73430
|
if (!isNaN(minorTickPosition)) {
|
|
73290
|
-
|
|
73291
|
-
|
|
73292
|
-
|
|
73293
|
-
minorShape.
|
|
73431
|
+
var minorTickProjectedPosition = minorTicks[iminorTick + 1];
|
|
73432
|
+
var minorTickPositionX = a * minorTickProjectedPosition + tx;
|
|
73433
|
+
var minorTickStep = minorTicks[iminorTick + 2];
|
|
73434
|
+
this.showMinor(minorShape, minorTickPositionX, shapePositionY, minorFormatter === null || minorFormatter === void 0 ? void 0 : minorFormatter.format(minorTickPosition, minorTickStep));
|
|
73294
73435
|
}
|
|
73295
73436
|
else {
|
|
73296
|
-
minorShape
|
|
73437
|
+
this.hideMinor(minorShape);
|
|
73297
73438
|
}
|
|
73298
73439
|
}
|
|
73299
73440
|
return true;
|
|
@@ -73309,9 +73450,10 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73309
73450
|
var minorCountPerMajor = minorTick.count;
|
|
73310
73451
|
var minorCount = (majorCapacity + 1) * minorCountPerMajor;
|
|
73311
73452
|
var minorStep = minorTick.step;
|
|
73453
|
+
var minorFormatter = minorTick.formatter;
|
|
73312
73454
|
var majorTicks = this._majorTicks;
|
|
73313
73455
|
var minorTicks = this._minorTicks;
|
|
73314
|
-
|
|
73456
|
+
this.newTicks(coordinate, domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
73315
73457
|
var d = transform.d;
|
|
73316
73458
|
var ty = transform.ty;
|
|
73317
73459
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -73322,24 +73464,15 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73322
73464
|
var majorTickProjectedPosition = majorTicks[imajorTick + 1];
|
|
73323
73465
|
var majotTickPositionY = d * majorTickProjectedPosition + ty;
|
|
73324
73466
|
var majorTickStep = majorTicks[imajorTick + 2];
|
|
73325
|
-
majorShape.
|
|
73326
|
-
majorShape.visible = true;
|
|
73327
|
-
majorShape.transform.position.set(shapePositionX, majotTickPositionY);
|
|
73328
|
-
majorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);
|
|
73329
|
-
majorShape.allowUploadedUpdate();
|
|
73467
|
+
this.showMajor(majorShape, shapePositionX, majotTickPositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
|
|
73330
73468
|
if (i < gridlineShapes.length) {
|
|
73331
|
-
|
|
73332
|
-
gridlineShape.disallowUploadedUpdate();
|
|
73333
|
-
gridlineShape.visible = true;
|
|
73334
|
-
gridlineShape.transform.position.set(plotAreaWidth * 0.5, majotTickPositionY);
|
|
73335
|
-
gridlineShape.size.set(plotAreaWidth, 0);
|
|
73336
|
-
gridlineShape.allowUploadedUpdate();
|
|
73469
|
+
this.showMajorGridline(gridlineShapes[i], majorTickPosition, plotAreaWidth * 0.5, majotTickPositionY, plotAreaWidth, 0);
|
|
73337
73470
|
}
|
|
73338
73471
|
}
|
|
73339
73472
|
else {
|
|
73340
|
-
majorShape
|
|
73341
|
-
if (gridlineShapes) {
|
|
73342
|
-
gridlineShapes[i]
|
|
73473
|
+
this.hideMajor(majorShape);
|
|
73474
|
+
if (i < gridlineShapes.length) {
|
|
73475
|
+
this.hideMajorGridline(gridlineShapes[i]);
|
|
73343
73476
|
}
|
|
73344
73477
|
}
|
|
73345
73478
|
}
|
|
@@ -73347,19 +73480,51 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73347
73480
|
var minorShape = minorShapes[i];
|
|
73348
73481
|
var iminorTick = i * 3;
|
|
73349
73482
|
var minorTickPosition = minorTicks[iminorTick + 0];
|
|
73350
|
-
var minorTickProjectedPosition = minorTicks[iminorTick + 1];
|
|
73351
73483
|
if (!isNaN(minorTickPosition)) {
|
|
73352
|
-
|
|
73353
|
-
|
|
73354
|
-
|
|
73355
|
-
minorShape.
|
|
73484
|
+
var minorTickProjectedPosition = minorTicks[iminorTick + 1];
|
|
73485
|
+
var minorTickPositionY = d * minorTickProjectedPosition + ty;
|
|
73486
|
+
var minorTickStep = minorTicks[iminorTick + 2];
|
|
73487
|
+
this.showMinor(minorShape, shapePositionX, minorTickPositionY, minorFormatter === null || minorFormatter === void 0 ? void 0 : minorFormatter.format(minorTickPosition, minorTickStep));
|
|
73356
73488
|
}
|
|
73357
73489
|
else {
|
|
73358
|
-
minorShape
|
|
73490
|
+
this.hideMinor(minorShape);
|
|
73359
73491
|
}
|
|
73360
73492
|
}
|
|
73361
73493
|
return true;
|
|
73362
73494
|
};
|
|
73495
|
+
DChartAxisBaseTickContainer.prototype.showMajor = function (shape, x, y, text) {
|
|
73496
|
+
shape.disallowUploadedUpdate();
|
|
73497
|
+
shape.visible = true;
|
|
73498
|
+
shape.transform.position.set(x, y);
|
|
73499
|
+
shape.text.value = text != null ? text : "";
|
|
73500
|
+
shape.allowUploadedUpdate();
|
|
73501
|
+
};
|
|
73502
|
+
DChartAxisBaseTickContainer.prototype.showMajorGridline = function (shape, value, x, y, sx, sy) {
|
|
73503
|
+
shape.disallowUploadedUpdate();
|
|
73504
|
+
shape.visible = true;
|
|
73505
|
+
shape.transform.position.set(x, y);
|
|
73506
|
+
shape.size.set(sx, sy);
|
|
73507
|
+
shape.allowUploadedUpdate();
|
|
73508
|
+
};
|
|
73509
|
+
DChartAxisBaseTickContainer.prototype.hideMajor = function (shape) {
|
|
73510
|
+
shape.visible = false;
|
|
73511
|
+
};
|
|
73512
|
+
DChartAxisBaseTickContainer.prototype.hideMajorGridline = function (shape) {
|
|
73513
|
+
shape.visible = false;
|
|
73514
|
+
};
|
|
73515
|
+
DChartAxisBaseTickContainer.prototype.showMinor = function (shape, x, y, text) {
|
|
73516
|
+
shape.disallowUploadedUpdate();
|
|
73517
|
+
shape.visible = true;
|
|
73518
|
+
shape.transform.position.set(x, y);
|
|
73519
|
+
shape.text.value = text != null ? text : "";
|
|
73520
|
+
shape.allowUploadedUpdate();
|
|
73521
|
+
};
|
|
73522
|
+
DChartAxisBaseTickContainer.prototype.hideMinor = function (shape) {
|
|
73523
|
+
shape.visible = false;
|
|
73524
|
+
};
|
|
73525
|
+
DChartAxisBaseTickContainer.prototype.newTicks = function (coordinate, domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
73526
|
+
coordinate.ticks(domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult);
|
|
73527
|
+
};
|
|
73363
73528
|
DChartAxisBaseTickContainer.prototype.destroy = function () {
|
|
73364
73529
|
this._major.destroy();
|
|
73365
73530
|
this._minor.destroy();
|
|
@@ -73380,9 +73545,16 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
73380
73545
|
var parser = new DChartAxisBaseOptionParser(theme, options);
|
|
73381
73546
|
this._parser = parser;
|
|
73382
73547
|
this._index = 0;
|
|
73383
|
-
this._bar =
|
|
73384
|
-
this._tick =
|
|
73548
|
+
this._bar = this.newBar(parser);
|
|
73549
|
+
this._tick = this.newTick(parser);
|
|
73385
73550
|
}
|
|
73551
|
+
Object.defineProperty(DChartAxisBase.prototype, "parser", {
|
|
73552
|
+
get: function () {
|
|
73553
|
+
return this._parser;
|
|
73554
|
+
},
|
|
73555
|
+
enumerable: false,
|
|
73556
|
+
configurable: true
|
|
73557
|
+
});
|
|
73386
73558
|
Object.defineProperty(DChartAxisBase.prototype, "position", {
|
|
73387
73559
|
get: function () {
|
|
73388
73560
|
return this._parser.position;
|
|
@@ -73397,6 +73569,9 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
73397
73569
|
enumerable: false,
|
|
73398
73570
|
configurable: true
|
|
73399
73571
|
});
|
|
73572
|
+
DChartAxisBase.prototype.newBar = function (parser) {
|
|
73573
|
+
return new DChartAxisBaseBar(parser);
|
|
73574
|
+
};
|
|
73400
73575
|
Object.defineProperty(DChartAxisBase.prototype, "tick", {
|
|
73401
73576
|
get: function () {
|
|
73402
73577
|
return this._tick;
|
|
@@ -73404,6 +73579,9 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
73404
73579
|
enumerable: false,
|
|
73405
73580
|
configurable: true
|
|
73406
73581
|
});
|
|
73582
|
+
DChartAxisBase.prototype.newTick = function (parser) {
|
|
73583
|
+
return new DChartAxisBaseTickContainer(parser);
|
|
73584
|
+
};
|
|
73407
73585
|
DChartAxisBase.prototype.bind = function (container, index) {
|
|
73408
73586
|
this._container = container;
|
|
73409
73587
|
this._index = index;
|
|
@@ -73436,7 +73614,8 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
73436
73614
|
this._container = undefined;
|
|
73437
73615
|
};
|
|
73438
73616
|
DChartAxisBase.prototype.toTheme = function (options) {
|
|
73439
|
-
|
|
73617
|
+
var _a;
|
|
73618
|
+
return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
|
|
73440
73619
|
};
|
|
73441
73620
|
DChartAxisBase.prototype.getThemeDefault = function () {
|
|
73442
73621
|
return DThemes.getInstance().get(this.getType());
|
|
@@ -73634,6 +73813,342 @@ var DChartCoordinateDirection = {
|
|
|
73634
73813
|
Y: 1
|
|
73635
73814
|
};
|
|
73636
73815
|
|
|
73816
|
+
/*
|
|
73817
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
73818
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
73819
|
+
*/
|
|
73820
|
+
var DChartCoordinateTransformImpl = /** @class */ (function () {
|
|
73821
|
+
function DChartCoordinateTransformImpl(options) {
|
|
73822
|
+
this._theme = this.toTheme(options);
|
|
73823
|
+
this._id = 0;
|
|
73824
|
+
this._isTranslationEnabled = options === null || options === void 0 ? void 0 : options.translation;
|
|
73825
|
+
this._translate = 0;
|
|
73826
|
+
this._isScalingEnabled = options === null || options === void 0 ? void 0 : options.scaling;
|
|
73827
|
+
this._scale = 1;
|
|
73828
|
+
this._itranslate = 0;
|
|
73829
|
+
this._iscale = 1;
|
|
73830
|
+
}
|
|
73831
|
+
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "id", {
|
|
73832
|
+
get: function () {
|
|
73833
|
+
return this._id;
|
|
73834
|
+
},
|
|
73835
|
+
enumerable: false,
|
|
73836
|
+
configurable: true
|
|
73837
|
+
});
|
|
73838
|
+
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "translate", {
|
|
73839
|
+
get: function () {
|
|
73840
|
+
return this._translate;
|
|
73841
|
+
},
|
|
73842
|
+
set: function (translate) {
|
|
73843
|
+
this.set(translate);
|
|
73844
|
+
},
|
|
73845
|
+
enumerable: false,
|
|
73846
|
+
configurable: true
|
|
73847
|
+
});
|
|
73848
|
+
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "scale", {
|
|
73849
|
+
get: function () {
|
|
73850
|
+
return this._scale;
|
|
73851
|
+
},
|
|
73852
|
+
set: function (scale) {
|
|
73853
|
+
this.set(undefined, scale);
|
|
73854
|
+
},
|
|
73855
|
+
enumerable: false,
|
|
73856
|
+
configurable: true
|
|
73857
|
+
});
|
|
73858
|
+
DChartCoordinateTransformImpl.prototype.bind = function (container, direction) {
|
|
73859
|
+
this.set(0, direction === DChartCoordinateDirection.X ? +1 : -1);
|
|
73860
|
+
};
|
|
73861
|
+
DChartCoordinateTransformImpl.prototype.unbind = function () {
|
|
73862
|
+
// DO NOTHING
|
|
73863
|
+
};
|
|
73864
|
+
DChartCoordinateTransformImpl.prototype.set = function (translate, scale) {
|
|
73865
|
+
var isChanged = false;
|
|
73866
|
+
if (translate != null &&
|
|
73867
|
+
this._isTranslationEnabled !== false &&
|
|
73868
|
+
this._translate !== translate) {
|
|
73869
|
+
isChanged = true;
|
|
73870
|
+
this._translate = translate;
|
|
73871
|
+
}
|
|
73872
|
+
if (scale != null && this._isScalingEnabled !== false && this._scale !== scale) {
|
|
73873
|
+
isChanged = true;
|
|
73874
|
+
this._scale = scale;
|
|
73875
|
+
}
|
|
73876
|
+
if (isChanged) {
|
|
73877
|
+
this._id += 1;
|
|
73878
|
+
this._iscale = this._theme.isZero(this._scale) ? 0 : 1 / this._scale;
|
|
73879
|
+
this._itranslate = -this._translate * this._iscale;
|
|
73880
|
+
}
|
|
73881
|
+
};
|
|
73882
|
+
DChartCoordinateTransformImpl.prototype.blend = function (ratio, mark) {
|
|
73883
|
+
var ratioi = 1 - ratio;
|
|
73884
|
+
var newTranslate = mark.newTranslate * ratio + mark.oldTranslate * ratioi;
|
|
73885
|
+
var newScale = mark.newScale * ratio + mark.oldScale * ratioi;
|
|
73886
|
+
this.set(newTranslate, newScale);
|
|
73887
|
+
};
|
|
73888
|
+
DChartCoordinateTransformImpl.prototype.map = function (value) {
|
|
73889
|
+
return this._translate + this._scale * value;
|
|
73890
|
+
};
|
|
73891
|
+
DChartCoordinateTransformImpl.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
|
|
73892
|
+
var translate = this._translate;
|
|
73893
|
+
var scale = this._scale;
|
|
73894
|
+
for (var i = ifrom + offset; i < iend; i += stride) {
|
|
73895
|
+
values[i] = translate + scale * values[i];
|
|
73896
|
+
}
|
|
73897
|
+
};
|
|
73898
|
+
DChartCoordinateTransformImpl.prototype.unmap = function (value) {
|
|
73899
|
+
return this._itranslate + this._iscale * value;
|
|
73900
|
+
};
|
|
73901
|
+
DChartCoordinateTransformImpl.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
73902
|
+
var itranslate = this._itranslate;
|
|
73903
|
+
var iscale = this._iscale;
|
|
73904
|
+
for (var i = ifrom + offset; i < iend; i += stride) {
|
|
73905
|
+
values[i] = itranslate + iscale * values[i];
|
|
73906
|
+
}
|
|
73907
|
+
};
|
|
73908
|
+
DChartCoordinateTransformImpl.prototype.toTheme = function (options) {
|
|
73909
|
+
return (options && options.theme) || this.getThemeDefault();
|
|
73910
|
+
};
|
|
73911
|
+
DChartCoordinateTransformImpl.prototype.getThemeDefault = function () {
|
|
73912
|
+
return DThemes.getInstance().get(this.getType());
|
|
73913
|
+
};
|
|
73914
|
+
DChartCoordinateTransformImpl.prototype.getType = function () {
|
|
73915
|
+
return "DChartCoordinateTransform";
|
|
73916
|
+
};
|
|
73917
|
+
return DChartCoordinateTransformImpl;
|
|
73918
|
+
}());
|
|
73919
|
+
|
|
73920
|
+
var DChartCoordinateTransformMarkImpl = /** @class */ (function () {
|
|
73921
|
+
function DChartCoordinateTransformMarkImpl() {
|
|
73922
|
+
this.oldTranslate = 0;
|
|
73923
|
+
this.oldScale = 1;
|
|
73924
|
+
this.newTranslate = 0;
|
|
73925
|
+
this.newScale = 1;
|
|
73926
|
+
}
|
|
73927
|
+
DChartCoordinateTransformMarkImpl.prototype.set = function (translate, scale) {
|
|
73928
|
+
if (translate != null) {
|
|
73929
|
+
this.newTranslate = translate;
|
|
73930
|
+
}
|
|
73931
|
+
if (scale != null) {
|
|
73932
|
+
this.newScale = scale;
|
|
73933
|
+
}
|
|
73934
|
+
};
|
|
73935
|
+
return DChartCoordinateTransformMarkImpl;
|
|
73936
|
+
}());
|
|
73937
|
+
|
|
73938
|
+
/*
|
|
73939
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
73940
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
73941
|
+
*/
|
|
73942
|
+
var DChartRegionImpl = /** @class */ (function () {
|
|
73943
|
+
function DChartRegionImpl(from, to) {
|
|
73944
|
+
this.from = from;
|
|
73945
|
+
this.to = to;
|
|
73946
|
+
}
|
|
73947
|
+
DChartRegionImpl.prototype.set = function (from, to) {
|
|
73948
|
+
if (from != null) {
|
|
73949
|
+
this.from = from;
|
|
73950
|
+
}
|
|
73951
|
+
if (to != null) {
|
|
73952
|
+
this.to = to;
|
|
73953
|
+
}
|
|
73954
|
+
return this;
|
|
73955
|
+
};
|
|
73956
|
+
DChartRegionImpl.prototype.add = function (from, to) {
|
|
73957
|
+
if (!isNaN$1(from)) {
|
|
73958
|
+
this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
73959
|
+
}
|
|
73960
|
+
if (!isNaN$1(to)) {
|
|
73961
|
+
this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
73962
|
+
}
|
|
73963
|
+
return this;
|
|
73964
|
+
};
|
|
73965
|
+
DChartRegionImpl.prototype.clear = function () {
|
|
73966
|
+
this.from = NaN;
|
|
73967
|
+
this.to = NaN;
|
|
73968
|
+
return this;
|
|
73969
|
+
};
|
|
73970
|
+
return DChartRegionImpl;
|
|
73971
|
+
}());
|
|
73972
|
+
|
|
73973
|
+
/*
|
|
73974
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
73975
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
73976
|
+
*/
|
|
73977
|
+
var DChartCoordinateBase = /** @class */ (function () {
|
|
73978
|
+
function DChartCoordinateBase(options) {
|
|
73979
|
+
this._id = 0;
|
|
73980
|
+
this._direction = DChartCoordinateDirection.X;
|
|
73981
|
+
this._theme = this.toTheme(options);
|
|
73982
|
+
this._transform = this.newTransform(options === null || options === void 0 ? void 0 : options.transform);
|
|
73983
|
+
this._tick = this.newTick(options === null || options === void 0 ? void 0 : options.tick);
|
|
73984
|
+
this._work = this.newRegion();
|
|
73985
|
+
this._mark = this.newMark();
|
|
73986
|
+
this._from = options === null || options === void 0 ? void 0 : options.from;
|
|
73987
|
+
this._to = options === null || options === void 0 ? void 0 : options.to;
|
|
73988
|
+
}
|
|
73989
|
+
DChartCoordinateBase.prototype.newTransform = function (options) {
|
|
73990
|
+
return new DChartCoordinateTransformImpl(options);
|
|
73991
|
+
};
|
|
73992
|
+
DChartCoordinateBase.prototype.newRegion = function () {
|
|
73993
|
+
return new DChartRegionImpl(NaN, NaN);
|
|
73994
|
+
};
|
|
73995
|
+
DChartCoordinateBase.prototype.newMark = function () {
|
|
73996
|
+
return new DChartCoordinateTransformMarkImpl();
|
|
73997
|
+
};
|
|
73998
|
+
Object.defineProperty(DChartCoordinateBase.prototype, "from", {
|
|
73999
|
+
get: function () {
|
|
74000
|
+
return this._from;
|
|
74001
|
+
},
|
|
74002
|
+
set: function (from) {
|
|
74003
|
+
this._from = from;
|
|
74004
|
+
},
|
|
74005
|
+
enumerable: false,
|
|
74006
|
+
configurable: true
|
|
74007
|
+
});
|
|
74008
|
+
Object.defineProperty(DChartCoordinateBase.prototype, "to", {
|
|
74009
|
+
get: function () {
|
|
74010
|
+
return this._to;
|
|
74011
|
+
},
|
|
74012
|
+
set: function (to) {
|
|
74013
|
+
this._to = to;
|
|
74014
|
+
},
|
|
74015
|
+
enumerable: false,
|
|
74016
|
+
configurable: true
|
|
74017
|
+
});
|
|
74018
|
+
DChartCoordinateBase.prototype.bind = function (container, direction) {
|
|
74019
|
+
this._container = container;
|
|
74020
|
+
this._direction = direction;
|
|
74021
|
+
this._transform.bind(container, direction);
|
|
74022
|
+
};
|
|
74023
|
+
DChartCoordinateBase.prototype.unbind = function () {
|
|
74024
|
+
this._container = undefined;
|
|
74025
|
+
this._transform.unbind();
|
|
74026
|
+
};
|
|
74027
|
+
DChartCoordinateBase.prototype.fit = function (from, to) {
|
|
74028
|
+
this.doFit(from, to, this._transform);
|
|
74029
|
+
};
|
|
74030
|
+
DChartCoordinateBase.prototype.mark = function (from, to) {
|
|
74031
|
+
var mark = this._mark;
|
|
74032
|
+
var transform = this._transform;
|
|
74033
|
+
mark.oldTranslate = transform.translate;
|
|
74034
|
+
mark.oldScale = transform.scale;
|
|
74035
|
+
this.doFit(from, to, mark);
|
|
74036
|
+
};
|
|
74037
|
+
DChartCoordinateBase.prototype.blend = function (ratio) {
|
|
74038
|
+
this._transform.blend(ratio, this._mark);
|
|
74039
|
+
};
|
|
74040
|
+
DChartCoordinateBase.prototype.doFit = function (from, to, result) {
|
|
74041
|
+
var container = this._container;
|
|
74042
|
+
if (container) {
|
|
74043
|
+
var plotArea = container.container.plotArea;
|
|
74044
|
+
var padding = plotArea.padding;
|
|
74045
|
+
var work = this._work;
|
|
74046
|
+
switch (this._direction) {
|
|
74047
|
+
case DChartCoordinateDirection.X:
|
|
74048
|
+
this.doFit_(padding.getLeft(), plotArea.width - padding.getRight(), this.toFitDomain(from, to, plotArea, work), result);
|
|
74049
|
+
break;
|
|
74050
|
+
case DChartCoordinateDirection.Y:
|
|
74051
|
+
this.doFit_(plotArea.height - padding.getBottom(), padding.getTop(), this.toFitRange(from, to, plotArea, work), result);
|
|
74052
|
+
break;
|
|
74053
|
+
}
|
|
74054
|
+
}
|
|
74055
|
+
};
|
|
74056
|
+
DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
74057
|
+
if (from == null) {
|
|
74058
|
+
from = this._from;
|
|
74059
|
+
}
|
|
74060
|
+
if (to == null) {
|
|
74061
|
+
to = this._to;
|
|
74062
|
+
}
|
|
74063
|
+
if (from != null && to != null) {
|
|
74064
|
+
result.set(from, to);
|
|
74065
|
+
}
|
|
74066
|
+
else {
|
|
74067
|
+
plotArea.series.getDomain(this, result);
|
|
74068
|
+
result.set(from, to);
|
|
74069
|
+
}
|
|
74070
|
+
return result;
|
|
74071
|
+
};
|
|
74072
|
+
DChartCoordinateBase.prototype.toFitRange = function (from, to, plotArea, result) {
|
|
74073
|
+
if (from == null) {
|
|
74074
|
+
from = this._from;
|
|
74075
|
+
}
|
|
74076
|
+
if (to == null) {
|
|
74077
|
+
to = this._to;
|
|
74078
|
+
}
|
|
74079
|
+
if (from != null && to != null) {
|
|
74080
|
+
result.set(from, to);
|
|
74081
|
+
}
|
|
74082
|
+
else {
|
|
74083
|
+
plotArea.series.getRange(this, result);
|
|
74084
|
+
result.set(from, to);
|
|
74085
|
+
}
|
|
74086
|
+
return result;
|
|
74087
|
+
};
|
|
74088
|
+
DChartCoordinateBase.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
|
|
74089
|
+
var regionFrom = region.from;
|
|
74090
|
+
var regionTo = region.to;
|
|
74091
|
+
if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
|
|
74092
|
+
// Scale
|
|
74093
|
+
var newScale = 1;
|
|
74094
|
+
var regionFromMapped = this.map(regionFrom);
|
|
74095
|
+
var regionToMapped = this.map(regionTo);
|
|
74096
|
+
var regionSizeMapped = regionToMapped - regionFromMapped;
|
|
74097
|
+
if (!this._theme.isZero(regionSizeMapped)) {
|
|
74098
|
+
var pixelSize = pixelTo - pixelFrom;
|
|
74099
|
+
newScale = pixelSize / regionSizeMapped;
|
|
74100
|
+
}
|
|
74101
|
+
else {
|
|
74102
|
+
newScale = pixelTo < pixelFrom ? -1 : 1;
|
|
74103
|
+
}
|
|
74104
|
+
// Translation
|
|
74105
|
+
var newTranslation = pixelFrom - regionFromMapped * newScale;
|
|
74106
|
+
// Done
|
|
74107
|
+
result.set(newTranslation, newScale);
|
|
74108
|
+
}
|
|
74109
|
+
};
|
|
74110
|
+
Object.defineProperty(DChartCoordinateBase.prototype, "id", {
|
|
74111
|
+
get: function () {
|
|
74112
|
+
return this._id;
|
|
74113
|
+
},
|
|
74114
|
+
enumerable: false,
|
|
74115
|
+
configurable: true
|
|
74116
|
+
});
|
|
74117
|
+
Object.defineProperty(DChartCoordinateBase.prototype, "transform", {
|
|
74118
|
+
get: function () {
|
|
74119
|
+
return this._transform;
|
|
74120
|
+
},
|
|
74121
|
+
enumerable: false,
|
|
74122
|
+
configurable: true
|
|
74123
|
+
});
|
|
74124
|
+
DChartCoordinateBase.prototype.map = function (value) {
|
|
74125
|
+
return value;
|
|
74126
|
+
};
|
|
74127
|
+
DChartCoordinateBase.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
|
|
74128
|
+
// DO NOTHING
|
|
74129
|
+
};
|
|
74130
|
+
DChartCoordinateBase.prototype.unmap = function (value) {
|
|
74131
|
+
return value;
|
|
74132
|
+
};
|
|
74133
|
+
DChartCoordinateBase.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
74134
|
+
// DO NOTHING
|
|
74135
|
+
};
|
|
74136
|
+
DChartCoordinateBase.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
74137
|
+
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
74138
|
+
};
|
|
74139
|
+
DChartCoordinateBase.prototype.toTheme = function (options) {
|
|
74140
|
+
var _a;
|
|
74141
|
+
return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
|
|
74142
|
+
};
|
|
74143
|
+
DChartCoordinateBase.prototype.getThemeDefault = function () {
|
|
74144
|
+
return DThemes.getInstance().get(this.getType());
|
|
74145
|
+
};
|
|
74146
|
+
DChartCoordinateBase.prototype.getType = function () {
|
|
74147
|
+
return "DChartCoordinate";
|
|
74148
|
+
};
|
|
74149
|
+
return DChartCoordinateBase;
|
|
74150
|
+
}());
|
|
74151
|
+
|
|
73637
74152
|
/*
|
|
73638
74153
|
* Copyright (C) 2019 Toshiba Corporation
|
|
73639
74154
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -73933,7 +74448,8 @@ var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
|
73933
74448
|
}
|
|
73934
74449
|
};
|
|
73935
74450
|
DChartCoordinateLinearTick.prototype.toTheme = function (options) {
|
|
73936
|
-
|
|
74451
|
+
var _a;
|
|
74452
|
+
return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
|
|
73937
74453
|
};
|
|
73938
74454
|
DChartCoordinateLinearTick.prototype.getThemeDefault = function () {
|
|
73939
74455
|
return DThemes.getInstance().get(this.getType());
|
|
@@ -73948,325 +74464,16 @@ var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
|
73948
74464
|
* Copyright (C) 2019 Toshiba Corporation
|
|
73949
74465
|
* SPDX-License-Identifier: Apache-2.0
|
|
73950
74466
|
*/
|
|
73951
|
-
var
|
|
73952
|
-
|
|
73953
|
-
|
|
73954
|
-
this
|
|
73955
|
-
this._isTranslationEnabled = options === null || options === void 0 ? void 0 : options.translation;
|
|
73956
|
-
this._translate = 0;
|
|
73957
|
-
this._isScalingEnabled = options === null || options === void 0 ? void 0 : options.scaling;
|
|
73958
|
-
this._scale = 1;
|
|
73959
|
-
this._itranslate = 0;
|
|
73960
|
-
this._iscale = 1;
|
|
73961
|
-
}
|
|
73962
|
-
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "id", {
|
|
73963
|
-
get: function () {
|
|
73964
|
-
return this._id;
|
|
73965
|
-
},
|
|
73966
|
-
enumerable: false,
|
|
73967
|
-
configurable: true
|
|
73968
|
-
});
|
|
73969
|
-
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "translate", {
|
|
73970
|
-
get: function () {
|
|
73971
|
-
return this._translate;
|
|
73972
|
-
},
|
|
73973
|
-
set: function (translate) {
|
|
73974
|
-
this.set(translate);
|
|
73975
|
-
},
|
|
73976
|
-
enumerable: false,
|
|
73977
|
-
configurable: true
|
|
73978
|
-
});
|
|
73979
|
-
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "scale", {
|
|
73980
|
-
get: function () {
|
|
73981
|
-
return this._scale;
|
|
73982
|
-
},
|
|
73983
|
-
set: function (scale) {
|
|
73984
|
-
this.set(undefined, scale);
|
|
73985
|
-
},
|
|
73986
|
-
enumerable: false,
|
|
73987
|
-
configurable: true
|
|
73988
|
-
});
|
|
73989
|
-
DChartCoordinateTransformImpl.prototype.bind = function (container, direction) {
|
|
73990
|
-
this.set(0, direction === DChartCoordinateDirection.X ? +1 : -1);
|
|
73991
|
-
};
|
|
73992
|
-
DChartCoordinateTransformImpl.prototype.unbind = function () {
|
|
73993
|
-
// DO NOTHING
|
|
73994
|
-
};
|
|
73995
|
-
DChartCoordinateTransformImpl.prototype.set = function (translate, scale) {
|
|
73996
|
-
var isChanged = false;
|
|
73997
|
-
if (translate != null &&
|
|
73998
|
-
this._isTranslationEnabled !== false &&
|
|
73999
|
-
this._translate !== translate) {
|
|
74000
|
-
isChanged = true;
|
|
74001
|
-
this._translate = translate;
|
|
74002
|
-
}
|
|
74003
|
-
if (scale != null && this._isScalingEnabled !== false && this._scale !== scale) {
|
|
74004
|
-
isChanged = true;
|
|
74005
|
-
this._scale = scale;
|
|
74006
|
-
}
|
|
74007
|
-
if (isChanged) {
|
|
74008
|
-
this._id += 1;
|
|
74009
|
-
this._iscale = this._theme.isZero(this._scale) ? 0 : 1 / this._scale;
|
|
74010
|
-
this._itranslate = -this._translate * this._iscale;
|
|
74011
|
-
}
|
|
74012
|
-
};
|
|
74013
|
-
DChartCoordinateTransformImpl.prototype.blend = function (ratio, mark) {
|
|
74014
|
-
var ratioi = 1 - ratio;
|
|
74015
|
-
var newTranslate = mark.newTranslate * ratio + mark.oldTranslate * ratioi;
|
|
74016
|
-
var newScale = mark.newScale * ratio + mark.oldScale * ratioi;
|
|
74017
|
-
this.set(newTranslate, newScale);
|
|
74018
|
-
};
|
|
74019
|
-
DChartCoordinateTransformImpl.prototype.map = function (value) {
|
|
74020
|
-
return this._translate + this._scale * value;
|
|
74021
|
-
};
|
|
74022
|
-
DChartCoordinateTransformImpl.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
|
|
74023
|
-
var translate = this._translate;
|
|
74024
|
-
var scale = this._scale;
|
|
74025
|
-
for (var i = ifrom + offset; i < iend; i += stride) {
|
|
74026
|
-
values[i] = translate + scale * values[i];
|
|
74027
|
-
}
|
|
74028
|
-
};
|
|
74029
|
-
DChartCoordinateTransformImpl.prototype.unmap = function (value) {
|
|
74030
|
-
return this._itranslate + this._iscale * value;
|
|
74031
|
-
};
|
|
74032
|
-
DChartCoordinateTransformImpl.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
74033
|
-
var itranslate = this._itranslate;
|
|
74034
|
-
var iscale = this._iscale;
|
|
74035
|
-
for (var i = ifrom + offset; i < iend; i += stride) {
|
|
74036
|
-
values[i] = itranslate + iscale * values[i];
|
|
74037
|
-
}
|
|
74038
|
-
};
|
|
74039
|
-
DChartCoordinateTransformImpl.prototype.toTheme = function (options) {
|
|
74040
|
-
return (options && options.theme) || this.getThemeDefault();
|
|
74041
|
-
};
|
|
74042
|
-
DChartCoordinateTransformImpl.prototype.getThemeDefault = function () {
|
|
74043
|
-
return DThemes.getInstance().get(this.getType());
|
|
74044
|
-
};
|
|
74045
|
-
DChartCoordinateTransformImpl.prototype.getType = function () {
|
|
74046
|
-
return "DChartCoordinateTransform";
|
|
74047
|
-
};
|
|
74048
|
-
return DChartCoordinateTransformImpl;
|
|
74049
|
-
}());
|
|
74050
|
-
|
|
74051
|
-
var DChartCoordinateTransformMarkImpl = /** @class */ (function () {
|
|
74052
|
-
function DChartCoordinateTransformMarkImpl() {
|
|
74053
|
-
this.oldTranslate = 0;
|
|
74054
|
-
this.oldScale = 1;
|
|
74055
|
-
this.newTranslate = 0;
|
|
74056
|
-
this.newScale = 1;
|
|
74057
|
-
}
|
|
74058
|
-
DChartCoordinateTransformMarkImpl.prototype.set = function (translate, scale) {
|
|
74059
|
-
if (translate != null) {
|
|
74060
|
-
this.newTranslate = translate;
|
|
74061
|
-
}
|
|
74062
|
-
if (scale != null) {
|
|
74063
|
-
this.newScale = scale;
|
|
74064
|
-
}
|
|
74065
|
-
};
|
|
74066
|
-
return DChartCoordinateTransformMarkImpl;
|
|
74067
|
-
}());
|
|
74068
|
-
|
|
74069
|
-
/*
|
|
74070
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
74071
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
74072
|
-
*/
|
|
74073
|
-
var DChartRegionImpl = /** @class */ (function () {
|
|
74074
|
-
function DChartRegionImpl(from, to) {
|
|
74075
|
-
this.from = from;
|
|
74076
|
-
this.to = to;
|
|
74077
|
-
}
|
|
74078
|
-
DChartRegionImpl.prototype.set = function (from, to) {
|
|
74079
|
-
if (from != null) {
|
|
74080
|
-
this.from = from;
|
|
74081
|
-
}
|
|
74082
|
-
if (to != null) {
|
|
74083
|
-
this.to = to;
|
|
74084
|
-
}
|
|
74085
|
-
return this;
|
|
74086
|
-
};
|
|
74087
|
-
DChartRegionImpl.prototype.add = function (from, to) {
|
|
74088
|
-
if (!isNaN$1(from)) {
|
|
74089
|
-
this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
74090
|
-
}
|
|
74091
|
-
if (!isNaN$1(to)) {
|
|
74092
|
-
this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
74093
|
-
}
|
|
74094
|
-
return this;
|
|
74095
|
-
};
|
|
74096
|
-
DChartRegionImpl.prototype.clear = function () {
|
|
74097
|
-
this.from = NaN;
|
|
74098
|
-
this.to = NaN;
|
|
74099
|
-
return this;
|
|
74100
|
-
};
|
|
74101
|
-
return DChartRegionImpl;
|
|
74102
|
-
}());
|
|
74103
|
-
|
|
74104
|
-
/*
|
|
74105
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
74106
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
74107
|
-
*/
|
|
74108
|
-
var DChartCoordinateLinear = /** @class */ (function () {
|
|
74109
|
-
function DChartCoordinateLinear(options) {
|
|
74110
|
-
this._id = 0;
|
|
74111
|
-
this._direction = DChartCoordinateDirection.X;
|
|
74112
|
-
this._theme = this.toTheme(options);
|
|
74113
|
-
this._transform = new DChartCoordinateTransformImpl(options === null || options === void 0 ? void 0 : options.transform);
|
|
74114
|
-
this._tick = new DChartCoordinateLinearTick(options === null || options === void 0 ? void 0 : options.tick);
|
|
74115
|
-
this._work = new DChartRegionImpl(NaN, NaN);
|
|
74116
|
-
this._mark = new DChartCoordinateTransformMarkImpl();
|
|
74117
|
-
this._from = options === null || options === void 0 ? void 0 : options.from;
|
|
74118
|
-
this._to = options === null || options === void 0 ? void 0 : options.to;
|
|
74467
|
+
var DChartCoordinateLinear = /** @class */ (function (_super) {
|
|
74468
|
+
__extends(DChartCoordinateLinear, _super);
|
|
74469
|
+
function DChartCoordinateLinear() {
|
|
74470
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
74119
74471
|
}
|
|
74120
|
-
|
|
74121
|
-
|
|
74122
|
-
return this._from;
|
|
74123
|
-
},
|
|
74124
|
-
set: function (from) {
|
|
74125
|
-
this._from = from;
|
|
74126
|
-
},
|
|
74127
|
-
enumerable: false,
|
|
74128
|
-
configurable: true
|
|
74129
|
-
});
|
|
74130
|
-
Object.defineProperty(DChartCoordinateLinear.prototype, "to", {
|
|
74131
|
-
get: function () {
|
|
74132
|
-
return this._to;
|
|
74133
|
-
},
|
|
74134
|
-
set: function (to) {
|
|
74135
|
-
this._to = to;
|
|
74136
|
-
},
|
|
74137
|
-
enumerable: false,
|
|
74138
|
-
configurable: true
|
|
74139
|
-
});
|
|
74140
|
-
DChartCoordinateLinear.prototype.bind = function (container, direction) {
|
|
74141
|
-
this._container = container;
|
|
74142
|
-
this._direction = direction;
|
|
74143
|
-
this._transform.bind(container, direction);
|
|
74144
|
-
};
|
|
74145
|
-
DChartCoordinateLinear.prototype.unbind = function () {
|
|
74146
|
-
this._container = undefined;
|
|
74147
|
-
this._transform.unbind();
|
|
74148
|
-
};
|
|
74149
|
-
DChartCoordinateLinear.prototype.fit = function (from, to) {
|
|
74150
|
-
this.doFit(from, to, this._transform);
|
|
74151
|
-
};
|
|
74152
|
-
DChartCoordinateLinear.prototype.mark = function (from, to) {
|
|
74153
|
-
var mark = this._mark;
|
|
74154
|
-
var transform = this._transform;
|
|
74155
|
-
mark.oldTranslate = transform.translate;
|
|
74156
|
-
mark.oldScale = transform.scale;
|
|
74157
|
-
this.doFit(from, to, mark);
|
|
74158
|
-
};
|
|
74159
|
-
DChartCoordinateLinear.prototype.blend = function (ratio) {
|
|
74160
|
-
this._transform.blend(ratio, this._mark);
|
|
74161
|
-
};
|
|
74162
|
-
DChartCoordinateLinear.prototype.doFit = function (from, to, result) {
|
|
74163
|
-
var container = this._container;
|
|
74164
|
-
if (container) {
|
|
74165
|
-
var plotArea = container.container.plotArea;
|
|
74166
|
-
var padding = plotArea.padding;
|
|
74167
|
-
var work = this._work;
|
|
74168
|
-
switch (this._direction) {
|
|
74169
|
-
case DChartCoordinateDirection.X:
|
|
74170
|
-
this.doFit_(padding.getLeft(), plotArea.width - padding.getRight(), this.toFitDomain(from, to, plotArea, work), result);
|
|
74171
|
-
break;
|
|
74172
|
-
case DChartCoordinateDirection.Y:
|
|
74173
|
-
this.doFit_(plotArea.height - padding.getBottom(), padding.getTop(), this.toFitRange(from, to, plotArea, work), result);
|
|
74174
|
-
break;
|
|
74175
|
-
}
|
|
74176
|
-
}
|
|
74177
|
-
};
|
|
74178
|
-
DChartCoordinateLinear.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
74179
|
-
if (from == null) {
|
|
74180
|
-
from = this._from;
|
|
74181
|
-
}
|
|
74182
|
-
if (to == null) {
|
|
74183
|
-
to = this._to;
|
|
74184
|
-
}
|
|
74185
|
-
if (from != null && to != null) {
|
|
74186
|
-
result.set(from, to);
|
|
74187
|
-
}
|
|
74188
|
-
else {
|
|
74189
|
-
plotArea.series.getDomain(this, result);
|
|
74190
|
-
result.set(from, to);
|
|
74191
|
-
}
|
|
74192
|
-
return result;
|
|
74193
|
-
};
|
|
74194
|
-
DChartCoordinateLinear.prototype.toFitRange = function (from, to, plotArea, result) {
|
|
74195
|
-
if (from == null) {
|
|
74196
|
-
from = this._from;
|
|
74197
|
-
}
|
|
74198
|
-
if (to == null) {
|
|
74199
|
-
to = this._to;
|
|
74200
|
-
}
|
|
74201
|
-
if (from != null && to != null) {
|
|
74202
|
-
result.set(from, to);
|
|
74203
|
-
}
|
|
74204
|
-
else {
|
|
74205
|
-
plotArea.series.getRange(this, result);
|
|
74206
|
-
result.set(from, to);
|
|
74207
|
-
}
|
|
74208
|
-
return result;
|
|
74209
|
-
};
|
|
74210
|
-
DChartCoordinateLinear.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
|
|
74211
|
-
var regionFrom = region.from;
|
|
74212
|
-
var regionTo = region.to;
|
|
74213
|
-
if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
|
|
74214
|
-
// Scale
|
|
74215
|
-
var newScale = 1;
|
|
74216
|
-
var regionSize = regionTo - regionFrom;
|
|
74217
|
-
if (!this._theme.isZero(regionSize)) {
|
|
74218
|
-
var pixelSize = pixelTo - pixelFrom;
|
|
74219
|
-
newScale = pixelSize / regionSize;
|
|
74220
|
-
}
|
|
74221
|
-
else {
|
|
74222
|
-
newScale = pixelTo < pixelFrom ? -1 : 1;
|
|
74223
|
-
}
|
|
74224
|
-
// Translation
|
|
74225
|
-
var newTranslation = pixelFrom - regionFrom * newScale;
|
|
74226
|
-
// Done
|
|
74227
|
-
result.set(newTranslation, newScale);
|
|
74228
|
-
}
|
|
74229
|
-
};
|
|
74230
|
-
Object.defineProperty(DChartCoordinateLinear.prototype, "id", {
|
|
74231
|
-
get: function () {
|
|
74232
|
-
return this._id;
|
|
74233
|
-
},
|
|
74234
|
-
enumerable: false,
|
|
74235
|
-
configurable: true
|
|
74236
|
-
});
|
|
74237
|
-
Object.defineProperty(DChartCoordinateLinear.prototype, "transform", {
|
|
74238
|
-
get: function () {
|
|
74239
|
-
return this._transform;
|
|
74240
|
-
},
|
|
74241
|
-
enumerable: false,
|
|
74242
|
-
configurable: true
|
|
74243
|
-
});
|
|
74244
|
-
DChartCoordinateLinear.prototype.map = function (value) {
|
|
74245
|
-
return value;
|
|
74246
|
-
};
|
|
74247
|
-
DChartCoordinateLinear.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
|
|
74248
|
-
// DO NOTHING
|
|
74249
|
-
};
|
|
74250
|
-
DChartCoordinateLinear.prototype.unmap = function (value) {
|
|
74251
|
-
return value;
|
|
74252
|
-
};
|
|
74253
|
-
DChartCoordinateLinear.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
74254
|
-
// DO NOTHING
|
|
74255
|
-
};
|
|
74256
|
-
DChartCoordinateLinear.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
74257
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
74258
|
-
};
|
|
74259
|
-
DChartCoordinateLinear.prototype.toTheme = function (options) {
|
|
74260
|
-
return (options && options.theme) || this.getThemeDefault();
|
|
74261
|
-
};
|
|
74262
|
-
DChartCoordinateLinear.prototype.getThemeDefault = function () {
|
|
74263
|
-
return DThemes.getInstance().get(this.getType());
|
|
74264
|
-
};
|
|
74265
|
-
DChartCoordinateLinear.prototype.getType = function () {
|
|
74266
|
-
return "DChartCoordinate";
|
|
74472
|
+
DChartCoordinateLinear.prototype.newTick = function (options) {
|
|
74473
|
+
return new DChartCoordinateLinearTick(options);
|
|
74267
74474
|
};
|
|
74268
74475
|
return DChartCoordinateLinear;
|
|
74269
|
-
}());
|
|
74476
|
+
}(DChartCoordinateBase));
|
|
74270
74477
|
|
|
74271
74478
|
/*
|
|
74272
74479
|
* Copyright (C) 2019 Toshiba Corporation
|
|
@@ -74391,7 +74598,8 @@ var DChartCoordinateLogTick = /** @class */ (function () {
|
|
|
74391
74598
|
}
|
|
74392
74599
|
};
|
|
74393
74600
|
DChartCoordinateLogTick.prototype.toTheme = function (options) {
|
|
74394
|
-
|
|
74601
|
+
var _a;
|
|
74602
|
+
return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
|
|
74395
74603
|
};
|
|
74396
74604
|
DChartCoordinateLogTick.prototype.getThemeDefault = function () {
|
|
74397
74605
|
return DThemes.getInstance().get(this.getType());
|
|
@@ -74406,142 +74614,14 @@ var DChartCoordinateLogTick = /** @class */ (function () {
|
|
|
74406
74614
|
* Copyright (C) 2019 Toshiba Corporation
|
|
74407
74615
|
* SPDX-License-Identifier: Apache-2.0
|
|
74408
74616
|
*/
|
|
74409
|
-
var DChartCoordinateLog = /** @class */ (function () {
|
|
74410
|
-
|
|
74411
|
-
|
|
74412
|
-
this
|
|
74413
|
-
this._theme = this.toTheme(options);
|
|
74414
|
-
this._transform = new DChartCoordinateTransformImpl(options === null || options === void 0 ? void 0 : options.transform);
|
|
74415
|
-
this._tick = new DChartCoordinateLogTick(options === null || options === void 0 ? void 0 : options.tick);
|
|
74416
|
-
this._work = new DChartRegionImpl(NaN, NaN);
|
|
74417
|
-
this._mark = new DChartCoordinateTransformMarkImpl();
|
|
74418
|
-
this._from = options === null || options === void 0 ? void 0 : options.from;
|
|
74419
|
-
this._to = options === null || options === void 0 ? void 0 : options.to;
|
|
74617
|
+
var DChartCoordinateLog = /** @class */ (function (_super) {
|
|
74618
|
+
__extends(DChartCoordinateLog, _super);
|
|
74619
|
+
function DChartCoordinateLog() {
|
|
74620
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
74420
74621
|
}
|
|
74421
|
-
|
|
74422
|
-
|
|
74423
|
-
return this._from;
|
|
74424
|
-
},
|
|
74425
|
-
set: function (from) {
|
|
74426
|
-
this._from = from;
|
|
74427
|
-
},
|
|
74428
|
-
enumerable: false,
|
|
74429
|
-
configurable: true
|
|
74430
|
-
});
|
|
74431
|
-
Object.defineProperty(DChartCoordinateLog.prototype, "to", {
|
|
74432
|
-
get: function () {
|
|
74433
|
-
return this._to;
|
|
74434
|
-
},
|
|
74435
|
-
set: function (to) {
|
|
74436
|
-
this._to = to;
|
|
74437
|
-
},
|
|
74438
|
-
enumerable: false,
|
|
74439
|
-
configurable: true
|
|
74440
|
-
});
|
|
74441
|
-
DChartCoordinateLog.prototype.bind = function (container, direction) {
|
|
74442
|
-
this._container = container;
|
|
74443
|
-
this._direction = direction;
|
|
74444
|
-
};
|
|
74445
|
-
DChartCoordinateLog.prototype.unbind = function () {
|
|
74446
|
-
this._container = undefined;
|
|
74447
|
-
};
|
|
74448
|
-
DChartCoordinateLog.prototype.fit = function (from, to) {
|
|
74449
|
-
this.doFit(from, to, this._transform);
|
|
74450
|
-
};
|
|
74451
|
-
DChartCoordinateLog.prototype.mark = function (from, to) {
|
|
74452
|
-
var mark = this._mark;
|
|
74453
|
-
var transform = this._transform;
|
|
74454
|
-
mark.oldTranslate = transform.translate;
|
|
74455
|
-
mark.oldScale = transform.scale;
|
|
74456
|
-
this.doFit(from, to, mark);
|
|
74457
|
-
};
|
|
74458
|
-
DChartCoordinateLog.prototype.blend = function (ratio) {
|
|
74459
|
-
this._transform.blend(ratio, this._mark);
|
|
74460
|
-
};
|
|
74461
|
-
DChartCoordinateLog.prototype.doFit = function (from, to, result) {
|
|
74462
|
-
var container = this._container;
|
|
74463
|
-
if (container) {
|
|
74464
|
-
var plotArea = container.container.plotArea;
|
|
74465
|
-
var padding = plotArea.padding;
|
|
74466
|
-
var work = this._work;
|
|
74467
|
-
switch (this._direction) {
|
|
74468
|
-
case DChartCoordinateDirection.X:
|
|
74469
|
-
this.doFit_(padding.getLeft(), plotArea.width - padding.getRight(), this.toFitDomain(from, to, plotArea, work), result);
|
|
74470
|
-
break;
|
|
74471
|
-
case DChartCoordinateDirection.Y:
|
|
74472
|
-
this.doFit_(plotArea.height - padding.getBottom(), padding.getTop(), this.toFitRange(from, to, plotArea, work), result);
|
|
74473
|
-
break;
|
|
74474
|
-
}
|
|
74475
|
-
}
|
|
74476
|
-
};
|
|
74477
|
-
DChartCoordinateLog.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
74478
|
-
if (from == null) {
|
|
74479
|
-
from = this._from;
|
|
74480
|
-
}
|
|
74481
|
-
if (to == null) {
|
|
74482
|
-
to = this._to;
|
|
74483
|
-
}
|
|
74484
|
-
if (from != null && to != null) {
|
|
74485
|
-
result.set(from, to);
|
|
74486
|
-
}
|
|
74487
|
-
else {
|
|
74488
|
-
plotArea.series.getDomain(this, result);
|
|
74489
|
-
result.set(from, to);
|
|
74490
|
-
}
|
|
74491
|
-
return result;
|
|
74492
|
-
};
|
|
74493
|
-
DChartCoordinateLog.prototype.toFitRange = function (from, to, plotArea, result) {
|
|
74494
|
-
if (from == null) {
|
|
74495
|
-
from = this._from;
|
|
74496
|
-
}
|
|
74497
|
-
if (to == null) {
|
|
74498
|
-
to = this._to;
|
|
74499
|
-
}
|
|
74500
|
-
if (from != null && to != null) {
|
|
74501
|
-
result.set(from, to);
|
|
74502
|
-
}
|
|
74503
|
-
else {
|
|
74504
|
-
plotArea.series.getRange(this, result);
|
|
74505
|
-
result.set(from, to);
|
|
74506
|
-
}
|
|
74507
|
-
return result;
|
|
74622
|
+
DChartCoordinateLog.prototype.newTick = function (options) {
|
|
74623
|
+
return new DChartCoordinateLogTick(options);
|
|
74508
74624
|
};
|
|
74509
|
-
DChartCoordinateLog.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
|
|
74510
|
-
var regionFrom = region.from;
|
|
74511
|
-
var regionTo = region.to;
|
|
74512
|
-
if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
|
|
74513
|
-
// Scale
|
|
74514
|
-
var newScale = 1;
|
|
74515
|
-
var regionFromMapped = this.map(regionFrom);
|
|
74516
|
-
var regionToMapped = this.map(regionTo);
|
|
74517
|
-
var regionSizeMapped = regionToMapped - regionFromMapped;
|
|
74518
|
-
if (!this._theme.isZero(regionSizeMapped)) {
|
|
74519
|
-
var pixelSize = pixelTo - pixelFrom;
|
|
74520
|
-
newScale = pixelSize / regionSizeMapped;
|
|
74521
|
-
}
|
|
74522
|
-
else {
|
|
74523
|
-
newScale = pixelTo < pixelFrom ? -1 : 1;
|
|
74524
|
-
}
|
|
74525
|
-
// Translation
|
|
74526
|
-
var newTranslation = pixelFrom - regionFromMapped * newScale;
|
|
74527
|
-
// Done
|
|
74528
|
-
result.set(newTranslation, newScale);
|
|
74529
|
-
}
|
|
74530
|
-
};
|
|
74531
|
-
Object.defineProperty(DChartCoordinateLog.prototype, "id", {
|
|
74532
|
-
get: function () {
|
|
74533
|
-
return this._id;
|
|
74534
|
-
},
|
|
74535
|
-
enumerable: false,
|
|
74536
|
-
configurable: true
|
|
74537
|
-
});
|
|
74538
|
-
Object.defineProperty(DChartCoordinateLog.prototype, "transform", {
|
|
74539
|
-
get: function () {
|
|
74540
|
-
return this._transform;
|
|
74541
|
-
},
|
|
74542
|
-
enumerable: false,
|
|
74543
|
-
configurable: true
|
|
74544
|
-
});
|
|
74545
74625
|
DChartCoordinateLog.prototype.map = function (value) {
|
|
74546
74626
|
return Math.log(Math.max(0, value)) / Math.LN10;
|
|
74547
74627
|
};
|
|
@@ -74560,20 +74640,8 @@ var DChartCoordinateLog = /** @class */ (function () {
|
|
|
74560
74640
|
values[i] = Math.pow(10, values[i]);
|
|
74561
74641
|
}
|
|
74562
74642
|
};
|
|
74563
|
-
DChartCoordinateLog.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
74564
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
74565
|
-
};
|
|
74566
|
-
DChartCoordinateLog.prototype.toTheme = function (options) {
|
|
74567
|
-
return (options && options.theme) || this.getThemeDefault();
|
|
74568
|
-
};
|
|
74569
|
-
DChartCoordinateLog.prototype.getThemeDefault = function () {
|
|
74570
|
-
return DThemes.getInstance().get(this.getType());
|
|
74571
|
-
};
|
|
74572
|
-
DChartCoordinateLog.prototype.getType = function () {
|
|
74573
|
-
return "DChartCoordinate";
|
|
74574
|
-
};
|
|
74575
74643
|
return DChartCoordinateLog;
|
|
74576
|
-
}());
|
|
74644
|
+
}(DChartCoordinateBase));
|
|
74577
74645
|
|
|
74578
74646
|
/*
|
|
74579
74647
|
* Copyright (C) 2019 Toshiba Corporation
|
|
@@ -76126,10 +76194,12 @@ var DChartSeriesBase = /** @class */ (function (_super) {
|
|
|
76126
76194
|
var DChartSeriesLineOfAny = /** @class */ (function (_super) {
|
|
76127
76195
|
__extends(DChartSeriesLineOfAny, _super);
|
|
76128
76196
|
function DChartSeriesLineOfAny(options) {
|
|
76129
|
-
var _this =
|
|
76197
|
+
var _this = this;
|
|
76198
|
+
var _a;
|
|
76199
|
+
_this = _super.call(this, options) || this;
|
|
76130
76200
|
_this._line = null;
|
|
76131
76201
|
_this._options = options;
|
|
76132
|
-
_this._points = (options
|
|
76202
|
+
_this._points = (_a = options === null || options === void 0 ? void 0 : options.points) !== null && _a !== void 0 ? _a : [];
|
|
76133
76203
|
_this._pointId = 0;
|
|
76134
76204
|
_this._pointIdUpdated = NaN;
|
|
76135
76205
|
return _this;
|
|
@@ -87491,6 +87561,43 @@ var DTableBody = /** @class */ (function (_super) {
|
|
|
87491
87561
|
result.height -= dy;
|
|
87492
87562
|
}
|
|
87493
87563
|
};
|
|
87564
|
+
/**
|
|
87565
|
+
* Scroll to the given row or row index.
|
|
87566
|
+
*
|
|
87567
|
+
* @param target a row or an row index to which the body scrolls to.
|
|
87568
|
+
* @returns true if succeeded
|
|
87569
|
+
*/
|
|
87570
|
+
DTableBody.prototype.scrollTo = function (target) {
|
|
87571
|
+
var parent = this.parent;
|
|
87572
|
+
if (parent == null) {
|
|
87573
|
+
return false;
|
|
87574
|
+
}
|
|
87575
|
+
var parentParent = parent.parent;
|
|
87576
|
+
if (parentParent == null) {
|
|
87577
|
+
return false;
|
|
87578
|
+
}
|
|
87579
|
+
var rowIndexMapped = -1;
|
|
87580
|
+
if (isNumber(target)) {
|
|
87581
|
+
if (0 <= target && target < this.data.mapped.size()) {
|
|
87582
|
+
rowIndexMapped = target;
|
|
87583
|
+
}
|
|
87584
|
+
}
|
|
87585
|
+
else {
|
|
87586
|
+
this.data.mapped.each(function (row, _, index) {
|
|
87587
|
+
if (row === target) {
|
|
87588
|
+
rowIndexMapped = index;
|
|
87589
|
+
return false;
|
|
87590
|
+
}
|
|
87591
|
+
return true;
|
|
87592
|
+
});
|
|
87593
|
+
}
|
|
87594
|
+
if (rowIndexMapped < 0) {
|
|
87595
|
+
return false;
|
|
87596
|
+
}
|
|
87597
|
+
parent.position.y = Math.max(Math.min(0, parentParent.height - parent.height), -rowIndexMapped * this._rowHeight);
|
|
87598
|
+
DApplications.update(this);
|
|
87599
|
+
return true;
|
|
87600
|
+
};
|
|
87494
87601
|
DTableBody.prototype.toRowIndexMapped = function (local) {
|
|
87495
87602
|
if (0 <= this.parent.position.y + local.y) {
|
|
87496
87603
|
return Math.floor(local.y / this._rowHeight);
|
|
@@ -89044,7 +89151,7 @@ var toPathGetter = function (path, def) {
|
|
|
89044
89151
|
}
|
|
89045
89152
|
else {
|
|
89046
89153
|
return function (row) {
|
|
89047
|
-
return key_1
|
|
89154
|
+
return Object.prototype.hasOwnProperty.call(row, key_1) ? row[key_1] : def;
|
|
89048
89155
|
};
|
|
89049
89156
|
}
|
|
89050
89157
|
}
|
|
@@ -89063,7 +89170,7 @@ var toPathGetter = function (path, def) {
|
|
|
89063
89170
|
row = row[path[i]];
|
|
89064
89171
|
}
|
|
89065
89172
|
var key = path[path.length - 1];
|
|
89066
|
-
return key
|
|
89173
|
+
return Object.prototype.hasOwnProperty.call(row, key) ? row[key] : def;
|
|
89067
89174
|
};
|
|
89068
89175
|
}
|
|
89069
89176
|
}
|
|
@@ -89119,7 +89226,7 @@ var toColumnDataChecker = function (path) {
|
|
|
89119
89226
|
if (pathLength_1 <= 1) {
|
|
89120
89227
|
var key_3 = path[0];
|
|
89121
89228
|
return function (row) {
|
|
89122
|
-
return key_3
|
|
89229
|
+
return Object.prototype.hasOwnProperty.call(row, key_3);
|
|
89123
89230
|
};
|
|
89124
89231
|
}
|
|
89125
89232
|
else {
|
|
@@ -91352,7 +91459,12 @@ exports.DCanvas = DCanvas;
|
|
|
91352
91459
|
exports.DCanvasContainer = DCanvasContainer;
|
|
91353
91460
|
exports.DChart = DChart;
|
|
91354
91461
|
exports.DChartAxisBase = DChartAxisBase;
|
|
91462
|
+
exports.DChartAxisBaseBar = DChartAxisBaseBar;
|
|
91355
91463
|
exports.DChartAxisBaseOptionParser = DChartAxisBaseOptionParser;
|
|
91464
|
+
exports.DChartAxisBaseTickContainer = DChartAxisBaseTickContainer;
|
|
91465
|
+
exports.DChartAxisBaseTickMajor = DChartAxisBaseTickMajor;
|
|
91466
|
+
exports.DChartAxisBaseTickMajorGridline = DChartAxisBaseTickMajorGridline;
|
|
91467
|
+
exports.DChartAxisBaseTickMinor = DChartAxisBaseTickMinor;
|
|
91356
91468
|
exports.DChartAxisContainerImpl = DChartAxisContainerImpl;
|
|
91357
91469
|
exports.DChartAxisPosition = DChartAxisPosition;
|
|
91358
91470
|
exports.DChartAxisTickPosition = DChartAxisTickPosition;
|
|
@@ -91361,6 +91473,7 @@ exports.DChartAxisXDatetime = DChartAxisXDatetime;
|
|
|
91361
91473
|
exports.DChartAxisY = DChartAxisY;
|
|
91362
91474
|
exports.DChartColorSet1 = DChartColorSet1;
|
|
91363
91475
|
exports.DChartColorSet2 = DChartColorSet2;
|
|
91476
|
+
exports.DChartCoordinateBase = DChartCoordinateBase;
|
|
91364
91477
|
exports.DChartCoordinateContainerImpl = DChartCoordinateContainerImpl;
|
|
91365
91478
|
exports.DChartCoordinateContainerSubImpl = DChartCoordinateContainerSubImpl;
|
|
91366
91479
|
exports.DChartCoordinateDirection = DChartCoordinateDirection;
|