@wcardinal/wcardinal-ui 0.153.0 → 0.154.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/d-chart-axis-base-options-parser.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-options.d.ts +7 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-container-sub-impl.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-direction.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-coordinate-linear-tick.d.ts +13 -8
- package/dist/types/wcardinal/ui/d-chart-coordinate-linear.d.ts +18 -14
- package/dist/types/wcardinal/ui/d-chart-coordinate-log-tick.d.ts +14 -7
- package/dist/types/wcardinal/ui/d-chart-coordinate-log.d.ts +18 -14
- package/dist/types/wcardinal/ui/d-chart-coordinate-tick-major-step-function.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-chart-coordinate-tick-minor-step-function.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-chart-coordinate-tick.d.ts +13 -0
- package/dist/types/wcardinal/ui/d-chart-coordinate-transform-impl.d.ts +8 -3
- package/dist/types/wcardinal/ui/d-chart-coordinate-transform.d.ts +6 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate.d.ts +18 -7
- package/dist/types/wcardinal/ui/d-view-constraint.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-view-gesture-impl.d.ts +3 -1
- package/dist/types/wcardinal/ui/d-view-impl.d.ts +3 -0
- package/dist/types/wcardinal/ui/d-view-transform-impl.d.ts +4 -2
- package/dist/types/wcardinal/ui/d-view.d.ts +3 -0
- package/dist/types/wcardinal/ui/index.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-tick.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-transform.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/index.d.ts +3 -2
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-tick.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-transform.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-coordinate.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/index.d.ts +3 -2
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js +7 -5
- 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 +16 -8
- package/dist/wcardinal/ui/d-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-container-impl.js +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-container-sub-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-direction.js +9 -0
- package/dist/wcardinal/ui/d-chart-coordinate-direction.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js +64 -29
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js +41 -8
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js +53 -28
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log.js +41 -8
- package/dist/wcardinal/ui/d-chart-coordinate-log.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-tick-major-step-function.js +6 -0
- package/dist/wcardinal/ui/d-chart-coordinate-tick-major-step-function.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-coordinate-tick-minor-step-function.js +6 -0
- package/dist/wcardinal/ui/d-chart-coordinate-tick-minor-step-function.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-coordinate-tick.js +6 -0
- package/dist/wcardinal/ui/d-chart-coordinate-tick.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-coordinate-transform-impl.js +23 -5
- package/dist/wcardinal/ui/d-chart-coordinate-transform-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-transform.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate.js +1 -4
- package/dist/wcardinal/ui/d-chart-coordinate.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-linear.js +43 -34
- package/dist/wcardinal/ui/d-chart-series-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-view-constraint.js +6 -0
- package/dist/wcardinal/ui/d-view-constraint.js.map +1 -0
- package/dist/wcardinal/ui/d-view-gesture-impl.js +3 -3
- package/dist/wcardinal/ui/d-view-gesture-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-view-impl.js +16 -5
- package/dist/wcardinal/ui/d-view-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-view-transform-impl.js +6 -7
- package/dist/wcardinal/ui/d-view-transform-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-view.js.map +1 -1
- package/dist/wcardinal/ui/index.js +5 -0
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js +7 -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-coordinate-tick.js +23 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-tick.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-transform.js +14 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-transform.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate.js +14 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js +4 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/index.js +3 -2
- package/dist/wcardinal/ui/theme/dark/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-chart.js +6 -4
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-chart.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js +8 -2
- 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-coordinate-tick.js +23 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-tick.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-transform.js +14 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-transform.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate.js +14 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js +4 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/index.js +3 -2
- package/dist/wcardinal/ui/theme/white/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-chart.js +6 -4
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-chart.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +37 -28
- 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 +38 -29
- 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 +379 -193
- package/dist/wcardinal-ui.js +307 -139
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-linear.d.ts +0 -5
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-log.d.ts +0 -5
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-linear.d.ts +0 -5
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-log.d.ts +0 -5
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-linear.js +0 -26
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-linear.js.map +0 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-log.js +0 -26
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-log.js.map +0 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-linear.js +0 -26
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-linear.js.map +0 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-log.js +0 -26
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-log.js.map +0 -1
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.154.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -14108,11 +14108,12 @@
|
|
|
14108
14108
|
* SPDX-License-Identifier: Apache-2.0
|
|
14109
14109
|
*/
|
|
14110
14110
|
var DViewGestureImpl = /** @class */ (function () {
|
|
14111
|
-
function DViewGestureImpl(parent, toTarget, stopper, theme, options) {
|
|
14111
|
+
function DViewGestureImpl(parent, toTarget, stopper, constraint, theme, options) {
|
|
14112
14112
|
var _this = this;
|
|
14113
14113
|
var _a, _b;
|
|
14114
14114
|
this._parent = parent;
|
|
14115
14115
|
this._stopper = stopper;
|
|
14116
|
+
this._constraint = constraint;
|
|
14116
14117
|
var mode = toEnum((_a = options === null || options === void 0 ? void 0 : options.mode) !== null && _a !== void 0 ? _a : theme.getGestureMode(), UtilGestureMode);
|
|
14117
14118
|
var modifier = toEnum((_b = options === null || options === void 0 ? void 0 : options.modifier) !== null && _b !== void 0 ? _b : theme.getGestureModifier(), UtilGestureModifier);
|
|
14118
14119
|
if (mode === UtilGestureMode.ON || mode === UtilGestureMode.TOUCH) {
|
|
@@ -14155,8 +14156,7 @@
|
|
|
14155
14156
|
var newX = (position.x - cx) * scaleRatio + x;
|
|
14156
14157
|
var newY = (position.y - cy) * scaleRatio + y;
|
|
14157
14158
|
// Update
|
|
14158
|
-
|
|
14159
|
-
target.position.set(newX, newY);
|
|
14159
|
+
this._constraint(target, newX, newY, newScaleX, newScaleY);
|
|
14160
14160
|
}
|
|
14161
14161
|
};
|
|
14162
14162
|
DViewGestureImpl.prototype.stop = function () {
|
|
@@ -14175,10 +14175,11 @@
|
|
|
14175
14175
|
* SPDX-License-Identifier: Apache-2.0
|
|
14176
14176
|
*/
|
|
14177
14177
|
var DViewTransformImpl = /** @class */ (function () {
|
|
14178
|
-
function DViewTransformImpl(parent, toTarget, stopper, duration) {
|
|
14178
|
+
function DViewTransformImpl(parent, toTarget, stopper, constraint, duration) {
|
|
14179
14179
|
var _this = this;
|
|
14180
14180
|
this._parent = parent;
|
|
14181
14181
|
this._toTarget = toTarget;
|
|
14182
|
+
this._constraint = constraint;
|
|
14182
14183
|
this._newScaleX = 1;
|
|
14183
14184
|
this._newScaleY = 1;
|
|
14184
14185
|
this._newX = 0;
|
|
@@ -14205,11 +14206,10 @@
|
|
|
14205
14206
|
var y = this._oldY * w0 + this._newY * w1;
|
|
14206
14207
|
var target = this._toTarget(this._parent);
|
|
14207
14208
|
if (target != null) {
|
|
14208
|
-
|
|
14209
|
-
target.position.set(x, y);
|
|
14209
|
+
this._constraint(target, x, y, scaleX, scaleY);
|
|
14210
14210
|
}
|
|
14211
14211
|
};
|
|
14212
|
-
DViewTransformImpl.prototype.start = function (target, x,
|
|
14212
|
+
DViewTransformImpl.prototype.start = function (target, x, y, scaleX, scaleY, duration, stop) {
|
|
14213
14213
|
if (stop !== false) {
|
|
14214
14214
|
this._stopper.stop();
|
|
14215
14215
|
}
|
|
@@ -14217,8 +14217,7 @@
|
|
|
14217
14217
|
duration = this._duration;
|
|
14218
14218
|
}
|
|
14219
14219
|
if (duration <= 0) {
|
|
14220
|
-
|
|
14221
|
-
target.position.set(x, Y);
|
|
14220
|
+
this._constraint(target, x, y, scaleX, scaleY);
|
|
14222
14221
|
}
|
|
14223
14222
|
else {
|
|
14224
14223
|
var position = target.position;
|
|
@@ -14228,7 +14227,7 @@
|
|
|
14228
14227
|
this._oldScaleX = scale.x;
|
|
14229
14228
|
this._oldScaleY = scale.y;
|
|
14230
14229
|
this._newX = x;
|
|
14231
|
-
this._newY =
|
|
14230
|
+
this._newY = y;
|
|
14232
14231
|
this._newScaleX = scaleX;
|
|
14233
14232
|
this._newScaleY = scaleY;
|
|
14234
14233
|
this._animation.duration = duration;
|
|
@@ -14250,6 +14249,7 @@
|
|
|
14250
14249
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
14251
14250
|
this._parent = parent;
|
|
14252
14251
|
this._toTarget = toTarget;
|
|
14252
|
+
this._constraint = (options && options.constraint) || DViewImpl.CONSTRAINT;
|
|
14253
14253
|
this._workRect = new pixi_js.Rectangle();
|
|
14254
14254
|
// Theme
|
|
14255
14255
|
var theme = this.toTheme(options) || this.getThemeDefault();
|
|
@@ -14280,9 +14280,9 @@
|
|
|
14280
14280
|
this._wheelTranslationModifier = toEnum((_r = wheelTranslation === null || wheelTranslation === void 0 ? void 0 : wheelTranslation.modifier) !== null && _r !== void 0 ? _r : theme.getWheelTranslationModifier(), UtilGestureModifier);
|
|
14281
14281
|
this._wheelTranslationChecker = (_s = wheelTranslation === null || wheelTranslation === void 0 ? void 0 : wheelTranslation.checker) !== null && _s !== void 0 ? _s : UtilGestureModifiers.match;
|
|
14282
14282
|
// Gesture
|
|
14283
|
-
this._gesture = new DViewGestureImpl(parent, toTarget, this, theme, options === null || options === void 0 ? void 0 : options.gesture);
|
|
14283
|
+
this._gesture = new DViewGestureImpl(parent, toTarget, this, this._constraint, theme, options === null || options === void 0 ? void 0 : options.gesture);
|
|
14284
14284
|
// Transform
|
|
14285
|
-
this._transform = new DViewTransformImpl(parent, toTarget, this, this._dblclickZoomDuration);
|
|
14285
|
+
this._transform = new DViewTransformImpl(parent, toTarget, this, this._constraint, this._dblclickZoomDuration);
|
|
14286
14286
|
}
|
|
14287
14287
|
Object.defineProperty(DViewImpl.prototype, "gesture", {
|
|
14288
14288
|
get: function () {
|
|
@@ -14391,7 +14391,8 @@
|
|
|
14391
14391
|
if (target) {
|
|
14392
14392
|
var newScaleX = this.toNormalizedScale(scale.x);
|
|
14393
14393
|
var newScaleY = this.toNormalizedScale(scale.y);
|
|
14394
|
-
target.
|
|
14394
|
+
var targetPosition = target.position;
|
|
14395
|
+
this._constraint(target, targetPosition.x, targetPosition.y, newScaleX, newScaleY);
|
|
14395
14396
|
}
|
|
14396
14397
|
},
|
|
14397
14398
|
enumerable: false,
|
|
@@ -14415,7 +14416,8 @@
|
|
|
14415
14416
|
set: function (position) {
|
|
14416
14417
|
var target = this._toTarget(this._parent);
|
|
14417
14418
|
if (target) {
|
|
14418
|
-
target.
|
|
14419
|
+
var targetScale = target.scale;
|
|
14420
|
+
this._constraint(target, position.x, position.y, targetScale.x, targetScale.y);
|
|
14419
14421
|
}
|
|
14420
14422
|
},
|
|
14421
14423
|
enumerable: false,
|
|
@@ -14456,7 +14458,11 @@
|
|
|
14456
14458
|
if (target) {
|
|
14457
14459
|
this.stop();
|
|
14458
14460
|
var speed = deltas.lowest * this._wheelTranslationSpeed;
|
|
14459
|
-
|
|
14461
|
+
var targetPosition = target.position;
|
|
14462
|
+
var newX = targetPosition.x - deltas.deltaX * speed;
|
|
14463
|
+
var newY = targetPosition.y + deltas.deltaY * speed;
|
|
14464
|
+
var targetScale = target.scale;
|
|
14465
|
+
this._constraint(target, newX, newY, targetScale.x, targetScale.y);
|
|
14460
14466
|
return true;
|
|
14461
14467
|
}
|
|
14462
14468
|
}
|
|
@@ -14498,6 +14504,10 @@
|
|
|
14498
14504
|
DViewImpl.prototype.getType = function () {
|
|
14499
14505
|
return "DView";
|
|
14500
14506
|
};
|
|
14507
|
+
DViewImpl.CONSTRAINT = function (target, x, y, scaleX, scaleY) {
|
|
14508
|
+
target.scale.set(scaleX, scaleY);
|
|
14509
|
+
target.position.set(x, y);
|
|
14510
|
+
};
|
|
14501
14511
|
return DViewImpl;
|
|
14502
14512
|
}());
|
|
14503
14513
|
|
|
@@ -50036,7 +50046,7 @@
|
|
|
50036
50046
|
};
|
|
50037
50047
|
};
|
|
50038
50048
|
DChartAxisBaseOptionParser.prototype.toTickMajor = function (theme, options) {
|
|
50039
|
-
var _a, _b, _c, _d, _e, _f;
|
|
50049
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
50040
50050
|
var major = options === null || options === void 0 ? void 0 : options.major;
|
|
50041
50051
|
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();
|
|
50042
50052
|
var optionsStyle = options === null || options === void 0 ? void 0 : options.style;
|
|
@@ -50045,7 +50055,8 @@
|
|
|
50045
50055
|
var stroke = this.toTickMajorStroke(theme, major === null || major === void 0 ? void 0 : major.stroke, optionsStroke);
|
|
50046
50056
|
return {
|
|
50047
50057
|
count: (_e = major === null || major === void 0 ? void 0 : major.count) !== null && _e !== void 0 ? _e : theme.getMajorTickCount(),
|
|
50048
|
-
|
|
50058
|
+
step: (_f = major === null || major === void 0 ? void 0 : major.step) !== null && _f !== void 0 ? _f : theme.getMajorTickStep(),
|
|
50059
|
+
size: (_g = major === null || major === void 0 ? void 0 : major.size) !== null && _g !== void 0 ? _g : theme.getMajorTickSize(),
|
|
50049
50060
|
position: this.toTickPosition(position),
|
|
50050
50061
|
style: style,
|
|
50051
50062
|
stroke: stroke,
|
|
@@ -50097,13 +50108,14 @@
|
|
|
50097
50108
|
}
|
|
50098
50109
|
};
|
|
50099
50110
|
DChartAxisBaseOptionParser.prototype.toMinorTick = function (theme, options) {
|
|
50100
|
-
var _a, _b, _c, _d, _e, _f;
|
|
50101
|
-
var minor = options === null || options === void 0 ? void 0 : options.
|
|
50111
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
50112
|
+
var minor = options === null || options === void 0 ? void 0 : options.minor;
|
|
50102
50113
|
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();
|
|
50103
50114
|
var style = EShapePointsStyles.from((_d = (_c = minor === null || minor === void 0 ? void 0 : minor.style) !== null && _c !== void 0 ? _c : options === null || options === void 0 ? void 0 : options.style) !== null && _d !== void 0 ? _d : theme.getMinorTickStyle());
|
|
50104
50115
|
return {
|
|
50105
50116
|
count: (_e = minor === null || minor === void 0 ? void 0 : minor.count) !== null && _e !== void 0 ? _e : theme.getMinorTickCount(),
|
|
50106
|
-
|
|
50117
|
+
step: (_f = minor === null || minor === void 0 ? void 0 : minor.step) !== null && _f !== void 0 ? _f : theme.getMinorTickStep(),
|
|
50118
|
+
size: (_g = minor === null || minor === void 0 ? void 0 : minor.size) !== null && _g !== void 0 ? _g : theme.getMinorTickSize(),
|
|
50107
50119
|
position: this.toTickPosition(position),
|
|
50108
50120
|
style: style,
|
|
50109
50121
|
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke),
|
|
@@ -50389,13 +50401,17 @@
|
|
|
50389
50401
|
};
|
|
50390
50402
|
DChartAxisBase.prototype.updateTicksX = function (domainMin, domainMax, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionY, transform, plotAreaHeight) {
|
|
50391
50403
|
var tick = this._tick;
|
|
50392
|
-
var
|
|
50393
|
-
var
|
|
50394
|
-
var
|
|
50404
|
+
var majorTick = tick.major;
|
|
50405
|
+
var majorCount = majorTick.count;
|
|
50406
|
+
var majorStep = majorTick.step;
|
|
50407
|
+
var majorFormatter = majorTick.formatter;
|
|
50408
|
+
var minorTick = tick.minor;
|
|
50409
|
+
var minorCountPerMajor = minorTick.count;
|
|
50395
50410
|
var minorCount = (majorCount + 1) * minorCountPerMajor;
|
|
50411
|
+
var minorStep = minorTick.step;
|
|
50396
50412
|
var majorTicks = this._majorTicks;
|
|
50397
50413
|
var minorTicks = this._minorTicks;
|
|
50398
|
-
coordinate.ticks(domainMin, domainMax, majorCount, minorCountPerMajor, minorCount, majorTicks, minorTicks);
|
|
50414
|
+
coordinate.ticks(domainMin, domainMax, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
50399
50415
|
var a = transform.a;
|
|
50400
50416
|
var tx = transform.tx;
|
|
50401
50417
|
for (var i = 0; i < majorCount; ++i) {
|
|
@@ -50445,13 +50461,17 @@
|
|
|
50445
50461
|
};
|
|
50446
50462
|
DChartAxisBase.prototype.updateTicksY = function (domainMin, domainMax, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaWidth) {
|
|
50447
50463
|
var tick = this._tick;
|
|
50448
|
-
var
|
|
50449
|
-
var
|
|
50450
|
-
var
|
|
50464
|
+
var majorTick = tick.major;
|
|
50465
|
+
var majorCount = majorTick.count;
|
|
50466
|
+
var majorStep = majorTick.step;
|
|
50467
|
+
var majorFormatter = majorTick.formatter;
|
|
50468
|
+
var minorTick = tick.minor;
|
|
50469
|
+
var minorCountPerMajor = minorTick.count;
|
|
50451
50470
|
var minorCount = (majorCount + 1) * minorCountPerMajor;
|
|
50471
|
+
var minorStep = minorTick.step;
|
|
50452
50472
|
var majorTicks = this._majorTicks;
|
|
50453
50473
|
var minorTicks = this._minorTicks;
|
|
50454
|
-
coordinate.ticks(domainMin, domainMax, majorCount, minorCountPerMajor, minorCount, majorTicks, minorTicks);
|
|
50474
|
+
coordinate.ticks(domainMin, domainMax, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
50455
50475
|
var d = transform.d;
|
|
50456
50476
|
var ty = transform.ty;
|
|
50457
50477
|
for (var i = 0; i < majorCount; ++i) {
|
|
@@ -51091,25 +51111,45 @@
|
|
|
51091
51111
|
* SPDX-License-Identifier: Apache-2.0
|
|
51092
51112
|
*/
|
|
51093
51113
|
var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
51094
|
-
function DChartCoordinateLinearTick(
|
|
51095
|
-
this._theme =
|
|
51114
|
+
function DChartCoordinateLinearTick(options) {
|
|
51115
|
+
this._theme = this.toTheme(options);
|
|
51096
51116
|
}
|
|
51097
|
-
DChartCoordinateLinearTick.prototype.
|
|
51098
|
-
if (
|
|
51099
|
-
|
|
51100
|
-
|
|
51101
|
-
|
|
51102
|
-
return
|
|
51117
|
+
DChartCoordinateLinearTick.prototype.toMajorStep = function (domainMin, domainMax, majorCount, majorStep) {
|
|
51118
|
+
if (majorStep == null) {
|
|
51119
|
+
if (0 < majorCount) {
|
|
51120
|
+
return this.calcStepMajor(domainMin, domainMax, majorCount);
|
|
51121
|
+
}
|
|
51122
|
+
return -1;
|
|
51103
51123
|
}
|
|
51104
|
-
|
|
51105
|
-
|
|
51106
|
-
DChartCoordinateLinearTick.prototype.calcStepMinor = function (step, minorCount) {
|
|
51107
|
-
if (0 <= step) {
|
|
51108
|
-
return step / (minorCount + 1);
|
|
51124
|
+
else if (isNumber(majorStep)) {
|
|
51125
|
+
return majorStep;
|
|
51109
51126
|
}
|
|
51110
51127
|
else {
|
|
51128
|
+
return majorStep(domainMin, domainMax, majorCount);
|
|
51129
|
+
}
|
|
51130
|
+
};
|
|
51131
|
+
DChartCoordinateLinearTick.prototype.calcStepMajor = function (domainMin, domainMax, majorCount) {
|
|
51132
|
+
var span = Math.abs(domainMax - domainMin) / majorCount;
|
|
51133
|
+
var power = Math.floor(Math.log(span) / Math.LN10);
|
|
51134
|
+
var base = Math.pow(10, power);
|
|
51135
|
+
return this._theme.toStepScale(span / base) * base;
|
|
51136
|
+
};
|
|
51137
|
+
DChartCoordinateLinearTick.prototype.toMinorStep = function (majorStep, minorCount, minorStep) {
|
|
51138
|
+
if (minorStep == null) {
|
|
51139
|
+
if (0 <= majorStep) {
|
|
51140
|
+
return this.calcStepMinor(majorStep, minorCount);
|
|
51141
|
+
}
|
|
51111
51142
|
return -1;
|
|
51112
51143
|
}
|
|
51144
|
+
else if (isNumber(minorStep)) {
|
|
51145
|
+
return minorStep;
|
|
51146
|
+
}
|
|
51147
|
+
else {
|
|
51148
|
+
return minorStep(majorStep, minorCount);
|
|
51149
|
+
}
|
|
51150
|
+
};
|
|
51151
|
+
DChartCoordinateLinearTick.prototype.calcStepMinor = function (majorStep, minorCount) {
|
|
51152
|
+
return majorStep / (minorCount + 1);
|
|
51113
51153
|
};
|
|
51114
51154
|
DChartCoordinateLinearTick.prototype.calcTickMinorPositions = function (step, count, majorPosition, rangeMin, rangeMax, iresult, result) {
|
|
51115
51155
|
for (var i = 0; i < count; i += 1) {
|
|
@@ -51119,15 +51159,15 @@
|
|
|
51119
51159
|
}
|
|
51120
51160
|
}
|
|
51121
51161
|
};
|
|
51122
|
-
DChartCoordinateLinearTick.prototype.calculate = function (domainFrom, domainTo, majorCount, minorCountPerMajor, minorCount, majorResult, minorResult, coordinate) {
|
|
51162
|
+
DChartCoordinateLinearTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
51123
51163
|
if (majorCount <= 0) {
|
|
51124
51164
|
return;
|
|
51125
51165
|
}
|
|
51126
51166
|
var transform = coordinate.transform;
|
|
51127
51167
|
var domainMin = Math.min(domainFrom, domainTo);
|
|
51128
51168
|
var domainMax = Math.max(domainFrom, domainTo);
|
|
51129
|
-
var
|
|
51130
|
-
if (
|
|
51169
|
+
var majorStepMapped = this.toMajorStep(domainMin, domainMax, majorCount, majorStep);
|
|
51170
|
+
if (majorStepMapped <= 0) {
|
|
51131
51171
|
majorResult[0] = domainMin;
|
|
51132
51172
|
majorResult[1] = transform.map(coordinate.map(domainMin));
|
|
51133
51173
|
majorResult[2] = 0;
|
|
@@ -51146,33 +51186,37 @@
|
|
|
51146
51186
|
return;
|
|
51147
51187
|
}
|
|
51148
51188
|
// Major tick start position
|
|
51149
|
-
var idomainStart = Math.floor(domainMin /
|
|
51150
|
-
var idomainEnd = Math.ceil(domainMax /
|
|
51189
|
+
var idomainStart = Math.floor(domainMin / majorStepMapped) - 1;
|
|
51190
|
+
var idomainEnd = Math.ceil(domainMax / majorStepMapped) + 1;
|
|
51191
|
+
var domainMinMapped = transform.map(coordinate.map(domainMin));
|
|
51192
|
+
var domainMaxMapped = transform.map(coordinate.map(domainMax));
|
|
51193
|
+
var from = Math.min(domainMinMapped, domainMaxMapped) - 0.5;
|
|
51194
|
+
var to = Math.max(domainMinMapped, domainMaxMapped) + 0.5;
|
|
51151
51195
|
// Major / minor tick positions
|
|
51152
|
-
var
|
|
51196
|
+
var minorStepMapped = this.toMinorStep(majorStepMapped, minorCountPerMajor, minorStep);
|
|
51153
51197
|
var imajor = 0;
|
|
51154
51198
|
var iminor = 0;
|
|
51155
51199
|
for (var i = idomainStart; i <= idomainEnd; ++i) {
|
|
51156
|
-
var majorPosition = i *
|
|
51200
|
+
var majorPosition = i * majorStepMapped;
|
|
51157
51201
|
if (imajor < majorCount) {
|
|
51158
|
-
|
|
51159
|
-
|
|
51202
|
+
var majorPositionMapped = transform.map(coordinate.map(majorPosition));
|
|
51203
|
+
if (from <= majorPositionMapped && majorPositionMapped <= to) {
|
|
51160
51204
|
var imajorResult = imajor * 3;
|
|
51161
51205
|
majorResult[imajorResult + 0] = majorPosition;
|
|
51162
|
-
majorResult[imajorResult + 1] =
|
|
51163
|
-
majorResult[imajorResult + 2] =
|
|
51206
|
+
majorResult[imajorResult + 1] = majorPositionMapped;
|
|
51207
|
+
majorResult[imajorResult + 2] = majorStepMapped;
|
|
51164
51208
|
imajor += 1;
|
|
51165
51209
|
}
|
|
51166
51210
|
}
|
|
51167
51211
|
for (var j = 0; j < minorCountPerMajor; j += 1) {
|
|
51168
51212
|
if (iminor < minorCount) {
|
|
51169
|
-
var minorPosition = majorPosition + (j + 1) *
|
|
51170
|
-
|
|
51171
|
-
|
|
51213
|
+
var minorPosition = majorPosition + (j + 1) * minorStepMapped;
|
|
51214
|
+
var minorPositionMapped = transform.map(coordinate.map(minorPosition));
|
|
51215
|
+
if (from <= minorPositionMapped && minorPositionMapped <= to) {
|
|
51172
51216
|
var iminorResult = iminor * 3;
|
|
51173
51217
|
minorResult[iminorResult + 0] = minorPosition;
|
|
51174
|
-
minorResult[iminorResult + 1] =
|
|
51175
|
-
minorResult[iminorResult + 2] =
|
|
51218
|
+
minorResult[iminorResult + 1] = minorPositionMapped;
|
|
51219
|
+
minorResult[iminorResult + 2] = minorStepMapped;
|
|
51176
51220
|
iminor += 1;
|
|
51177
51221
|
}
|
|
51178
51222
|
}
|
|
@@ -51191,14 +51235,29 @@
|
|
|
51191
51235
|
minorResult[iminorResult + 2] = NaN;
|
|
51192
51236
|
}
|
|
51193
51237
|
};
|
|
51238
|
+
DChartCoordinateLinearTick.prototype.toTheme = function (options) {
|
|
51239
|
+
return (options && options.theme) || this.getThemeDefault();
|
|
51240
|
+
};
|
|
51241
|
+
DChartCoordinateLinearTick.prototype.getThemeDefault = function () {
|
|
51242
|
+
return DThemes.getInstance().get(this.getType());
|
|
51243
|
+
};
|
|
51244
|
+
DChartCoordinateLinearTick.prototype.getType = function () {
|
|
51245
|
+
return "DChartCoordinateTick";
|
|
51246
|
+
};
|
|
51194
51247
|
return DChartCoordinateLinearTick;
|
|
51195
51248
|
}());
|
|
51196
51249
|
|
|
51250
|
+
/*
|
|
51251
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
51252
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
51253
|
+
*/
|
|
51197
51254
|
var DChartCoordinateTransformImpl = /** @class */ (function () {
|
|
51198
|
-
function DChartCoordinateTransformImpl(
|
|
51199
|
-
this._theme =
|
|
51255
|
+
function DChartCoordinateTransformImpl(options) {
|
|
51256
|
+
this._theme = this.toTheme(options);
|
|
51200
51257
|
this._id = 0;
|
|
51258
|
+
this._isTranslationEnabled = options === null || options === void 0 ? void 0 : options.translation;
|
|
51201
51259
|
this._translate = 0;
|
|
51260
|
+
this._isScalingEnabled = options === null || options === void 0 ? void 0 : options.scaling;
|
|
51202
51261
|
this._scale = 1;
|
|
51203
51262
|
this._itranslate = 0;
|
|
51204
51263
|
this._iscale = 1;
|
|
@@ -51238,11 +51297,13 @@
|
|
|
51238
51297
|
};
|
|
51239
51298
|
DChartCoordinateTransformImpl.prototype.set = function (translate, scale) {
|
|
51240
51299
|
var isChanged = false;
|
|
51241
|
-
if (translate != null &&
|
|
51300
|
+
if (translate != null &&
|
|
51301
|
+
this._isTranslationEnabled !== false &&
|
|
51302
|
+
this._translate !== translate) {
|
|
51242
51303
|
isChanged = true;
|
|
51243
51304
|
this._translate = translate;
|
|
51244
51305
|
}
|
|
51245
|
-
if (scale != null && this._scale !== scale) {
|
|
51306
|
+
if (scale != null && this._isScalingEnabled !== false && this._scale !== scale) {
|
|
51246
51307
|
isChanged = true;
|
|
51247
51308
|
this._scale = scale;
|
|
51248
51309
|
}
|
|
@@ -51278,6 +51339,15 @@
|
|
|
51278
51339
|
values[i] = itranslate + iscale * values[i];
|
|
51279
51340
|
}
|
|
51280
51341
|
};
|
|
51342
|
+
DChartCoordinateTransformImpl.prototype.toTheme = function (options) {
|
|
51343
|
+
return (options && options.theme) || this.getThemeDefault();
|
|
51344
|
+
};
|
|
51345
|
+
DChartCoordinateTransformImpl.prototype.getThemeDefault = function () {
|
|
51346
|
+
return DThemes.getInstance().get(this.getType());
|
|
51347
|
+
};
|
|
51348
|
+
DChartCoordinateTransformImpl.prototype.getType = function () {
|
|
51349
|
+
return "DChartCoordinateTransform";
|
|
51350
|
+
};
|
|
51281
51351
|
return DChartCoordinateTransformImpl;
|
|
51282
51352
|
}());
|
|
51283
51353
|
|
|
@@ -51342,13 +51412,34 @@
|
|
|
51342
51412
|
function DChartCoordinateLinear(options) {
|
|
51343
51413
|
this._id = 0;
|
|
51344
51414
|
this._direction = DChartCoordinateDirection.X;
|
|
51345
|
-
|
|
51346
|
-
this.
|
|
51347
|
-
this.
|
|
51348
|
-
this._tick = new DChartCoordinateLinearTick(theme);
|
|
51415
|
+
this._theme = this.toTheme(options);
|
|
51416
|
+
this._transform = new DChartCoordinateTransformImpl(options === null || options === void 0 ? void 0 : options.transform);
|
|
51417
|
+
this._tick = new DChartCoordinateLinearTick(options === null || options === void 0 ? void 0 : options.tick);
|
|
51349
51418
|
this._work = new DChartRegionImpl(NaN, NaN);
|
|
51350
51419
|
this._mark = new DChartCoordinateTransformMarkImpl();
|
|
51420
|
+
this._from = options === null || options === void 0 ? void 0 : options.from;
|
|
51421
|
+
this._to = options === null || options === void 0 ? void 0 : options.to;
|
|
51351
51422
|
}
|
|
51423
|
+
Object.defineProperty(DChartCoordinateLinear.prototype, "from", {
|
|
51424
|
+
get: function () {
|
|
51425
|
+
return this._from;
|
|
51426
|
+
},
|
|
51427
|
+
set: function (from) {
|
|
51428
|
+
this._from = from;
|
|
51429
|
+
},
|
|
51430
|
+
enumerable: false,
|
|
51431
|
+
configurable: true
|
|
51432
|
+
});
|
|
51433
|
+
Object.defineProperty(DChartCoordinateLinear.prototype, "to", {
|
|
51434
|
+
get: function () {
|
|
51435
|
+
return this._to;
|
|
51436
|
+
},
|
|
51437
|
+
set: function (to) {
|
|
51438
|
+
this._to = to;
|
|
51439
|
+
},
|
|
51440
|
+
enumerable: false,
|
|
51441
|
+
configurable: true
|
|
51442
|
+
});
|
|
51352
51443
|
DChartCoordinateLinear.prototype.bind = function (container, direction) {
|
|
51353
51444
|
this._container = container;
|
|
51354
51445
|
this._direction = direction;
|
|
@@ -51388,6 +51479,12 @@
|
|
|
51388
51479
|
}
|
|
51389
51480
|
};
|
|
51390
51481
|
DChartCoordinateLinear.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
51482
|
+
if (from == null) {
|
|
51483
|
+
from = this._from;
|
|
51484
|
+
}
|
|
51485
|
+
if (to == null) {
|
|
51486
|
+
to = this._to;
|
|
51487
|
+
}
|
|
51391
51488
|
if (from != null && to != null) {
|
|
51392
51489
|
result.set(from, to);
|
|
51393
51490
|
}
|
|
@@ -51398,6 +51495,12 @@
|
|
|
51398
51495
|
return result;
|
|
51399
51496
|
};
|
|
51400
51497
|
DChartCoordinateLinear.prototype.toFitRange = function (from, to, plotArea, result) {
|
|
51498
|
+
if (from == null) {
|
|
51499
|
+
from = this._from;
|
|
51500
|
+
}
|
|
51501
|
+
if (to == null) {
|
|
51502
|
+
to = this._to;
|
|
51503
|
+
}
|
|
51401
51504
|
if (from != null && to != null) {
|
|
51402
51505
|
result.set(from, to);
|
|
51403
51506
|
}
|
|
@@ -51453,8 +51556,8 @@
|
|
|
51453
51556
|
DChartCoordinateLinear.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
51454
51557
|
// DO NOTHING
|
|
51455
51558
|
};
|
|
51456
|
-
DChartCoordinateLinear.prototype.ticks = function (domainFrom, domainTo, majorCount, minorCountPerMajor, minorCount, majorResult, minorResult) {
|
|
51457
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, minorCountPerMajor, minorCount, majorResult, minorResult, this);
|
|
51559
|
+
DChartCoordinateLinear.prototype.ticks = function (domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
51560
|
+
this._tick.calculate(domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
51458
51561
|
};
|
|
51459
51562
|
DChartCoordinateLinear.prototype.toTheme = function (options) {
|
|
51460
51563
|
return (options && options.theme) || this.getThemeDefault();
|
|
@@ -51463,7 +51566,7 @@
|
|
|
51463
51566
|
return DThemes.getInstance().get(this.getType());
|
|
51464
51567
|
};
|
|
51465
51568
|
DChartCoordinateLinear.prototype.getType = function () {
|
|
51466
|
-
return "
|
|
51569
|
+
return "DChartCoordinate";
|
|
51467
51570
|
};
|
|
51468
51571
|
return DChartCoordinateLinear;
|
|
51469
51572
|
}());
|
|
@@ -51473,25 +51576,45 @@
|
|
|
51473
51576
|
* SPDX-License-Identifier: Apache-2.0
|
|
51474
51577
|
*/
|
|
51475
51578
|
var DChartCoordinateLogTick = /** @class */ (function () {
|
|
51476
|
-
function DChartCoordinateLogTick(
|
|
51477
|
-
this._theme =
|
|
51579
|
+
function DChartCoordinateLogTick(options) {
|
|
51580
|
+
this._theme = this.toTheme(options);
|
|
51478
51581
|
}
|
|
51479
|
-
DChartCoordinateLogTick.prototype.
|
|
51480
|
-
if (
|
|
51481
|
-
|
|
51482
|
-
|
|
51483
|
-
|
|
51484
|
-
return
|
|
51582
|
+
DChartCoordinateLogTick.prototype.toMajorStep = function (domainMin, domainMax, majorCount, majorStep) {
|
|
51583
|
+
if (majorStep == null) {
|
|
51584
|
+
if (0 < majorCount) {
|
|
51585
|
+
return this.calcStepMajor(domainMin, domainMax, majorCount);
|
|
51586
|
+
}
|
|
51587
|
+
return -1;
|
|
51485
51588
|
}
|
|
51486
|
-
|
|
51487
|
-
|
|
51488
|
-
DChartCoordinateLogTick.prototype.calcStepMinor = function (step, minorCount) {
|
|
51489
|
-
if (0 <= step) {
|
|
51490
|
-
return step / (minorCount + 1);
|
|
51589
|
+
else if (isNumber(majorStep)) {
|
|
51590
|
+
return majorStep;
|
|
51491
51591
|
}
|
|
51492
51592
|
else {
|
|
51593
|
+
return majorStep(domainMin, domainMax, majorCount);
|
|
51594
|
+
}
|
|
51595
|
+
};
|
|
51596
|
+
DChartCoordinateLogTick.prototype.calcStepMajor = function (domainMin, domainMax, majorCount) {
|
|
51597
|
+
var span = Math.abs(domainMax - domainMin) / majorCount;
|
|
51598
|
+
var power = Math.floor(Math.log(span) / Math.LN10);
|
|
51599
|
+
var base = Math.pow(10, power);
|
|
51600
|
+
return this._theme.toStepScale(span / base) * base;
|
|
51601
|
+
};
|
|
51602
|
+
DChartCoordinateLogTick.prototype.toMinorStep = function (majorStep, minorCount, minorStep) {
|
|
51603
|
+
if (minorStep == null) {
|
|
51604
|
+
if (0 <= majorStep) {
|
|
51605
|
+
return this.calcStepMinor(majorStep, minorCount);
|
|
51606
|
+
}
|
|
51493
51607
|
return -1;
|
|
51494
51608
|
}
|
|
51609
|
+
else if (isNumber(minorStep)) {
|
|
51610
|
+
return minorStep;
|
|
51611
|
+
}
|
|
51612
|
+
else {
|
|
51613
|
+
return minorStep(majorStep, minorCount);
|
|
51614
|
+
}
|
|
51615
|
+
};
|
|
51616
|
+
DChartCoordinateLogTick.prototype.calcStepMinor = function (majorStep, minorCount) {
|
|
51617
|
+
return majorStep / (minorCount + 1);
|
|
51495
51618
|
};
|
|
51496
51619
|
DChartCoordinateLogTick.prototype.calcTickMinorPositions = function (step, count, majorPosition, rangeMin, rangeMax, iresult, result) {
|
|
51497
51620
|
for (var i = 0; i < count; i += 1) {
|
|
@@ -51501,7 +51624,7 @@
|
|
|
51501
51624
|
}
|
|
51502
51625
|
}
|
|
51503
51626
|
};
|
|
51504
|
-
DChartCoordinateLogTick.prototype.calculate = function (domainFrom, domainTo, majorCount, minorCountPerMajor, minorCount, majorResult, minorResult, coordinate) {
|
|
51627
|
+
DChartCoordinateLogTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
51505
51628
|
if (majorCount <= 0) {
|
|
51506
51629
|
return;
|
|
51507
51630
|
}
|
|
@@ -51510,7 +51633,7 @@
|
|
|
51510
51633
|
var domainToMapped = coordinate.map(domainTo);
|
|
51511
51634
|
var domainMinMapped = Math.min(domainFromMapped, domainToMapped);
|
|
51512
51635
|
var domainMaxMapped = Math.max(domainFromMapped, domainToMapped);
|
|
51513
|
-
var majorStepMapped = this.
|
|
51636
|
+
var majorStepMapped = this.toMajorStep(domainMinMapped, domainMaxMapped, majorCount, majorStep);
|
|
51514
51637
|
if (majorStepMapped <= 0) {
|
|
51515
51638
|
var domainMin = Math.min(domainFrom, domainTo);
|
|
51516
51639
|
majorResult[0] = domainMin;
|
|
@@ -51534,7 +51657,7 @@
|
|
|
51534
51657
|
var idomainStartMapped = Math.floor(domainMinMapped / majorStepMapped) - 1;
|
|
51535
51658
|
var idomainEndMapped = Math.ceil(domainMaxMapped / majorStepMapped) + 1;
|
|
51536
51659
|
// Major / minor tick positions
|
|
51537
|
-
var minorStepMapped = this.
|
|
51660
|
+
var minorStepMapped = this.toMinorStep(majorStepMapped, minorCountPerMajor, minorStep);
|
|
51538
51661
|
var imajor = 0;
|
|
51539
51662
|
var iminor = 0;
|
|
51540
51663
|
for (var i = idomainStartMapped; i <= idomainEndMapped; ++i) {
|
|
@@ -51542,13 +51665,10 @@
|
|
|
51542
51665
|
if (imajor < majorCount) {
|
|
51543
51666
|
if (domainMinMapped <= majorPositionMapped &&
|
|
51544
51667
|
majorPositionMapped <= domainMaxMapped) {
|
|
51545
|
-
var majorPosition = coordinate.unmap(majorPositionMapped);
|
|
51546
|
-
var majorProjectedPosition = transform.map(majorPositionMapped);
|
|
51547
|
-
var majorStep = coordinate.unmap(majorPositionMapped - 1);
|
|
51548
51668
|
var imajorResult = imajor * 3;
|
|
51549
|
-
majorResult[imajorResult + 0] =
|
|
51550
|
-
majorResult[imajorResult + 1] =
|
|
51551
|
-
majorResult[imajorResult + 2] =
|
|
51669
|
+
majorResult[imajorResult + 0] = coordinate.unmap(majorPositionMapped);
|
|
51670
|
+
majorResult[imajorResult + 1] = transform.map(majorPositionMapped);
|
|
51671
|
+
majorResult[imajorResult + 2] = coordinate.unmap(majorPositionMapped - 1);
|
|
51552
51672
|
imajor += 1;
|
|
51553
51673
|
}
|
|
51554
51674
|
}
|
|
@@ -51557,13 +51677,10 @@
|
|
|
51557
51677
|
var minorPositionMapped = majorPositionMapped + (j + 1) * minorStepMapped;
|
|
51558
51678
|
if (domainMinMapped <= minorPositionMapped &&
|
|
51559
51679
|
minorPositionMapped <= domainMaxMapped) {
|
|
51560
|
-
var minorPosition = coordinate.unmap(minorPositionMapped);
|
|
51561
|
-
var minorProjectedPosition = transform.map(minorPositionMapped);
|
|
51562
|
-
var minorStep = coordinate.unmap(minorPositionMapped - 1);
|
|
51563
51680
|
var iminorResult = iminor * 3;
|
|
51564
|
-
minorResult[iminorResult + 0] =
|
|
51565
|
-
minorResult[iminorResult + 1] =
|
|
51566
|
-
minorResult[iminorResult + 2] =
|
|
51681
|
+
minorResult[iminorResult + 0] = coordinate.unmap(minorPositionMapped);
|
|
51682
|
+
minorResult[iminorResult + 1] = transform.map(minorPositionMapped);
|
|
51683
|
+
minorResult[iminorResult + 2] = coordinate.unmap(minorPositionMapped - 1);
|
|
51567
51684
|
iminor += 1;
|
|
51568
51685
|
}
|
|
51569
51686
|
}
|
|
@@ -51582,6 +51699,15 @@
|
|
|
51582
51699
|
minorResult[iminorResult + 2] = NaN;
|
|
51583
51700
|
}
|
|
51584
51701
|
};
|
|
51702
|
+
DChartCoordinateLogTick.prototype.toTheme = function (options) {
|
|
51703
|
+
return (options && options.theme) || this.getThemeDefault();
|
|
51704
|
+
};
|
|
51705
|
+
DChartCoordinateLogTick.prototype.getThemeDefault = function () {
|
|
51706
|
+
return DThemes.getInstance().get(this.getType());
|
|
51707
|
+
};
|
|
51708
|
+
DChartCoordinateLogTick.prototype.getType = function () {
|
|
51709
|
+
return "DChartCoordinateTick";
|
|
51710
|
+
};
|
|
51585
51711
|
return DChartCoordinateLogTick;
|
|
51586
51712
|
}());
|
|
51587
51713
|
|
|
@@ -51593,13 +51719,34 @@
|
|
|
51593
51719
|
function DChartCoordinateLog(options) {
|
|
51594
51720
|
this._id = 0;
|
|
51595
51721
|
this._direction = DChartCoordinateDirection.X;
|
|
51596
|
-
|
|
51597
|
-
this.
|
|
51598
|
-
this.
|
|
51599
|
-
this._tick = new DChartCoordinateLogTick(theme);
|
|
51722
|
+
this._theme = this.toTheme(options);
|
|
51723
|
+
this._transform = new DChartCoordinateTransformImpl(options === null || options === void 0 ? void 0 : options.transform);
|
|
51724
|
+
this._tick = new DChartCoordinateLogTick(options === null || options === void 0 ? void 0 : options.tick);
|
|
51600
51725
|
this._work = new DChartRegionImpl(NaN, NaN);
|
|
51601
51726
|
this._mark = new DChartCoordinateTransformMarkImpl();
|
|
51727
|
+
this._from = options === null || options === void 0 ? void 0 : options.from;
|
|
51728
|
+
this._to = options === null || options === void 0 ? void 0 : options.to;
|
|
51602
51729
|
}
|
|
51730
|
+
Object.defineProperty(DChartCoordinateLog.prototype, "from", {
|
|
51731
|
+
get: function () {
|
|
51732
|
+
return this._from;
|
|
51733
|
+
},
|
|
51734
|
+
set: function (from) {
|
|
51735
|
+
this._from = from;
|
|
51736
|
+
},
|
|
51737
|
+
enumerable: false,
|
|
51738
|
+
configurable: true
|
|
51739
|
+
});
|
|
51740
|
+
Object.defineProperty(DChartCoordinateLog.prototype, "to", {
|
|
51741
|
+
get: function () {
|
|
51742
|
+
return this._to;
|
|
51743
|
+
},
|
|
51744
|
+
set: function (to) {
|
|
51745
|
+
this._to = to;
|
|
51746
|
+
},
|
|
51747
|
+
enumerable: false,
|
|
51748
|
+
configurable: true
|
|
51749
|
+
});
|
|
51603
51750
|
DChartCoordinateLog.prototype.bind = function (container, direction) {
|
|
51604
51751
|
this._container = container;
|
|
51605
51752
|
this._direction = direction;
|
|
@@ -51637,6 +51784,12 @@
|
|
|
51637
51784
|
}
|
|
51638
51785
|
};
|
|
51639
51786
|
DChartCoordinateLog.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
51787
|
+
if (from == null) {
|
|
51788
|
+
from = this._from;
|
|
51789
|
+
}
|
|
51790
|
+
if (to == null) {
|
|
51791
|
+
to = this._to;
|
|
51792
|
+
}
|
|
51640
51793
|
if (from != null && to != null) {
|
|
51641
51794
|
result.set(from, to);
|
|
51642
51795
|
}
|
|
@@ -51647,6 +51800,12 @@
|
|
|
51647
51800
|
return result;
|
|
51648
51801
|
};
|
|
51649
51802
|
DChartCoordinateLog.prototype.toFitRange = function (from, to, plotArea, result) {
|
|
51803
|
+
if (from == null) {
|
|
51804
|
+
from = this._from;
|
|
51805
|
+
}
|
|
51806
|
+
if (to == null) {
|
|
51807
|
+
to = this._to;
|
|
51808
|
+
}
|
|
51650
51809
|
if (from != null && to != null) {
|
|
51651
51810
|
result.set(from, to);
|
|
51652
51811
|
}
|
|
@@ -51710,8 +51869,8 @@
|
|
|
51710
51869
|
values[i] = Math.pow(10, values[i]);
|
|
51711
51870
|
}
|
|
51712
51871
|
};
|
|
51713
|
-
DChartCoordinateLog.prototype.ticks = function (domainFrom, domainTo, majorCount, minorCountPerMajor, minorCount, majorResult, minorResult) {
|
|
51714
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, minorCountPerMajor, minorCount, majorResult, minorResult, this);
|
|
51872
|
+
DChartCoordinateLog.prototype.ticks = function (domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
51873
|
+
this._tick.calculate(domainFrom, domainTo, majorCount, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
51715
51874
|
};
|
|
51716
51875
|
DChartCoordinateLog.prototype.toTheme = function (options) {
|
|
51717
51876
|
return (options && options.theme) || this.getThemeDefault();
|
|
@@ -51720,7 +51879,7 @@
|
|
|
51720
51879
|
return DThemes.getInstance().get(this.getType());
|
|
51721
51880
|
};
|
|
51722
51881
|
DChartCoordinateLog.prototype.getType = function () {
|
|
51723
|
-
return "
|
|
51882
|
+
return "DChartCoordinate";
|
|
51724
51883
|
};
|
|
51725
51884
|
return DChartCoordinateLog;
|
|
51726
51885
|
}());
|
|
@@ -54174,48 +54333,56 @@
|
|
|
54174
54333
|
var p1y = NaN;
|
|
54175
54334
|
var threshold = 0.00001;
|
|
54176
54335
|
if (babs <= aabs) {
|
|
54177
|
-
var
|
|
54178
|
-
var
|
|
54179
|
-
p0x = Math.min(
|
|
54180
|
-
p1x = Math.max(
|
|
54181
|
-
|
|
54182
|
-
|
|
54183
|
-
|
|
54184
|
-
|
|
54185
|
-
|
|
54336
|
+
var xfrom = xcoordinate.unmap(xcoordinate.transform.unmap(0));
|
|
54337
|
+
var xto = xcoordinate.unmap(xcoordinate.transform.unmap(plotAreaSizeX));
|
|
54338
|
+
p0x = Math.min(xfrom, xto);
|
|
54339
|
+
p1x = Math.max(xfrom, xto);
|
|
54340
|
+
var yfrom = ycoordinate.unmap(ycoordinate.transform.unmap(0));
|
|
54341
|
+
var yto = ycoordinate.unmap(ycoordinate.transform.unmap(plotAreaSizeY));
|
|
54342
|
+
p0y = Math.min(yfrom, yto);
|
|
54343
|
+
p1y = Math.max(yfrom, yto);
|
|
54344
|
+
if (threshold < babs) {
|
|
54345
|
+
var f = b / a;
|
|
54346
|
+
var xfrom1 = f * (yfrom - y0) + x0;
|
|
54347
|
+
var xto1 = f * (yto - y0) + x0;
|
|
54186
54348
|
var p2x = Math.min(xfrom1, xto1);
|
|
54187
54349
|
var p3x = Math.max(xfrom1, xto1);
|
|
54188
|
-
|
|
54189
|
-
|
|
54190
|
-
|
|
54191
|
-
|
|
54192
|
-
|
|
54193
|
-
|
|
54350
|
+
p0x = Math.max(p0x, p2x);
|
|
54351
|
+
p1x = Math.min(p1x, p3x);
|
|
54352
|
+
var g = 1 / f;
|
|
54353
|
+
p0y = g * (p0x - x0) + b * y0;
|
|
54354
|
+
p1y = g * (p1x - x0) + b * y0;
|
|
54355
|
+
}
|
|
54356
|
+
else {
|
|
54357
|
+
p0x = x0;
|
|
54358
|
+
p1x = x0;
|
|
54194
54359
|
}
|
|
54195
|
-
p0y = a * (p0x - x0) + b * y0;
|
|
54196
|
-
p1y = a * (p1x - x0) + b * y0;
|
|
54197
54360
|
}
|
|
54198
54361
|
else {
|
|
54199
|
-
var
|
|
54200
|
-
var
|
|
54201
|
-
p0y = Math.min(
|
|
54202
|
-
p1y = Math.max(
|
|
54203
|
-
|
|
54204
|
-
|
|
54205
|
-
|
|
54206
|
-
|
|
54207
|
-
|
|
54362
|
+
var yfrom = ycoordinate.unmap(ycoordinate.transform.unmap(0));
|
|
54363
|
+
var yto = ycoordinate.unmap(ycoordinate.transform.unmap(plotAreaSizeY));
|
|
54364
|
+
p0y = Math.min(yfrom, yto);
|
|
54365
|
+
p1y = Math.max(yfrom, yto);
|
|
54366
|
+
var xfrom = xcoordinate.unmap(xcoordinate.transform.unmap(0));
|
|
54367
|
+
var xto = xcoordinate.unmap(xcoordinate.transform.unmap(plotAreaSizeX));
|
|
54368
|
+
p0x = Math.min(xfrom, xto);
|
|
54369
|
+
p1x = Math.max(xfrom, xto);
|
|
54370
|
+
if (threshold < aabs) {
|
|
54371
|
+
var f = a / b;
|
|
54372
|
+
var yfrom1 = f * (xfrom - x0) + y0;
|
|
54373
|
+
var yto1 = f * (xto - x0) + y0;
|
|
54208
54374
|
var p2y = Math.min(yfrom1, yto1);
|
|
54209
54375
|
var p3y = Math.max(yfrom1, yto1);
|
|
54210
|
-
|
|
54211
|
-
|
|
54212
|
-
|
|
54213
|
-
|
|
54214
|
-
|
|
54215
|
-
|
|
54376
|
+
p0y = Math.max(p0y, p2y);
|
|
54377
|
+
p1y = Math.min(p1y, p3y);
|
|
54378
|
+
var g = 1 / f;
|
|
54379
|
+
p0x = g * (p0y - y0) + a * x0;
|
|
54380
|
+
p1x = g * (p1y - y0) + a * x0;
|
|
54381
|
+
}
|
|
54382
|
+
else {
|
|
54383
|
+
p0y = y0;
|
|
54384
|
+
p1y = y0;
|
|
54216
54385
|
}
|
|
54217
|
-
p0x = b * (p0y - y0) + a * x0;
|
|
54218
|
-
p1x = b * (p1y - y0) + a * x0;
|
|
54219
54386
|
}
|
|
54220
54387
|
p0x = xcoordinate.transform.map(xcoordinate.map(p0x));
|
|
54221
54388
|
p0y = ycoordinate.transform.map(ycoordinate.map(p0y));
|
|
@@ -54245,6 +54412,7 @@
|
|
|
54245
54412
|
line.disallowUploadedUpdate();
|
|
54246
54413
|
line.points.set(values, segments);
|
|
54247
54414
|
line.size.set(sx, sy);
|
|
54415
|
+
line.points.toFitted();
|
|
54248
54416
|
line.transform.position.set(cx, cy);
|
|
54249
54417
|
line.allowUploadedUpdate();
|
|
54250
54418
|
DApplications.update(line);
|
|
@@ -67914,13 +68082,13 @@
|
|
|
67914
68082
|
DChartColorSet2: DChartColorSet2,
|
|
67915
68083
|
DChartCoordinateContainerImpl: DChartCoordinateContainerImpl,
|
|
67916
68084
|
DChartCoordinateContainerSubImpl: DChartCoordinateContainerSubImpl,
|
|
68085
|
+
DChartCoordinateDirection: DChartCoordinateDirection,
|
|
67917
68086
|
DChartCoordinateLinearTick: DChartCoordinateLinearTick,
|
|
67918
68087
|
DChartCoordinateLinear: DChartCoordinateLinear,
|
|
67919
68088
|
DChartCoordinateLogTick: DChartCoordinateLogTick,
|
|
67920
68089
|
DChartCoordinateLog: DChartCoordinateLog,
|
|
67921
68090
|
DChartCoordinateTransformImpl: DChartCoordinateTransformImpl,
|
|
67922
68091
|
DChartCoordinateTransformMarkImpl: DChartCoordinateTransformMarkImpl,
|
|
67923
|
-
DChartCoordinateDirection: DChartCoordinateDirection,
|
|
67924
68092
|
DChartLegendItem: DChartLegendItem,
|
|
67925
68093
|
DChartLegend: DChartLegend,
|
|
67926
68094
|
DChartOverview: DChartOverview,
|