@wcardinal/wcardinal-ui 0.239.0 → 0.241.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-button-base.d.ts +5 -2
- package/dist/types/wcardinal/ui/d-chart-axis-base-options-parser.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-options.d.ts +2 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base.d.ts +7 -6
- package/dist/types/wcardinal/ui/d-chart-axis-container-impl.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-chart-axis-container.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-chart-axis.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-chart-coordinate-linear-tick.d.ts +3 -4
- package/dist/types/wcardinal/ui/d-chart-coordinate-linear.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-log-tick.d.ts +3 -4
- package/dist/types/wcardinal/ui/d-chart-coordinate-log.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-tick.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-coordinate.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-container-impl.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-container.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-x.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-y.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-marker.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-shape-base.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-shape.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-simple.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-chart-selection-sub-impl.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-sub.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-x-datetime.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-tick.d.ts +1 -1
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-axis-x-datetime.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-tick.d.ts +1 -1
- package/dist/wcardinal/ui/d-button-base.js +25 -7
- package/dist/wcardinal/ui/d-button-base.js.map +1 -1
- package/dist/wcardinal/ui/d-button-group.js +7 -1
- package/dist/wcardinal/ui/d-button-group.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js +7 -4
- 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.js +34 -24
- package/dist/wcardinal/ui/d-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-container-impl.js +7 -0
- 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.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js +5 -11
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js +2 -2
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js +4 -10
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log.js +2 -2
- package/dist/wcardinal/ui/d-chart-coordinate-log.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-impl.js +2 -2
- package/dist/wcardinal/ui/d-chart-plot-area-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-container-impl.js +3 -2
- package/dist/wcardinal/ui/d-chart-selection-gridline-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +2 -0
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +2 -0
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-marker.js +2 -0
- package/dist/wcardinal/ui/d-chart-selection-marker.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-simple.js +11 -0
- package/dist/wcardinal/ui/d-chart-selection-simple.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js +4 -2
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js +4 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-x-datetime.js +149 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-x-datetime.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-tick.js +12 -8
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-tick.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js +4 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-x-datetime.js +149 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-x-datetime.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-tick.js +12 -8
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-tick.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +166 -11
- 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 +166 -11
- 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 +449 -88
- package/dist/wcardinal-ui.js +119 -68
- 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.241.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -28010,7 +28010,17 @@ var DButtonBase = /** @class */ (function (_super) {
|
|
|
28010
28010
|
};
|
|
28011
28011
|
Object.defineProperty(DButtonBase.prototype, "isToggle", {
|
|
28012
28012
|
get: function () {
|
|
28013
|
-
return this._isToggle;
|
|
28013
|
+
return !!this._isToggle;
|
|
28014
|
+
},
|
|
28015
|
+
enumerable: false,
|
|
28016
|
+
configurable: true
|
|
28017
|
+
});
|
|
28018
|
+
Object.defineProperty(DButtonBase.prototype, "isGrouped", {
|
|
28019
|
+
get: function () {
|
|
28020
|
+
return !!this._isGrouped;
|
|
28021
|
+
},
|
|
28022
|
+
set: function (isGrouped) {
|
|
28023
|
+
this._isGrouped = isGrouped;
|
|
28014
28024
|
},
|
|
28015
28025
|
enumerable: false,
|
|
28016
28026
|
configurable: true
|
|
@@ -28053,9 +28063,17 @@ var DButtonBase = /** @class */ (function (_super) {
|
|
|
28053
28063
|
return _super.prototype.onDblClick.call(this, e, interactionManager);
|
|
28054
28064
|
};
|
|
28055
28065
|
DButtonBase.prototype.activate = function (e) {
|
|
28056
|
-
if (this.
|
|
28057
|
-
this.
|
|
28058
|
-
|
|
28066
|
+
if (this._isToggle) {
|
|
28067
|
+
if (this._isGrouped) {
|
|
28068
|
+
if (!this.state.isActive) {
|
|
28069
|
+
this.onToggleStart(e);
|
|
28070
|
+
this.onToggleEnd(e);
|
|
28071
|
+
}
|
|
28072
|
+
}
|
|
28073
|
+
else {
|
|
28074
|
+
this.onToggleStart(e);
|
|
28075
|
+
this.onToggleEnd(e);
|
|
28076
|
+
}
|
|
28059
28077
|
}
|
|
28060
28078
|
else {
|
|
28061
28079
|
this.onActivate(e);
|
|
@@ -28069,7 +28087,7 @@ var DButtonBase = /** @class */ (function (_super) {
|
|
|
28069
28087
|
};
|
|
28070
28088
|
DButtonBase.prototype.toggle = function () {
|
|
28071
28089
|
if (this.state.isActionable) {
|
|
28072
|
-
if (this.
|
|
28090
|
+
if (this._isToggle) {
|
|
28073
28091
|
this.onToggleStart();
|
|
28074
28092
|
this.onToggleEnd();
|
|
28075
28093
|
}
|
|
@@ -28088,7 +28106,7 @@ var DButtonBase = /** @class */ (function (_super) {
|
|
|
28088
28106
|
};
|
|
28089
28107
|
DButtonBase.prototype.onActivateKeyDown = function (e) {
|
|
28090
28108
|
if (this.state.isActionable) {
|
|
28091
|
-
if (this.
|
|
28109
|
+
if (this._isToggle) {
|
|
28092
28110
|
this.onToggleStart(e);
|
|
28093
28111
|
}
|
|
28094
28112
|
else {
|
|
@@ -28098,7 +28116,7 @@ var DButtonBase = /** @class */ (function (_super) {
|
|
|
28098
28116
|
};
|
|
28099
28117
|
DButtonBase.prototype.onActivateKeyUp = function (e) {
|
|
28100
28118
|
if (this.state.isActionable) {
|
|
28101
|
-
if (this.
|
|
28119
|
+
if (this._isToggle) {
|
|
28102
28120
|
this.onToggleEnd(e);
|
|
28103
28121
|
}
|
|
28104
28122
|
else {
|
|
@@ -28666,6 +28684,7 @@ var DButtonGroup = /** @class */ (function (_super) {
|
|
|
28666
28684
|
var index = buttons.indexOf(button);
|
|
28667
28685
|
if (index < 0) {
|
|
28668
28686
|
this._buttons.push(button);
|
|
28687
|
+
button.isGrouped = true;
|
|
28669
28688
|
var isEnabled = this._isEnabled;
|
|
28670
28689
|
if (isEnabled != null) {
|
|
28671
28690
|
button.state.isEnabled = isEnabled;
|
|
@@ -28702,6 +28721,7 @@ var DButtonGroup = /** @class */ (function (_super) {
|
|
|
28702
28721
|
var index = buttons.indexOf(button);
|
|
28703
28722
|
if (0 <= index) {
|
|
28704
28723
|
buttons.splice(index, 1);
|
|
28724
|
+
button.isGrouped = false;
|
|
28705
28725
|
button.off("active", this._onActiveBound);
|
|
28706
28726
|
if (this._active === button) {
|
|
28707
28727
|
this.active = null;
|
|
@@ -28714,7 +28734,11 @@ var DButtonGroup = /** @class */ (function (_super) {
|
|
|
28714
28734
|
return 0 <= index;
|
|
28715
28735
|
};
|
|
28716
28736
|
DButtonGroup.prototype.clear = function () {
|
|
28717
|
-
this._buttons
|
|
28737
|
+
var buttons = this._buttons;
|
|
28738
|
+
for (var i = 0, imax = buttons.length; i < imax; ++i) {
|
|
28739
|
+
buttons[i].isGrouped = false;
|
|
28740
|
+
}
|
|
28741
|
+
buttons.length = 0;
|
|
28718
28742
|
this.active = null;
|
|
28719
28743
|
};
|
|
28720
28744
|
DButtonGroup.prototype.size = function () {
|
|
@@ -47890,6 +47914,9 @@ var DThemeWhiteChartAxisBase = /** @class */ (function () {
|
|
|
47890
47914
|
DThemeWhiteChartAxisBase.prototype.getMajorTickCount = function () {
|
|
47891
47915
|
return 3;
|
|
47892
47916
|
};
|
|
47917
|
+
DThemeWhiteChartAxisBase.prototype.getMajorTickCapacity = function (count) {
|
|
47918
|
+
return count * 2;
|
|
47919
|
+
};
|
|
47893
47920
|
DThemeWhiteChartAxisBase.prototype.getMajorTickStep = function () {
|
|
47894
47921
|
return undefined;
|
|
47895
47922
|
};
|
|
@@ -47933,7 +47960,7 @@ var DThemeWhiteChartAxisBase = /** @class */ (function () {
|
|
|
47933
47960
|
return this.getStrokeColor();
|
|
47934
47961
|
};
|
|
47935
47962
|
DThemeWhiteChartAxisBase.prototype.getMajorTickTextFormat = function () {
|
|
47936
|
-
return "
|
|
47963
|
+
return "%.2f";
|
|
47937
47964
|
};
|
|
47938
47965
|
DThemeWhiteChartAxisBase.prototype.getMajorTickTextPaddingHorizontal = function () {
|
|
47939
47966
|
return 15;
|
|
@@ -48044,13 +48071,161 @@ var DThemeWhiteChartAxisX = /** @class */ (function (_super) {
|
|
|
48044
48071
|
* Copyright (C) 2019 Toshiba Corporation
|
|
48045
48072
|
* SPDX-License-Identifier: Apache-2.0
|
|
48046
48073
|
*/
|
|
48074
|
+
var STEP_FUNCTION$1 = function (domainMin, domainMax, majorCount) {
|
|
48075
|
+
var span = Math.abs(domainMax - domainMin) / majorCount;
|
|
48076
|
+
if (span <= 10) {
|
|
48077
|
+
if (span <= 1.5) {
|
|
48078
|
+
return 1;
|
|
48079
|
+
}
|
|
48080
|
+
else if (span <= 3.5) {
|
|
48081
|
+
return 2;
|
|
48082
|
+
}
|
|
48083
|
+
else if (span <= 7.5) {
|
|
48084
|
+
return 5;
|
|
48085
|
+
}
|
|
48086
|
+
return 10;
|
|
48087
|
+
}
|
|
48088
|
+
else if (span <= 100) {
|
|
48089
|
+
if (span <= 15) {
|
|
48090
|
+
return 10;
|
|
48091
|
+
}
|
|
48092
|
+
else if (span <= 35) {
|
|
48093
|
+
return 20;
|
|
48094
|
+
}
|
|
48095
|
+
else if (span <= 75) {
|
|
48096
|
+
return 50;
|
|
48097
|
+
}
|
|
48098
|
+
return 100;
|
|
48099
|
+
}
|
|
48100
|
+
else if (span <= 1000) {
|
|
48101
|
+
if (span <= 150) {
|
|
48102
|
+
return 100;
|
|
48103
|
+
}
|
|
48104
|
+
else if (span <= 350) {
|
|
48105
|
+
return 200;
|
|
48106
|
+
}
|
|
48107
|
+
else if (span <= 750) {
|
|
48108
|
+
return 500;
|
|
48109
|
+
}
|
|
48110
|
+
return 1000;
|
|
48111
|
+
}
|
|
48112
|
+
else if (span <= 10000) {
|
|
48113
|
+
if (span <= 1500) {
|
|
48114
|
+
return 1000;
|
|
48115
|
+
}
|
|
48116
|
+
else if (span <= 3500) {
|
|
48117
|
+
return 2000;
|
|
48118
|
+
}
|
|
48119
|
+
else if (span <= 7500) {
|
|
48120
|
+
return 5000;
|
|
48121
|
+
}
|
|
48122
|
+
return 10000;
|
|
48123
|
+
}
|
|
48124
|
+
else if (span <= 120000) {
|
|
48125
|
+
if (span <= 15000) {
|
|
48126
|
+
return 10000;
|
|
48127
|
+
}
|
|
48128
|
+
else if (span <= 25000) {
|
|
48129
|
+
return 20000;
|
|
48130
|
+
}
|
|
48131
|
+
else if (span <= 45000) {
|
|
48132
|
+
return 30000;
|
|
48133
|
+
}
|
|
48134
|
+
else if (span <= 75000) {
|
|
48135
|
+
return 60000;
|
|
48136
|
+
}
|
|
48137
|
+
else if (span <= 105000) {
|
|
48138
|
+
return 90000;
|
|
48139
|
+
}
|
|
48140
|
+
return 120000;
|
|
48141
|
+
}
|
|
48142
|
+
else if (span <= 10800000) {
|
|
48143
|
+
if (span <= 210000) {
|
|
48144
|
+
return 120000;
|
|
48145
|
+
}
|
|
48146
|
+
else if (span <= 450000) {
|
|
48147
|
+
return 300000;
|
|
48148
|
+
}
|
|
48149
|
+
else if (span <= 900000) {
|
|
48150
|
+
return 600000;
|
|
48151
|
+
}
|
|
48152
|
+
else if (span <= 1500000) {
|
|
48153
|
+
return 1200000;
|
|
48154
|
+
}
|
|
48155
|
+
else if (span <= 2700000) {
|
|
48156
|
+
return 1800000;
|
|
48157
|
+
}
|
|
48158
|
+
else if (span <= 4500000) {
|
|
48159
|
+
return 3600000;
|
|
48160
|
+
}
|
|
48161
|
+
else if (span <= 6300000) {
|
|
48162
|
+
return 5400000;
|
|
48163
|
+
}
|
|
48164
|
+
else if (span <= 8100000) {
|
|
48165
|
+
return 7200000;
|
|
48166
|
+
}
|
|
48167
|
+
else if (span <= 9900000) {
|
|
48168
|
+
return 9000000;
|
|
48169
|
+
}
|
|
48170
|
+
return 10800000;
|
|
48171
|
+
}
|
|
48172
|
+
else {
|
|
48173
|
+
var minutes = 3600000;
|
|
48174
|
+
var hours = span / minutes;
|
|
48175
|
+
if (hours <= 24) {
|
|
48176
|
+
if (hours <= 1.5) {
|
|
48177
|
+
return minutes;
|
|
48178
|
+
}
|
|
48179
|
+
else if (hours <= 2.5) {
|
|
48180
|
+
return 2 * minutes;
|
|
48181
|
+
}
|
|
48182
|
+
else if (hours <= 3.5) {
|
|
48183
|
+
return 3 * minutes;
|
|
48184
|
+
}
|
|
48185
|
+
else if (hours <= 5) {
|
|
48186
|
+
return 4 * minutes;
|
|
48187
|
+
}
|
|
48188
|
+
else if (hours <= 7) {
|
|
48189
|
+
return 6 * minutes;
|
|
48190
|
+
}
|
|
48191
|
+
else if (hours <= 10) {
|
|
48192
|
+
return 8 * minutes;
|
|
48193
|
+
}
|
|
48194
|
+
else if (hours <= 15) {
|
|
48195
|
+
return 12 * minutes;
|
|
48196
|
+
}
|
|
48197
|
+
else if (hours <= 21) {
|
|
48198
|
+
return 18 * minutes;
|
|
48199
|
+
}
|
|
48200
|
+
return 24 * minutes;
|
|
48201
|
+
}
|
|
48202
|
+
else {
|
|
48203
|
+
var days = hours / 24;
|
|
48204
|
+
var base = Math.pow(10, Math.floor(Math.log(days) / Math.LN10));
|
|
48205
|
+
var scale = span / base;
|
|
48206
|
+
if (scale <= 1.5) {
|
|
48207
|
+
return base;
|
|
48208
|
+
}
|
|
48209
|
+
else if (scale <= 3.5) {
|
|
48210
|
+
return 2 * base;
|
|
48211
|
+
}
|
|
48212
|
+
else if (scale <= 7.5) {
|
|
48213
|
+
return 5 * base;
|
|
48214
|
+
}
|
|
48215
|
+
return 10 * base;
|
|
48216
|
+
}
|
|
48217
|
+
}
|
|
48218
|
+
};
|
|
48047
48219
|
var DThemeWhiteChartAxisXDatetime = /** @class */ (function (_super) {
|
|
48048
48220
|
__extends(DThemeWhiteChartAxisXDatetime, _super);
|
|
48049
48221
|
function DThemeWhiteChartAxisXDatetime() {
|
|
48050
48222
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
48051
48223
|
}
|
|
48052
48224
|
DThemeWhiteChartAxisXDatetime.prototype.getMajorTickTextFormat = function () {
|
|
48053
|
-
return "%YMD\n%Hms
|
|
48225
|
+
return "%YMD\n%Hms";
|
|
48226
|
+
};
|
|
48227
|
+
DThemeWhiteChartAxisXDatetime.prototype.getMajorTickStep = function () {
|
|
48228
|
+
return STEP_FUNCTION$1;
|
|
48054
48229
|
};
|
|
48055
48230
|
return DThemeWhiteChartAxisXDatetime;
|
|
48056
48231
|
}(DThemeWhiteChartAxisX));
|
|
@@ -48093,17 +48268,21 @@ var DThemeWhiteChartCoordinate = /** @class */ (function () {
|
|
|
48093
48268
|
var DThemeWhiteChartCoordinateTick = /** @class */ (function () {
|
|
48094
48269
|
function DThemeWhiteChartCoordinateTick() {
|
|
48095
48270
|
}
|
|
48096
|
-
DThemeWhiteChartCoordinateTick.prototype.
|
|
48097
|
-
|
|
48098
|
-
|
|
48271
|
+
DThemeWhiteChartCoordinateTick.prototype.toStep = function (domainMin, domainMax, majorCount) {
|
|
48272
|
+
var span = Math.abs(domainMax - domainMin) / majorCount;
|
|
48273
|
+
var power = Math.floor(Math.log(span) / Math.LN10);
|
|
48274
|
+
var base = Math.pow(10, power);
|
|
48275
|
+
var scale = span / base;
|
|
48276
|
+
if (7.5 <= scale) {
|
|
48277
|
+
return 10 * base;
|
|
48099
48278
|
}
|
|
48100
|
-
else if (
|
|
48101
|
-
return 5;
|
|
48279
|
+
else if (3.5 <= scale) {
|
|
48280
|
+
return 5 * base;
|
|
48102
48281
|
}
|
|
48103
|
-
else if (1.
|
|
48104
|
-
return 2;
|
|
48282
|
+
else if (1.5 <= scale) {
|
|
48283
|
+
return 2 * base;
|
|
48105
48284
|
}
|
|
48106
|
-
return
|
|
48285
|
+
return base;
|
|
48107
48286
|
};
|
|
48108
48287
|
return DThemeWhiteChartCoordinateTick;
|
|
48109
48288
|
}());
|
|
@@ -56830,6 +57009,9 @@ var DThemeDarkChartAxisBase = /** @class */ (function () {
|
|
|
56830
57009
|
DThemeDarkChartAxisBase.prototype.getMajorTickCount = function () {
|
|
56831
57010
|
return 3;
|
|
56832
57011
|
};
|
|
57012
|
+
DThemeDarkChartAxisBase.prototype.getMajorTickCapacity = function (count) {
|
|
57013
|
+
return count * 2;
|
|
57014
|
+
};
|
|
56833
57015
|
DThemeDarkChartAxisBase.prototype.getMajorTickStep = function () {
|
|
56834
57016
|
return undefined;
|
|
56835
57017
|
};
|
|
@@ -56873,7 +57055,7 @@ var DThemeDarkChartAxisBase = /** @class */ (function () {
|
|
|
56873
57055
|
return this.getStrokeColor();
|
|
56874
57056
|
};
|
|
56875
57057
|
DThemeDarkChartAxisBase.prototype.getMajorTickTextFormat = function () {
|
|
56876
|
-
return "
|
|
57058
|
+
return "%.2f";
|
|
56877
57059
|
};
|
|
56878
57060
|
DThemeDarkChartAxisBase.prototype.getMajorTickTextPaddingHorizontal = function () {
|
|
56879
57061
|
return 15;
|
|
@@ -56984,13 +57166,161 @@ var DThemeDarkChartAxisX = /** @class */ (function (_super) {
|
|
|
56984
57166
|
* Copyright (C) 2019 Toshiba Corporation
|
|
56985
57167
|
* SPDX-License-Identifier: Apache-2.0
|
|
56986
57168
|
*/
|
|
57169
|
+
var STEP_FUNCTION = function (domainMin, domainMax, majorCount) {
|
|
57170
|
+
var span = Math.abs(domainMax - domainMin) / majorCount;
|
|
57171
|
+
if (span <= 10) {
|
|
57172
|
+
if (span <= 1.5) {
|
|
57173
|
+
return 1;
|
|
57174
|
+
}
|
|
57175
|
+
else if (span <= 3.5) {
|
|
57176
|
+
return 2;
|
|
57177
|
+
}
|
|
57178
|
+
else if (span <= 7.5) {
|
|
57179
|
+
return 5;
|
|
57180
|
+
}
|
|
57181
|
+
return 10;
|
|
57182
|
+
}
|
|
57183
|
+
else if (span <= 100) {
|
|
57184
|
+
if (span <= 15) {
|
|
57185
|
+
return 10;
|
|
57186
|
+
}
|
|
57187
|
+
else if (span <= 35) {
|
|
57188
|
+
return 20;
|
|
57189
|
+
}
|
|
57190
|
+
else if (span <= 75) {
|
|
57191
|
+
return 50;
|
|
57192
|
+
}
|
|
57193
|
+
return 100;
|
|
57194
|
+
}
|
|
57195
|
+
else if (span <= 1000) {
|
|
57196
|
+
if (span <= 150) {
|
|
57197
|
+
return 100;
|
|
57198
|
+
}
|
|
57199
|
+
else if (span <= 350) {
|
|
57200
|
+
return 200;
|
|
57201
|
+
}
|
|
57202
|
+
else if (span <= 750) {
|
|
57203
|
+
return 500;
|
|
57204
|
+
}
|
|
57205
|
+
return 1000;
|
|
57206
|
+
}
|
|
57207
|
+
else if (span <= 10000) {
|
|
57208
|
+
if (span <= 1500) {
|
|
57209
|
+
return 1000;
|
|
57210
|
+
}
|
|
57211
|
+
else if (span <= 3500) {
|
|
57212
|
+
return 2000;
|
|
57213
|
+
}
|
|
57214
|
+
else if (span <= 7500) {
|
|
57215
|
+
return 5000;
|
|
57216
|
+
}
|
|
57217
|
+
return 10000;
|
|
57218
|
+
}
|
|
57219
|
+
else if (span <= 120000) {
|
|
57220
|
+
if (span <= 15000) {
|
|
57221
|
+
return 10000;
|
|
57222
|
+
}
|
|
57223
|
+
else if (span <= 25000) {
|
|
57224
|
+
return 20000;
|
|
57225
|
+
}
|
|
57226
|
+
else if (span <= 45000) {
|
|
57227
|
+
return 30000;
|
|
57228
|
+
}
|
|
57229
|
+
else if (span <= 75000) {
|
|
57230
|
+
return 60000;
|
|
57231
|
+
}
|
|
57232
|
+
else if (span <= 105000) {
|
|
57233
|
+
return 90000;
|
|
57234
|
+
}
|
|
57235
|
+
return 120000;
|
|
57236
|
+
}
|
|
57237
|
+
else if (span <= 10800000) {
|
|
57238
|
+
if (span <= 210000) {
|
|
57239
|
+
return 120000;
|
|
57240
|
+
}
|
|
57241
|
+
else if (span <= 450000) {
|
|
57242
|
+
return 300000;
|
|
57243
|
+
}
|
|
57244
|
+
else if (span <= 900000) {
|
|
57245
|
+
return 600000;
|
|
57246
|
+
}
|
|
57247
|
+
else if (span <= 1500000) {
|
|
57248
|
+
return 1200000;
|
|
57249
|
+
}
|
|
57250
|
+
else if (span <= 2700000) {
|
|
57251
|
+
return 1800000;
|
|
57252
|
+
}
|
|
57253
|
+
else if (span <= 4500000) {
|
|
57254
|
+
return 3600000;
|
|
57255
|
+
}
|
|
57256
|
+
else if (span <= 6300000) {
|
|
57257
|
+
return 5400000;
|
|
57258
|
+
}
|
|
57259
|
+
else if (span <= 8100000) {
|
|
57260
|
+
return 7200000;
|
|
57261
|
+
}
|
|
57262
|
+
else if (span <= 9900000) {
|
|
57263
|
+
return 9000000;
|
|
57264
|
+
}
|
|
57265
|
+
return 10800000;
|
|
57266
|
+
}
|
|
57267
|
+
else {
|
|
57268
|
+
var minutes = 3600000;
|
|
57269
|
+
var hours = span / minutes;
|
|
57270
|
+
if (hours <= 24) {
|
|
57271
|
+
if (hours <= 1.5) {
|
|
57272
|
+
return minutes;
|
|
57273
|
+
}
|
|
57274
|
+
else if (hours <= 2.5) {
|
|
57275
|
+
return 2 * minutes;
|
|
57276
|
+
}
|
|
57277
|
+
else if (hours <= 3.5) {
|
|
57278
|
+
return 3 * minutes;
|
|
57279
|
+
}
|
|
57280
|
+
else if (hours <= 5) {
|
|
57281
|
+
return 4 * minutes;
|
|
57282
|
+
}
|
|
57283
|
+
else if (hours <= 7) {
|
|
57284
|
+
return 6 * minutes;
|
|
57285
|
+
}
|
|
57286
|
+
else if (hours <= 10) {
|
|
57287
|
+
return 8 * minutes;
|
|
57288
|
+
}
|
|
57289
|
+
else if (hours <= 15) {
|
|
57290
|
+
return 12 * minutes;
|
|
57291
|
+
}
|
|
57292
|
+
else if (hours <= 21) {
|
|
57293
|
+
return 18 * minutes;
|
|
57294
|
+
}
|
|
57295
|
+
return 24 * minutes;
|
|
57296
|
+
}
|
|
57297
|
+
else {
|
|
57298
|
+
var days = hours / 24;
|
|
57299
|
+
var base = Math.pow(10, Math.floor(Math.log(days) / Math.LN10));
|
|
57300
|
+
var scale = span / base;
|
|
57301
|
+
if (scale <= 1.5) {
|
|
57302
|
+
return base;
|
|
57303
|
+
}
|
|
57304
|
+
else if (scale <= 3.5) {
|
|
57305
|
+
return 2 * base;
|
|
57306
|
+
}
|
|
57307
|
+
else if (scale <= 7.5) {
|
|
57308
|
+
return 5 * base;
|
|
57309
|
+
}
|
|
57310
|
+
return 10 * base;
|
|
57311
|
+
}
|
|
57312
|
+
}
|
|
57313
|
+
};
|
|
56987
57314
|
var DThemeDarkChartAxisXDatetime = /** @class */ (function (_super) {
|
|
56988
57315
|
__extends(DThemeDarkChartAxisXDatetime, _super);
|
|
56989
57316
|
function DThemeDarkChartAxisXDatetime() {
|
|
56990
57317
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
56991
57318
|
}
|
|
56992
57319
|
DThemeDarkChartAxisXDatetime.prototype.getMajorTickTextFormat = function () {
|
|
56993
|
-
return "%YMD\n%Hms
|
|
57320
|
+
return "%YMD\n%Hms";
|
|
57321
|
+
};
|
|
57322
|
+
DThemeDarkChartAxisXDatetime.prototype.getMajorTickStep = function () {
|
|
57323
|
+
return STEP_FUNCTION;
|
|
56994
57324
|
};
|
|
56995
57325
|
return DThemeDarkChartAxisXDatetime;
|
|
56996
57326
|
}(DThemeDarkChartAxisX));
|
|
@@ -57033,17 +57363,21 @@ var DThemeDarkChartCoordinate = /** @class */ (function () {
|
|
|
57033
57363
|
var DThemeDarkChartCoordinateTick = /** @class */ (function () {
|
|
57034
57364
|
function DThemeDarkChartCoordinateTick() {
|
|
57035
57365
|
}
|
|
57036
|
-
DThemeDarkChartCoordinateTick.prototype.
|
|
57037
|
-
|
|
57038
|
-
|
|
57366
|
+
DThemeDarkChartCoordinateTick.prototype.toStep = function (domainMin, domainMax, majorCount) {
|
|
57367
|
+
var span = Math.abs(domainMax - domainMin) / majorCount;
|
|
57368
|
+
var power = Math.floor(Math.log(span) / Math.LN10);
|
|
57369
|
+
var base = Math.pow(10, power);
|
|
57370
|
+
var scale = span / base;
|
|
57371
|
+
if (7.5 <= scale) {
|
|
57372
|
+
return 10 * base;
|
|
57039
57373
|
}
|
|
57040
|
-
else if (
|
|
57041
|
-
return 5;
|
|
57374
|
+
else if (3.5 <= scale) {
|
|
57375
|
+
return 5 * base;
|
|
57042
57376
|
}
|
|
57043
|
-
else if (1.
|
|
57044
|
-
return 2;
|
|
57377
|
+
else if (1.5 <= scale) {
|
|
57378
|
+
return 2 * base;
|
|
57045
57379
|
}
|
|
57046
|
-
return
|
|
57380
|
+
return base;
|
|
57047
57381
|
};
|
|
57048
57382
|
return DThemeDarkChartCoordinateTick;
|
|
57049
57383
|
}());
|
|
@@ -71312,17 +71646,20 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
71312
71646
|
};
|
|
71313
71647
|
};
|
|
71314
71648
|
DChartAxisBaseOptionParser.prototype.toTickMajor = function (theme, options) {
|
|
71315
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
71649
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
71316
71650
|
var major = options === null || options === void 0 ? void 0 : options.major;
|
|
71317
71651
|
var position = (_b = (_a = major === null || major === void 0 ? void 0 : major.position) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.position) !== null && _b !== void 0 ? _b : theme.getMajorTickPosition();
|
|
71318
71652
|
var optionsStyle = options === null || options === void 0 ? void 0 : options.style;
|
|
71319
71653
|
var style = EShapePointsStyles.from((_d = (_c = major === null || major === void 0 ? void 0 : major.style) !== null && _c !== void 0 ? _c : optionsStyle) !== null && _d !== void 0 ? _d : theme.getMajorTickStyle());
|
|
71320
71654
|
var optionsStroke = options === null || options === void 0 ? void 0 : options.stroke;
|
|
71321
71655
|
var stroke = this.toTickMajorStroke(theme, major === null || major === void 0 ? void 0 : major.stroke, optionsStroke);
|
|
71656
|
+
var count = (_e = major === null || major === void 0 ? void 0 : major.count) !== null && _e !== void 0 ? _e : theme.getMajorTickCount();
|
|
71657
|
+
var capacity = (_f = major === null || major === void 0 ? void 0 : major.capacity) !== null && _f !== void 0 ? _f : theme.getMajorTickCapacity(count);
|
|
71322
71658
|
return {
|
|
71323
|
-
count:
|
|
71324
|
-
|
|
71325
|
-
|
|
71659
|
+
count: count,
|
|
71660
|
+
capacity: capacity,
|
|
71661
|
+
step: (_g = major === null || major === void 0 ? void 0 : major.step) !== null && _g !== void 0 ? _g : theme.getMajorTickStep(),
|
|
71662
|
+
size: (_h = major === null || major === void 0 ? void 0 : major.size) !== null && _h !== void 0 ? _h : theme.getMajorTickSize(),
|
|
71326
71663
|
position: this.toTickPosition(position),
|
|
71327
71664
|
style: style,
|
|
71328
71665
|
stroke: stroke,
|
|
@@ -71621,10 +71958,8 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71621
71958
|
this._tick = tick;
|
|
71622
71959
|
this._label = parser.label;
|
|
71623
71960
|
this._bar = parser.bar;
|
|
71624
|
-
|
|
71625
|
-
|
|
71626
|
-
this._majorTicks = new Float64Array(tickMajorCount * 3);
|
|
71627
|
-
this._minorTicks = new Float64Array((tickMajorCount + 1) * tickMinorCount * 3);
|
|
71961
|
+
this._majorTicks = [];
|
|
71962
|
+
this._minorTicks = [];
|
|
71628
71963
|
}
|
|
71629
71964
|
Object.defineProperty(DChartAxisBase.prototype, "position", {
|
|
71630
71965
|
get: function () {
|
|
@@ -71663,25 +71998,27 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71663
71998
|
break;
|
|
71664
71999
|
}
|
|
71665
72000
|
shape.allowUploadedUpdate();
|
|
71666
|
-
|
|
72001
|
+
return true;
|
|
71667
72002
|
}
|
|
72003
|
+
return false;
|
|
71668
72004
|
};
|
|
71669
72005
|
DChartAxisBase.prototype.updateTicksX = function (domainMin, domainMax, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionY, transform, plotAreaHeight) {
|
|
71670
72006
|
var tick = this._tick;
|
|
71671
72007
|
var majorTick = tick.major;
|
|
71672
72008
|
var majorCount = majorTick.count;
|
|
72009
|
+
var majorCapacity = majorTick.capacity;
|
|
71673
72010
|
var majorStep = majorTick.step;
|
|
71674
72011
|
var majorFormatter = majorTick.formatter;
|
|
71675
72012
|
var minorTick = tick.minor;
|
|
71676
72013
|
var minorCountPerMajor = minorTick.count;
|
|
71677
|
-
var minorCount = (
|
|
72014
|
+
var minorCount = (majorCapacity + 1) * minorCountPerMajor;
|
|
71678
72015
|
var minorStep = minorTick.step;
|
|
71679
72016
|
var majorTicks = this._majorTicks;
|
|
71680
72017
|
var minorTicks = this._minorTicks;
|
|
71681
|
-
coordinate.ticks(domainMin, domainMax, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
72018
|
+
coordinate.ticks(domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
71682
72019
|
var a = transform.a;
|
|
71683
72020
|
var tx = transform.tx;
|
|
71684
|
-
for (var i = 0; i <
|
|
72021
|
+
for (var i = 0; i < majorCapacity; ++i) {
|
|
71685
72022
|
var majorShape = majorShapes[i];
|
|
71686
72023
|
var imajorTick = i * 3;
|
|
71687
72024
|
var majorTickPosition = majorTicks[imajorTick + 0];
|
|
@@ -71725,23 +72062,25 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71725
72062
|
minorShape.visible = false;
|
|
71726
72063
|
}
|
|
71727
72064
|
}
|
|
72065
|
+
return true;
|
|
71728
72066
|
};
|
|
71729
72067
|
DChartAxisBase.prototype.updateTicksY = function (domainMin, domainMax, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaWidth) {
|
|
71730
72068
|
var tick = this._tick;
|
|
71731
72069
|
var majorTick = tick.major;
|
|
71732
72070
|
var majorCount = majorTick.count;
|
|
72071
|
+
var majorCapacity = majorTick.capacity;
|
|
71733
72072
|
var majorStep = majorTick.step;
|
|
71734
72073
|
var majorFormatter = majorTick.formatter;
|
|
71735
72074
|
var minorTick = tick.minor;
|
|
71736
72075
|
var minorCountPerMajor = minorTick.count;
|
|
71737
|
-
var minorCount = (
|
|
72076
|
+
var minorCount = (majorCapacity + 1) * minorCountPerMajor;
|
|
71738
72077
|
var minorStep = minorTick.step;
|
|
71739
72078
|
var majorTicks = this._majorTicks;
|
|
71740
72079
|
var minorTicks = this._minorTicks;
|
|
71741
|
-
coordinate.ticks(domainMin, domainMax, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
72080
|
+
coordinate.ticks(domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
71742
72081
|
var d = transform.d;
|
|
71743
72082
|
var ty = transform.ty;
|
|
71744
|
-
for (var i = 0; i <
|
|
72083
|
+
for (var i = 0; i < majorCapacity; ++i) {
|
|
71745
72084
|
var majorShape = majorShapes[i];
|
|
71746
72085
|
var imajorTick = i * 3;
|
|
71747
72086
|
var majorTickPosition = majorTicks[imajorTick + 0];
|
|
@@ -71785,6 +72124,7 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71785
72124
|
minorShape.visible = false;
|
|
71786
72125
|
}
|
|
71787
72126
|
}
|
|
72127
|
+
return true;
|
|
71788
72128
|
};
|
|
71789
72129
|
DChartAxisBase.prototype.updateTicks = function (container) {
|
|
71790
72130
|
var tick = this._tick;
|
|
@@ -71805,8 +72145,7 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71805
72145
|
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
|
|
71806
72146
|
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
|
|
71807
72147
|
var plotAreaHeight = plotArea.height;
|
|
71808
|
-
this.updateTicksX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - padding, transform, plotAreaHeight);
|
|
71809
|
-
DApplications.update(plotArea);
|
|
72148
|
+
return this.updateTicksX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - padding, transform, plotAreaHeight);
|
|
71810
72149
|
}
|
|
71811
72150
|
break;
|
|
71812
72151
|
case DChartAxisPosition.BOTTOM:
|
|
@@ -71815,8 +72154,7 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71815
72154
|
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
|
|
71816
72155
|
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
|
|
71817
72156
|
var plotAreaHeight = plotArea.height;
|
|
71818
|
-
this.updateTicksX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + padding, transform, plotAreaHeight);
|
|
71819
|
-
DApplications.update(plotArea);
|
|
72157
|
+
return this.updateTicksX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + padding, transform, plotAreaHeight);
|
|
71820
72158
|
}
|
|
71821
72159
|
break;
|
|
71822
72160
|
case DChartAxisPosition.LEFT:
|
|
@@ -71825,8 +72163,7 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71825
72163
|
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
|
|
71826
72164
|
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
|
|
71827
72165
|
var plotAreaWidth = plotArea.width;
|
|
71828
|
-
this.updateTicksY(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - padding, transform, plotAreaWidth);
|
|
71829
|
-
DApplications.update(plotArea);
|
|
72166
|
+
return this.updateTicksY(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - padding, transform, plotAreaWidth);
|
|
71830
72167
|
}
|
|
71831
72168
|
break;
|
|
71832
72169
|
case DChartAxisPosition.RIGHT:
|
|
@@ -71835,12 +72172,12 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71835
72172
|
var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
|
|
71836
72173
|
var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
|
|
71837
72174
|
var plotAreaWidth = plotArea.width;
|
|
71838
|
-
this.updateTicksY(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaWidth + padding, transform, plotAreaWidth);
|
|
71839
|
-
DApplications.update(plotArea);
|
|
72175
|
+
return this.updateTicksY(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaWidth + padding, transform, plotAreaWidth);
|
|
71840
72176
|
}
|
|
71841
72177
|
break;
|
|
71842
72178
|
}
|
|
71843
72179
|
}
|
|
72180
|
+
return false;
|
|
71844
72181
|
};
|
|
71845
72182
|
DChartAxisBase.prototype.bind = function (container, index) {
|
|
71846
72183
|
this._container = container;
|
|
@@ -71875,9 +72212,9 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71875
72212
|
var gridlinePosition = position === DChartAxisPosition.LEFT || position === DChartAxisPosition.RIGHT
|
|
71876
72213
|
? EShapeBarPosition.LEFT
|
|
71877
72214
|
: EShapeBarPosition.TOP;
|
|
71878
|
-
var
|
|
72215
|
+
var gridlineCapacity = tickMajor.capacity;
|
|
71879
72216
|
var gridlineStyle = gridline.style || EShapePointsStyle.NONE;
|
|
71880
|
-
for (var i = 0; i <
|
|
72217
|
+
for (var i = 0; i < gridlineCapacity; ++i) {
|
|
71881
72218
|
var gridlineShape = new EShapeBar();
|
|
71882
72219
|
gridlineShape.points.position = gridlinePosition;
|
|
71883
72220
|
gridlineShape.points.style = gridlineStyle;
|
|
@@ -71895,11 +72232,11 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71895
72232
|
if (!tickMajorShapes && tick.enable) {
|
|
71896
72233
|
tickMajorShapes = [];
|
|
71897
72234
|
tickMajor.shapes = tickMajorShapes;
|
|
71898
|
-
var
|
|
72235
|
+
var tickMajorCapacity = tickMajor.capacity;
|
|
71899
72236
|
var tickMajorSize = tickMajor.size;
|
|
71900
72237
|
var tickMajorPosition = tickMajor.position;
|
|
71901
72238
|
var tickMajorStyle = tickMajor.style || EShapePointsStyle.NONE;
|
|
71902
|
-
for (var i = 0; i <
|
|
72239
|
+
for (var i = 0; i < tickMajorCapacity; ++i) {
|
|
71903
72240
|
var tickMajorShape = new EShapeBar();
|
|
71904
72241
|
tickMajorShape.points.position = tickMajorPosition;
|
|
71905
72242
|
tickMajorShape.points.size = tickMajorSize;
|
|
@@ -71925,7 +72262,7 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71925
72262
|
var tickMinorSize = tickMinor.size;
|
|
71926
72263
|
var tickMinorPosition = tickMinor.position;
|
|
71927
72264
|
var tickMinorStyle = tickMinor.style || EShapePointsStyle.NONE;
|
|
71928
|
-
for (var i = 0, imax = (tickMajor.
|
|
72265
|
+
for (var i = 0, imax = (tickMajor.capacity + 1) * tickMinorCount; i < imax; ++i) {
|
|
71929
72266
|
var tickMinorShape = new EShapeBar();
|
|
71930
72267
|
tickMinorShape.points.position = tickMinorPosition;
|
|
71931
72268
|
tickMinorShape.points.size = tickMinorSize;
|
|
@@ -71973,6 +72310,16 @@ var DChartAxisBase = /** @class */ (function () {
|
|
|
71973
72310
|
this._container = undefined;
|
|
71974
72311
|
};
|
|
71975
72312
|
DChartAxisBase.prototype.update = function () {
|
|
72313
|
+
var container = this._container;
|
|
72314
|
+
if (container) {
|
|
72315
|
+
var isBarUpdated = this.updateBar(container);
|
|
72316
|
+
var isTicksUpdated = this.updateTicks(container);
|
|
72317
|
+
if (isBarUpdated || isTicksUpdated) {
|
|
72318
|
+
DApplications.update(container.plotArea);
|
|
72319
|
+
}
|
|
72320
|
+
}
|
|
72321
|
+
};
|
|
72322
|
+
DChartAxisBase.prototype.onRender = function () {
|
|
71976
72323
|
var container = this._container;
|
|
71977
72324
|
if (container) {
|
|
71978
72325
|
this.updateBar(container);
|
|
@@ -72106,6 +72453,13 @@ var DChartAxisContainerImpl = /** @class */ (function () {
|
|
|
72106
72453
|
}
|
|
72107
72454
|
});
|
|
72108
72455
|
};
|
|
72456
|
+
DChartAxisContainerImpl.prototype.onRender = function () {
|
|
72457
|
+
this._list.forEach(function (axes) {
|
|
72458
|
+
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
72459
|
+
axes[i].onRender();
|
|
72460
|
+
}
|
|
72461
|
+
});
|
|
72462
|
+
};
|
|
72109
72463
|
DChartAxisContainerImpl.prototype.destroy = function () {
|
|
72110
72464
|
this._list.forEach(function (axes) {
|
|
72111
72465
|
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
@@ -72388,7 +72742,7 @@ var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
|
72388
72742
|
DChartCoordinateLinearTick.prototype.toMajorStep = function (domainMin, domainMax, majorCount, majorStep) {
|
|
72389
72743
|
if (majorStep == null) {
|
|
72390
72744
|
if (0 < majorCount) {
|
|
72391
|
-
return this.
|
|
72745
|
+
return this._theme.toStep(domainMin, domainMax, majorCount);
|
|
72392
72746
|
}
|
|
72393
72747
|
return -1;
|
|
72394
72748
|
}
|
|
@@ -72399,12 +72753,6 @@ var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
|
72399
72753
|
return majorStep(domainMin, domainMax, majorCount);
|
|
72400
72754
|
}
|
|
72401
72755
|
};
|
|
72402
|
-
DChartCoordinateLinearTick.prototype.calcStepMajor = function (domainMin, domainMax, majorCount) {
|
|
72403
|
-
var span = Math.abs(domainMax - domainMin) / majorCount;
|
|
72404
|
-
var power = Math.floor(Math.log(span) / Math.LN10);
|
|
72405
|
-
var base = Math.pow(10, power);
|
|
72406
|
-
return this._theme.toStepScale(span / base) * base;
|
|
72407
|
-
};
|
|
72408
72756
|
DChartCoordinateLinearTick.prototype.toMinorStep = function (majorStep, minorCount, minorStep) {
|
|
72409
72757
|
if (minorStep == null) {
|
|
72410
72758
|
if (0 <= majorStep) {
|
|
@@ -72430,7 +72778,7 @@ var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
|
72430
72778
|
}
|
|
72431
72779
|
}
|
|
72432
72780
|
};
|
|
72433
|
-
DChartCoordinateLinearTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
72781
|
+
DChartCoordinateLinearTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
72434
72782
|
if (majorCount <= 0) {
|
|
72435
72783
|
return;
|
|
72436
72784
|
}
|
|
@@ -72442,7 +72790,7 @@ var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
|
72442
72790
|
majorResult[0] = domainMin;
|
|
72443
72791
|
majorResult[1] = transform.map(coordinate.map(domainMin));
|
|
72444
72792
|
majorResult[2] = 0;
|
|
72445
|
-
for (var i = 1; i <
|
|
72793
|
+
for (var i = 1; i < majorCapacity; ++i) {
|
|
72446
72794
|
var imajorResult = i * 3;
|
|
72447
72795
|
majorResult[imajorResult + 0] = NaN;
|
|
72448
72796
|
majorResult[imajorResult + 1] = NaN;
|
|
@@ -72469,7 +72817,7 @@ var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
|
72469
72817
|
var iminor = 0;
|
|
72470
72818
|
for (var i = idomainStart; i <= idomainEnd; ++i) {
|
|
72471
72819
|
var majorPosition = i * majorStepMapped;
|
|
72472
|
-
if (imajor <
|
|
72820
|
+
if (imajor < majorCapacity) {
|
|
72473
72821
|
var majorPositionMapped = transform.map(coordinate.map(majorPosition));
|
|
72474
72822
|
if (from <= majorPositionMapped && majorPositionMapped <= to) {
|
|
72475
72823
|
var imajorResult = imajor * 3;
|
|
@@ -72493,7 +72841,7 @@ var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
|
72493
72841
|
}
|
|
72494
72842
|
}
|
|
72495
72843
|
}
|
|
72496
|
-
for (var i = imajor; i <
|
|
72844
|
+
for (var i = imajor; i < majorCapacity; ++i) {
|
|
72497
72845
|
var imajorResult = i * 3;
|
|
72498
72846
|
majorResult[imajorResult + 0] = NaN;
|
|
72499
72847
|
majorResult[imajorResult + 1] = NaN;
|
|
@@ -72827,8 +73175,8 @@ var DChartCoordinateLinear = /** @class */ (function () {
|
|
|
72827
73175
|
DChartCoordinateLinear.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
72828
73176
|
// DO NOTHING
|
|
72829
73177
|
};
|
|
72830
|
-
DChartCoordinateLinear.prototype.ticks = function (domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
72831
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
73178
|
+
DChartCoordinateLinear.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
73179
|
+
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
72832
73180
|
};
|
|
72833
73181
|
DChartCoordinateLinear.prototype.toTheme = function (options) {
|
|
72834
73182
|
return (options && options.theme) || this.getThemeDefault();
|
|
@@ -72853,7 +73201,7 @@ var DChartCoordinateLogTick = /** @class */ (function () {
|
|
|
72853
73201
|
DChartCoordinateLogTick.prototype.toMajorStep = function (domainMin, domainMax, majorCount, majorStep) {
|
|
72854
73202
|
if (majorStep == null) {
|
|
72855
73203
|
if (0 < majorCount) {
|
|
72856
|
-
return this.
|
|
73204
|
+
return this._theme.toStep(domainMin, domainMax, majorCount);
|
|
72857
73205
|
}
|
|
72858
73206
|
return -1;
|
|
72859
73207
|
}
|
|
@@ -72864,12 +73212,6 @@ var DChartCoordinateLogTick = /** @class */ (function () {
|
|
|
72864
73212
|
return majorStep(domainMin, domainMax, majorCount);
|
|
72865
73213
|
}
|
|
72866
73214
|
};
|
|
72867
|
-
DChartCoordinateLogTick.prototype.calcStepMajor = function (domainMin, domainMax, majorCount) {
|
|
72868
|
-
var span = Math.abs(domainMax - domainMin) / majorCount;
|
|
72869
|
-
var power = Math.floor(Math.log(span) / Math.LN10);
|
|
72870
|
-
var base = Math.pow(10, power);
|
|
72871
|
-
return this._theme.toStepScale(span / base) * base;
|
|
72872
|
-
};
|
|
72873
73215
|
DChartCoordinateLogTick.prototype.toMinorStep = function (majorStep, minorCount, minorStep) {
|
|
72874
73216
|
if (minorStep == null) {
|
|
72875
73217
|
if (0 <= majorStep) {
|
|
@@ -72895,7 +73237,7 @@ var DChartCoordinateLogTick = /** @class */ (function () {
|
|
|
72895
73237
|
}
|
|
72896
73238
|
}
|
|
72897
73239
|
};
|
|
72898
|
-
DChartCoordinateLogTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
73240
|
+
DChartCoordinateLogTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
72899
73241
|
if (majorCount <= 0) {
|
|
72900
73242
|
return;
|
|
72901
73243
|
}
|
|
@@ -72933,7 +73275,7 @@ var DChartCoordinateLogTick = /** @class */ (function () {
|
|
|
72933
73275
|
var iminor = 0;
|
|
72934
73276
|
for (var i = idomainStartMapped; i <= idomainEndMapped; ++i) {
|
|
72935
73277
|
var majorPositionMapped = i * majorStepMapped;
|
|
72936
|
-
if (imajor <
|
|
73278
|
+
if (imajor < majorCapacity) {
|
|
72937
73279
|
if (domainMinMapped <= majorPositionMapped &&
|
|
72938
73280
|
majorPositionMapped <= domainMaxMapped) {
|
|
72939
73281
|
var imajorResult = imajor * 3;
|
|
@@ -72957,7 +73299,7 @@ var DChartCoordinateLogTick = /** @class */ (function () {
|
|
|
72957
73299
|
}
|
|
72958
73300
|
}
|
|
72959
73301
|
}
|
|
72960
|
-
for (var i = imajor; i <
|
|
73302
|
+
for (var i = imajor; i < majorCapacity; ++i) {
|
|
72961
73303
|
var imajorResult = i * 3;
|
|
72962
73304
|
majorResult[imajorResult + 0] = NaN;
|
|
72963
73305
|
majorResult[imajorResult + 1] = NaN;
|
|
@@ -73140,8 +73482,8 @@ var DChartCoordinateLog = /** @class */ (function () {
|
|
|
73140
73482
|
values[i] = Math.pow(10, values[i]);
|
|
73141
73483
|
}
|
|
73142
73484
|
};
|
|
73143
|
-
DChartCoordinateLog.prototype.ticks = function (domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
73144
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
73485
|
+
DChartCoordinateLog.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
73486
|
+
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
73145
73487
|
};
|
|
73146
73488
|
DChartCoordinateLog.prototype.toTheme = function (options) {
|
|
73147
73489
|
return (options && options.theme) || this.getThemeDefault();
|
|
@@ -73779,10 +74121,10 @@ var DChartPlotAreaImpl = /** @class */ (function (_super) {
|
|
|
73779
74121
|
DChartPlotAreaImpl.prototype.render = function (renderer) {
|
|
73780
74122
|
if (this._isViewDirty) {
|
|
73781
74123
|
this._isViewDirty = false;
|
|
73782
|
-
this._axis.
|
|
74124
|
+
this._axis.onRender();
|
|
73783
74125
|
var selection = this._series.selection;
|
|
73784
74126
|
if (selection) {
|
|
73785
|
-
selection.
|
|
74127
|
+
selection.onRender();
|
|
73786
74128
|
}
|
|
73787
74129
|
}
|
|
73788
74130
|
_super.prototype.render.call(this, renderer);
|
|
@@ -74004,7 +74346,9 @@ var DChartSelectionGridlineX = /** @class */ (function (_super) {
|
|
|
74004
74346
|
shape.transform.position.set(mappedX, height * 0.5);
|
|
74005
74347
|
shape.size.set(0, height);
|
|
74006
74348
|
shape.visible = this.isVisible(container, mappedX);
|
|
74349
|
+
return true;
|
|
74007
74350
|
}
|
|
74351
|
+
return false;
|
|
74008
74352
|
};
|
|
74009
74353
|
DChartSelectionGridlineX.prototype.isVisible = function (container, mappedX) {
|
|
74010
74354
|
return 0 <= mappedX && mappedX <= container.plotArea.width;
|
|
@@ -74032,7 +74376,9 @@ var DChartSelectionGridlineY = /** @class */ (function (_super) {
|
|
|
74032
74376
|
shape.transform.position.set(width * 0.5, mappedY);
|
|
74033
74377
|
shape.size.set(width, 0);
|
|
74034
74378
|
shape.visible = this.isVisible(container, mappedY);
|
|
74379
|
+
return true;
|
|
74035
74380
|
}
|
|
74381
|
+
return false;
|
|
74036
74382
|
};
|
|
74037
74383
|
DChartSelectionGridlineY.prototype.isVisible = function (container, mappedY) {
|
|
74038
74384
|
return 0 <= mappedY && mappedY <= container.plotArea.height;
|
|
@@ -74083,8 +74429,9 @@ var DChartSelectionGridlineContainerImpl = /** @class */ (function () {
|
|
|
74083
74429
|
this._y.unset();
|
|
74084
74430
|
};
|
|
74085
74431
|
DChartSelectionGridlineContainerImpl.prototype.update = function (container, mappedPosition) {
|
|
74086
|
-
this._x.update(container, mappedPosition);
|
|
74087
|
-
this._y.update(container, mappedPosition);
|
|
74432
|
+
var isXUpdated = this._x.update(container, mappedPosition);
|
|
74433
|
+
var isYUpdated = this._y.update(container, mappedPosition);
|
|
74434
|
+
return isXUpdated || isYUpdated;
|
|
74088
74435
|
};
|
|
74089
74436
|
return DChartSelectionGridlineContainerImpl;
|
|
74090
74437
|
}());
|
|
@@ -74103,7 +74450,9 @@ var DChartSelectionMarker = /** @class */ (function (_super) {
|
|
|
74103
74450
|
if (shape) {
|
|
74104
74451
|
shape.transform.position.copyFrom(mappedPosition);
|
|
74105
74452
|
shape.visible = this.isVisible(container, mappedPosition);
|
|
74453
|
+
return true;
|
|
74106
74454
|
}
|
|
74455
|
+
return false;
|
|
74107
74456
|
};
|
|
74108
74457
|
DChartSelectionMarker.prototype.isVisible = function (container, mappedPosition) {
|
|
74109
74458
|
var x = mappedPosition.x;
|
|
@@ -74284,9 +74633,11 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
|
|
|
74284
74633
|
var work = this._work;
|
|
74285
74634
|
work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
|
|
74286
74635
|
container.plotArea.container.localTransform.apply(work, work);
|
|
74287
|
-
this._gridline.update(container, work);
|
|
74288
|
-
this._marker.update(container, work);
|
|
74636
|
+
var isGridlineUpdated = this._gridline.update(container, work);
|
|
74637
|
+
var isMarkerUpdated = this._marker.update(container, work);
|
|
74638
|
+
return isGridlineUpdated || isMarkerUpdated;
|
|
74289
74639
|
}
|
|
74640
|
+
return false;
|
|
74290
74641
|
};
|
|
74291
74642
|
return DChartSelectionSubImpl;
|
|
74292
74643
|
}(pixi_js.utils.EventEmitter));
|
|
@@ -74421,6 +74772,16 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
74421
74772
|
configurable: true
|
|
74422
74773
|
});
|
|
74423
74774
|
DChartSelectionSimple.prototype.update = function () {
|
|
74775
|
+
var isSelectedUpdated = this._selected.update();
|
|
74776
|
+
var isHoveredUpdated = this._hovered.update();
|
|
74777
|
+
if (isSelectedUpdated || isHoveredUpdated) {
|
|
74778
|
+
var container = this._container;
|
|
74779
|
+
if (container != null) {
|
|
74780
|
+
DApplications.update(container.plotArea);
|
|
74781
|
+
}
|
|
74782
|
+
}
|
|
74783
|
+
};
|
|
74784
|
+
DChartSelectionSimple.prototype.onRender = function () {
|
|
74424
74785
|
this._selected.update();
|
|
74425
74786
|
this._hovered.update();
|
|
74426
74787
|
};
|