@wcardinal/wcardinal-ui 0.290.0 → 0.292.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/d-chart-axis-bar.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-options-parser.d.ts +69 -37
- package/dist/types/wcardinal/ui/d-chart-axis-base-options.d.ts +54 -20
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +17 -6
- package/dist/types/wcardinal/ui/d-chart-axis-base.d.ts +10 -8
- package/dist/types/wcardinal/ui/d-chart-axis-tick-container.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-major.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-minor.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-chart-axis-x-datetime.d.ts +3 -2
- package/dist/types/wcardinal/ui/d-chart-axis-x.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-chart-axis-y.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +52 -0
- package/dist/types/wcardinal/ui/d-chart-coordinate-linear.d.ts +4 -46
- package/dist/types/wcardinal/ui/d-chart-coordinate-log.d.ts +4 -42
- package/dist/types/wcardinal/ui/d-table-body.d.ts +7 -0
- package/dist/types/wcardinal/ui/index.d.ts +11 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.d.ts +7 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.d.ts +7 -0
- package/dist/wcardinal/ui/d-chart-axis-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js +152 -34
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-options.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +64 -43
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base.js +21 -4
- package/dist/wcardinal/ui/d-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-major.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-minor.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-x-datetime.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-x.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-y.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-base.js +186 -0
- package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js +2 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js +9 -165
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js +2 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log.js +9 -153
- package/dist/wcardinal/ui/d-chart-coordinate-log.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-line-of-any.js +4 -2
- package/dist/wcardinal/ui/d-chart-series-line-of-any.js.map +1 -1
- package/dist/wcardinal/ui/d-scroll-bar-vertical.js +1 -0
- package/dist/wcardinal/ui/d-scroll-bar-vertical.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body.js +39 -0
- package/dist/wcardinal/ui/d-table-body.js.map +1 -1
- package/dist/wcardinal/ui/d-table.js +3 -3
- package/dist/wcardinal/ui/d-table.js.map +1 -1
- package/dist/wcardinal/ui/index.js +11 -0
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js +21 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js +21 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +22 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +22 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +781 -652
- package/dist/wcardinal-ui.js +739 -652
- 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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.292.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -52898,6 +52898,7 @@
|
|
|
52898
52898
|
var barLength = space * this._end + thumbMinimumLength - barStart;
|
|
52899
52899
|
thumb.position.set(0, barStart);
|
|
52900
52900
|
thumb.resize(width, barLength);
|
|
52901
|
+
thumb.updateTransform();
|
|
52901
52902
|
};
|
|
52902
52903
|
return DScrollBarVertical;
|
|
52903
52904
|
}(DScrollBar));
|
|
@@ -54155,6 +54156,106 @@
|
|
|
54155
54156
|
RIGHT: 3
|
|
54156
54157
|
};
|
|
54157
54158
|
|
|
54159
|
+
/*
|
|
54160
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
54161
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
54162
|
+
*/
|
|
54163
|
+
var DChartAxisBaseBar = /** @class */ (function () {
|
|
54164
|
+
function DChartAxisBaseBar(parser) {
|
|
54165
|
+
this._parser = parser;
|
|
54166
|
+
this._index = 0;
|
|
54167
|
+
}
|
|
54168
|
+
Object.defineProperty(DChartAxisBaseBar.prototype, "shape", {
|
|
54169
|
+
get: function () {
|
|
54170
|
+
var result = this._shape;
|
|
54171
|
+
if (result == null) {
|
|
54172
|
+
result = this.newShape();
|
|
54173
|
+
this._shape = result;
|
|
54174
|
+
}
|
|
54175
|
+
return result;
|
|
54176
|
+
},
|
|
54177
|
+
enumerable: false,
|
|
54178
|
+
configurable: true
|
|
54179
|
+
});
|
|
54180
|
+
DChartAxisBaseBar.prototype.newShape = function () {
|
|
54181
|
+
var _a;
|
|
54182
|
+
var parser = this._parser;
|
|
54183
|
+
var bar = parser.bar;
|
|
54184
|
+
var result = new EShapeBar();
|
|
54185
|
+
result.points.position = this.newShapePosition();
|
|
54186
|
+
result.points.style = (_a = bar.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
|
|
54187
|
+
result.stroke.copy(bar.stroke);
|
|
54188
|
+
result.text.copy(parser.label);
|
|
54189
|
+
return result;
|
|
54190
|
+
};
|
|
54191
|
+
DChartAxisBaseBar.prototype.newShapePosition = function () {
|
|
54192
|
+
switch (this._parser.position) {
|
|
54193
|
+
case DChartAxisPosition.LEFT:
|
|
54194
|
+
case DChartAxisPosition.RIGHT:
|
|
54195
|
+
return EShapeBarPosition.TOP;
|
|
54196
|
+
default:
|
|
54197
|
+
return EShapeBarPosition.LEFT;
|
|
54198
|
+
}
|
|
54199
|
+
};
|
|
54200
|
+
DChartAxisBaseBar.prototype.bind = function (container, index) {
|
|
54201
|
+
this._container = container;
|
|
54202
|
+
this._index = index;
|
|
54203
|
+
this.shape.attach(container.container);
|
|
54204
|
+
};
|
|
54205
|
+
DChartAxisBaseBar.prototype.unbind = function () {
|
|
54206
|
+
var shape = this._shape;
|
|
54207
|
+
if (shape != null) {
|
|
54208
|
+
shape.detach();
|
|
54209
|
+
}
|
|
54210
|
+
this._index = 0;
|
|
54211
|
+
this._container = undefined;
|
|
54212
|
+
};
|
|
54213
|
+
DChartAxisBaseBar.prototype.update = function () {
|
|
54214
|
+
var container = this._container;
|
|
54215
|
+
var index = this._index;
|
|
54216
|
+
var shape = this._shape;
|
|
54217
|
+
if (shape != null && container != null) {
|
|
54218
|
+
var plotArea = container.plotArea;
|
|
54219
|
+
var plotAreaWidth = plotArea.width;
|
|
54220
|
+
var plotAreaHeight = plotArea.height;
|
|
54221
|
+
var offset = this._parser.padding * index;
|
|
54222
|
+
shape.disallowUploadedUpdate();
|
|
54223
|
+
var position = shape.transform.position;
|
|
54224
|
+
var size = shape.size;
|
|
54225
|
+
switch (this._parser.position) {
|
|
54226
|
+
case DChartAxisPosition.TOP:
|
|
54227
|
+
position.set(plotAreaWidth * 0.5, 0 - offset);
|
|
54228
|
+
size.set(plotAreaWidth, 0);
|
|
54229
|
+
break;
|
|
54230
|
+
case DChartAxisPosition.BOTTOM:
|
|
54231
|
+
position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
|
|
54232
|
+
size.set(plotAreaWidth, 0);
|
|
54233
|
+
break;
|
|
54234
|
+
case DChartAxisPosition.LEFT:
|
|
54235
|
+
position.set(0 - offset, plotAreaHeight * 0.5);
|
|
54236
|
+
size.set(0, plotAreaHeight);
|
|
54237
|
+
break;
|
|
54238
|
+
case DChartAxisPosition.RIGHT:
|
|
54239
|
+
position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
|
|
54240
|
+
size.set(0, plotAreaHeight);
|
|
54241
|
+
break;
|
|
54242
|
+
}
|
|
54243
|
+
shape.allowUploadedUpdate();
|
|
54244
|
+
return true;
|
|
54245
|
+
}
|
|
54246
|
+
return false;
|
|
54247
|
+
};
|
|
54248
|
+
DChartAxisBaseBar.prototype.destroy = function () {
|
|
54249
|
+
var shape = this._shape;
|
|
54250
|
+
if (shape != null) {
|
|
54251
|
+
shape.destroy();
|
|
54252
|
+
}
|
|
54253
|
+
this._index = 0;
|
|
54254
|
+
this._container = undefined;
|
|
54255
|
+
};
|
|
54256
|
+
return DChartAxisBaseBar;
|
|
54257
|
+
}());
|
|
54258
|
+
|
|
54158
54259
|
/*
|
|
54159
54260
|
* Copyright (C) 2019 Toshiba Corporation
|
|
54160
54261
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -54173,7 +54274,7 @@
|
|
|
54173
54274
|
var _a, _b;
|
|
54174
54275
|
this._coordinateIndex = (_a = options === null || options === void 0 ? void 0 : options.coordinate) !== null && _a !== void 0 ? _a : 0;
|
|
54175
54276
|
this._position = this.toPosition(theme, options);
|
|
54176
|
-
this._tick = this.
|
|
54277
|
+
this._tick = this.toTick(theme, options);
|
|
54177
54278
|
this._label = this.toLabel(theme, options);
|
|
54178
54279
|
this._padding = (_b = options === null || options === void 0 ? void 0 : options.padding) !== null && _b !== void 0 ? _b : theme.getPadding();
|
|
54179
54280
|
this._bar = this.toBar(theme, options);
|
|
@@ -54237,13 +54338,13 @@
|
|
|
54237
54338
|
stroke: this.toBarStroke(theme, options === null || options === void 0 ? void 0 : options.stroke)
|
|
54238
54339
|
};
|
|
54239
54340
|
};
|
|
54240
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54341
|
+
DChartAxisBaseOptionParser.prototype.toTick = function (theme, options) {
|
|
54241
54342
|
var _a;
|
|
54242
54343
|
var tick = options === null || options === void 0 ? void 0 : options.tick;
|
|
54243
54344
|
return {
|
|
54244
54345
|
enable: (_a = tick === null || tick === void 0 ? void 0 : tick.enable) !== null && _a !== void 0 ? _a : theme.getTickEnable(),
|
|
54245
54346
|
major: this.toTickMajor(theme, tick),
|
|
54246
|
-
minor: this.
|
|
54347
|
+
minor: this.toTickMinor(theme, tick)
|
|
54247
54348
|
};
|
|
54248
54349
|
};
|
|
54249
54350
|
DChartAxisBaseOptionParser.prototype.toTickMajor = function (theme, options) {
|
|
@@ -54264,8 +54365,8 @@
|
|
|
54264
54365
|
position: this.toTickPosition(position),
|
|
54265
54366
|
style: style,
|
|
54266
54367
|
stroke: stroke,
|
|
54267
|
-
text: this.
|
|
54268
|
-
formatter: this.
|
|
54368
|
+
text: this.toTickMajorText(theme, major === null || major === void 0 ? void 0 : major.text),
|
|
54369
|
+
formatter: this.toTickMajorFormatter(theme, major),
|
|
54269
54370
|
gridline: this.toTickMajorGridline(theme, major === null || major === void 0 ? void 0 : major.gridline, optionsStyle, optionsStroke)
|
|
54270
54371
|
};
|
|
54271
54372
|
};
|
|
@@ -54309,7 +54410,7 @@
|
|
|
54309
54410
|
}
|
|
54310
54411
|
}
|
|
54311
54412
|
};
|
|
54312
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54413
|
+
DChartAxisBaseOptionParser.prototype.toTickMinor = function (theme, options) {
|
|
54313
54414
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
54314
54415
|
var minor = options === null || options === void 0 ? void 0 : options.minor;
|
|
54315
54416
|
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();
|
|
@@ -54320,7 +54421,9 @@
|
|
|
54320
54421
|
size: (_g = minor === null || minor === void 0 ? void 0 : minor.size) !== null && _g !== void 0 ? _g : theme.getMinorTickSize(),
|
|
54321
54422
|
position: this.toTickPosition(position),
|
|
54322
54423
|
style: style,
|
|
54323
|
-
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke)
|
|
54424
|
+
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke),
|
|
54425
|
+
text: this.toTickMinorText(theme, minor === null || minor === void 0 ? void 0 : minor.text),
|
|
54426
|
+
formatter: this.toTickMinorFormatter(theme, minor)
|
|
54324
54427
|
};
|
|
54325
54428
|
};
|
|
54326
54429
|
DChartAxisBaseOptionParser.prototype.toBarStroke = function (theme, options) {
|
|
@@ -54346,7 +54449,7 @@
|
|
|
54346
54449
|
width: (_h = (_g = optionsA.width) !== null && _g !== void 0 ? _g : optionsB.width) !== null && _h !== void 0 ? _h : width,
|
|
54347
54450
|
align: (_k = (_j = optionsA.align) !== null && _j !== void 0 ? _j : optionsB.align) !== null && _k !== void 0 ? _k : align,
|
|
54348
54451
|
side: (_m = (_l = optionsA.side) !== null && _l !== void 0 ? _l : optionsB.side) !== null && _m !== void 0 ? _m : side,
|
|
54349
|
-
style: (_p = (_o = optionsA.style) !== null && _o !== void 0 ? _o : optionsB.style) !== null && _p !== void 0 ? _p : style
|
|
54452
|
+
style: this.toStrokeStyle((_p = (_o = optionsA.style) !== null && _o !== void 0 ? _o : optionsB.style) !== null && _p !== void 0 ? _p : style)
|
|
54350
54453
|
};
|
|
54351
54454
|
}
|
|
54352
54455
|
else {
|
|
@@ -54357,7 +54460,7 @@
|
|
|
54357
54460
|
width: (_t = optionsA.width) !== null && _t !== void 0 ? _t : width,
|
|
54358
54461
|
align: (_u = optionsA.align) !== null && _u !== void 0 ? _u : align,
|
|
54359
54462
|
side: (_v = optionsA.side) !== null && _v !== void 0 ? _v : side,
|
|
54360
|
-
style: (_w = optionsA.style) !== null && _w !== void 0 ? _w : style
|
|
54463
|
+
style: this.toStrokeStyle((_w = optionsA.style) !== null && _w !== void 0 ? _w : style)
|
|
54361
54464
|
};
|
|
54362
54465
|
}
|
|
54363
54466
|
}
|
|
@@ -54369,7 +54472,7 @@
|
|
|
54369
54472
|
width: (_0 = optionsB.width) !== null && _0 !== void 0 ? _0 : width,
|
|
54370
54473
|
align: (_1 = optionsB.align) !== null && _1 !== void 0 ? _1 : align,
|
|
54371
54474
|
side: (_2 = optionsB.side) !== null && _2 !== void 0 ? _2 : side,
|
|
54372
|
-
style: (_3 = optionsB.style) !== null && _3 !== void 0 ? _3 : style
|
|
54475
|
+
style: this.toStrokeStyle((_3 = optionsB.style) !== null && _3 !== void 0 ? _3 : style)
|
|
54373
54476
|
};
|
|
54374
54477
|
}
|
|
54375
54478
|
else {
|
|
@@ -54384,12 +54487,28 @@
|
|
|
54384
54487
|
};
|
|
54385
54488
|
}
|
|
54386
54489
|
};
|
|
54387
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54490
|
+
DChartAxisBaseOptionParser.prototype.toStrokeStyle = function (target) {
|
|
54491
|
+
if (isString(target)) {
|
|
54492
|
+
return EShapeStrokeStyle[target];
|
|
54493
|
+
}
|
|
54494
|
+
else if (isArray(target)) {
|
|
54495
|
+
var result = EShapeStrokeStyle.NONE;
|
|
54496
|
+
for (var i = 0, imax = target.length; i < imax; ++i) {
|
|
54497
|
+
result |= EShapeStrokeStyle[target[i]];
|
|
54498
|
+
}
|
|
54499
|
+
return result;
|
|
54500
|
+
}
|
|
54501
|
+
return target;
|
|
54502
|
+
};
|
|
54503
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorFormatter = function (theme, options) {
|
|
54388
54504
|
var text = options === null || options === void 0 ? void 0 : options.text;
|
|
54389
54505
|
if (text) {
|
|
54390
|
-
var
|
|
54391
|
-
if (
|
|
54392
|
-
return
|
|
54506
|
+
var format_1 = text.format;
|
|
54507
|
+
if (format_1 === null) {
|
|
54508
|
+
return undefined;
|
|
54509
|
+
}
|
|
54510
|
+
else if (format_1 != null) {
|
|
54511
|
+
return NumberFormatters.create(format_1);
|
|
54393
54512
|
}
|
|
54394
54513
|
else {
|
|
54395
54514
|
var formatter = text.formatter;
|
|
@@ -54400,28 +54519,32 @@
|
|
|
54400
54519
|
}
|
|
54401
54520
|
}
|
|
54402
54521
|
}
|
|
54403
|
-
|
|
54522
|
+
var format = theme.getMajorTickTextFormat();
|
|
54523
|
+
if (format != null) {
|
|
54524
|
+
return NumberFormatters.create(format);
|
|
54525
|
+
}
|
|
54526
|
+
return undefined;
|
|
54404
54527
|
};
|
|
54405
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54528
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorText = function (theme, options) {
|
|
54406
54529
|
options = options || {};
|
|
54407
54530
|
return {
|
|
54408
54531
|
format: options.format,
|
|
54409
|
-
color: this.
|
|
54532
|
+
color: this.toTickMajorTextColor(theme, options.color),
|
|
54410
54533
|
alpha: options.alpha,
|
|
54411
54534
|
family: options.family,
|
|
54412
54535
|
size: options.size,
|
|
54413
|
-
weight: options.weight,
|
|
54414
|
-
align: this.
|
|
54415
|
-
offset: this.
|
|
54416
|
-
style: options.style,
|
|
54417
|
-
outline: this.
|
|
54418
|
-
spacing: this.
|
|
54536
|
+
weight: toEnum(options.weight, EShapeTextWeight),
|
|
54537
|
+
align: this.toTickMajorTextAlign(theme, options.align),
|
|
54538
|
+
offset: this.toTickMajorTextOffset(theme, options.offset),
|
|
54539
|
+
style: toEnum(options.style, EShapeTextStyle),
|
|
54540
|
+
outline: this.toTickMajorTextOutline(theme, options.outline),
|
|
54541
|
+
spacing: this.toTickMajorTextSpacing(theme, options.spacing),
|
|
54419
54542
|
direction: this.toTickMajorTextDirection(theme, options.direction),
|
|
54420
|
-
padding: this.
|
|
54543
|
+
padding: this.toTickMajorTextPadding(theme, options.padding),
|
|
54421
54544
|
clipping: options.clipping
|
|
54422
54545
|
};
|
|
54423
54546
|
};
|
|
54424
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54547
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextOutline = function (theme, options) {
|
|
54425
54548
|
if (options) {
|
|
54426
54549
|
return {
|
|
54427
54550
|
enable: options.enable,
|
|
@@ -54431,7 +54554,7 @@
|
|
|
54431
54554
|
};
|
|
54432
54555
|
}
|
|
54433
54556
|
};
|
|
54434
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54557
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextAlign = function (theme, options) {
|
|
54435
54558
|
var _a, _b;
|
|
54436
54559
|
var position = this._position;
|
|
54437
54560
|
return {
|
|
@@ -54439,7 +54562,7 @@
|
|
|
54439
54562
|
vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMajorTickTextAlignVertical(position)
|
|
54440
54563
|
};
|
|
54441
54564
|
};
|
|
54442
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54565
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextOffset = function (theme, options) {
|
|
54443
54566
|
if (options) {
|
|
54444
54567
|
return {
|
|
54445
54568
|
horizontal: options.horizontal,
|
|
@@ -54447,7 +54570,7 @@
|
|
|
54447
54570
|
};
|
|
54448
54571
|
}
|
|
54449
54572
|
};
|
|
54450
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54573
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextSpacing = function (theme, options) {
|
|
54451
54574
|
if (options) {
|
|
54452
54575
|
return {
|
|
54453
54576
|
horizontal: options.horizontal,
|
|
@@ -54455,7 +54578,7 @@
|
|
|
54455
54578
|
};
|
|
54456
54579
|
}
|
|
54457
54580
|
};
|
|
54458
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54581
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextPadding = function (theme, options) {
|
|
54459
54582
|
var _a, _b;
|
|
54460
54583
|
return {
|
|
54461
54584
|
horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMajorTickTextPaddingHorizontal(),
|
|
@@ -54463,11 +54586,102 @@
|
|
|
54463
54586
|
};
|
|
54464
54587
|
};
|
|
54465
54588
|
DChartAxisBaseOptionParser.prototype.toTickMajorTextDirection = function (theme, options) {
|
|
54466
|
-
return options !== null && options !== void 0 ? options : theme.getMajorTickTextDirection();
|
|
54589
|
+
return toEnum(options !== null && options !== void 0 ? options : theme.getMajorTickTextDirection(), EShapeTextDirection);
|
|
54467
54590
|
};
|
|
54468
|
-
DChartAxisBaseOptionParser.prototype.
|
|
54591
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextColor = function (theme, options) {
|
|
54469
54592
|
return options !== null && options !== void 0 ? options : theme.getMajorTickTextColor();
|
|
54470
54593
|
};
|
|
54594
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorFormatter = function (theme, options) {
|
|
54595
|
+
var text = options === null || options === void 0 ? void 0 : options.text;
|
|
54596
|
+
if (text) {
|
|
54597
|
+
var format_2 = text.format;
|
|
54598
|
+
if (format_2 === null) {
|
|
54599
|
+
return undefined;
|
|
54600
|
+
}
|
|
54601
|
+
else if (format_2 != null) {
|
|
54602
|
+
return NumberFormatters.create(format_2);
|
|
54603
|
+
}
|
|
54604
|
+
else {
|
|
54605
|
+
var formatter = text.formatter;
|
|
54606
|
+
if (formatter) {
|
|
54607
|
+
return {
|
|
54608
|
+
format: formatter
|
|
54609
|
+
};
|
|
54610
|
+
}
|
|
54611
|
+
}
|
|
54612
|
+
}
|
|
54613
|
+
var format = theme.getMinorTickTextFormat();
|
|
54614
|
+
if (format != null) {
|
|
54615
|
+
return NumberFormatters.create(format);
|
|
54616
|
+
}
|
|
54617
|
+
return undefined;
|
|
54618
|
+
};
|
|
54619
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorText = function (theme, options) {
|
|
54620
|
+
options = options || {};
|
|
54621
|
+
return {
|
|
54622
|
+
format: options.format,
|
|
54623
|
+
color: this.toTickMinorTextColor(theme, options.color),
|
|
54624
|
+
alpha: options.alpha,
|
|
54625
|
+
family: options.family,
|
|
54626
|
+
size: options.size,
|
|
54627
|
+
weight: toEnum(options.weight, EShapeTextWeight),
|
|
54628
|
+
align: this.toTickMinorTextAlign(theme, options.align),
|
|
54629
|
+
offset: this.toTickMinorTextOffset(theme, options.offset),
|
|
54630
|
+
style: toEnum(options.style, EShapeTextStyle),
|
|
54631
|
+
outline: this.toTickMinorTextOutline(theme, options.outline),
|
|
54632
|
+
spacing: this.toTickMinorTextSpacing(theme, options.spacing),
|
|
54633
|
+
direction: this.toTickMinorTextDirection(theme, options.direction),
|
|
54634
|
+
padding: this.toTickMinorTextPadding(theme, options.padding),
|
|
54635
|
+
clipping: options.clipping
|
|
54636
|
+
};
|
|
54637
|
+
};
|
|
54638
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextOutline = function (theme, options) {
|
|
54639
|
+
if (options) {
|
|
54640
|
+
return {
|
|
54641
|
+
enable: options.enable,
|
|
54642
|
+
color: options.color,
|
|
54643
|
+
alpha: options.alpha,
|
|
54644
|
+
width: options.width
|
|
54645
|
+
};
|
|
54646
|
+
}
|
|
54647
|
+
};
|
|
54648
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextAlign = function (theme, options) {
|
|
54649
|
+
var _a, _b;
|
|
54650
|
+
var position = this._position;
|
|
54651
|
+
return {
|
|
54652
|
+
horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextAlignHorizontal(position),
|
|
54653
|
+
vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextAlignVertical(position)
|
|
54654
|
+
};
|
|
54655
|
+
};
|
|
54656
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextOffset = function (theme, options) {
|
|
54657
|
+
if (options) {
|
|
54658
|
+
return {
|
|
54659
|
+
horizontal: options.horizontal,
|
|
54660
|
+
vertical: options.vertical
|
|
54661
|
+
};
|
|
54662
|
+
}
|
|
54663
|
+
};
|
|
54664
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextSpacing = function (theme, options) {
|
|
54665
|
+
if (options) {
|
|
54666
|
+
return {
|
|
54667
|
+
horizontal: options.horizontal,
|
|
54668
|
+
vertical: options.vertical
|
|
54669
|
+
};
|
|
54670
|
+
}
|
|
54671
|
+
};
|
|
54672
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextPadding = function (theme, options) {
|
|
54673
|
+
var _a, _b;
|
|
54674
|
+
return {
|
|
54675
|
+
horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextPaddingHorizontal(),
|
|
54676
|
+
vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextPaddingVertical()
|
|
54677
|
+
};
|
|
54678
|
+
};
|
|
54679
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextDirection = function (theme, options) {
|
|
54680
|
+
return toEnum(options !== null && options !== void 0 ? options : theme.getMinorTickTextDirection(), EShapeTextDirection);
|
|
54681
|
+
};
|
|
54682
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextColor = function (theme, options) {
|
|
54683
|
+
return options !== null && options !== void 0 ? options : theme.getMinorTickTextColor();
|
|
54684
|
+
};
|
|
54471
54685
|
DChartAxisBaseOptionParser.prototype.toLabel = function (theme, options) {
|
|
54472
54686
|
var label = options === null || options === void 0 ? void 0 : options.label;
|
|
54473
54687
|
if (label) {
|
|
@@ -54477,10 +54691,10 @@
|
|
|
54477
54691
|
alpha: label.alpha,
|
|
54478
54692
|
family: label.family,
|
|
54479
54693
|
size: label.size,
|
|
54480
|
-
weight: label.weight,
|
|
54694
|
+
weight: toEnum(label.weight, EShapeTextWeight),
|
|
54481
54695
|
align: this.toLabelAlign(theme, label.align),
|
|
54482
54696
|
offset: this.toLabelOffset(theme, label.offset),
|
|
54483
|
-
style: label.style,
|
|
54697
|
+
style: toEnum(label.style, EShapeTextStyle),
|
|
54484
54698
|
outline: this.toLabelOutline(theme, label.outline),
|
|
54485
54699
|
spacing: this.toLabelSpacing(theme, label.spacing),
|
|
54486
54700
|
direction: this.toLabelDirection(theme, label.direction),
|
|
@@ -54531,7 +54745,7 @@
|
|
|
54531
54745
|
};
|
|
54532
54746
|
};
|
|
54533
54747
|
DChartAxisBaseOptionParser.prototype.toLabelDirection = function (theme, options) {
|
|
54534
|
-
return options !== null && options !== void 0 ? options : theme.getLabelDirection();
|
|
54748
|
+
return toEnum(options !== null && options !== void 0 ? options : theme.getLabelDirection(), EShapeTextDirection);
|
|
54535
54749
|
};
|
|
54536
54750
|
DChartAxisBaseOptionParser.prototype.toLabelColor = function (theme, options) {
|
|
54537
54751
|
return options !== null && options !== void 0 ? options : theme.getLabelColor();
|
|
@@ -54539,106 +54753,6 @@
|
|
|
54539
54753
|
return DChartAxisBaseOptionParser;
|
|
54540
54754
|
}());
|
|
54541
54755
|
|
|
54542
|
-
/*
|
|
54543
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
54544
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
54545
|
-
*/
|
|
54546
|
-
var DChartAxisBaseBar = /** @class */ (function () {
|
|
54547
|
-
function DChartAxisBaseBar(parser) {
|
|
54548
|
-
this._parser = parser;
|
|
54549
|
-
this._index = 0;
|
|
54550
|
-
}
|
|
54551
|
-
Object.defineProperty(DChartAxisBaseBar.prototype, "shape", {
|
|
54552
|
-
get: function () {
|
|
54553
|
-
var result = this._shape;
|
|
54554
|
-
if (result == null) {
|
|
54555
|
-
result = this.newShape();
|
|
54556
|
-
this._shape = result;
|
|
54557
|
-
}
|
|
54558
|
-
return result;
|
|
54559
|
-
},
|
|
54560
|
-
enumerable: false,
|
|
54561
|
-
configurable: true
|
|
54562
|
-
});
|
|
54563
|
-
DChartAxisBaseBar.prototype.newShape = function () {
|
|
54564
|
-
var _a;
|
|
54565
|
-
var parser = this._parser;
|
|
54566
|
-
var bar = parser.bar;
|
|
54567
|
-
var result = new EShapeBar();
|
|
54568
|
-
result.points.position = this.newShapePosition();
|
|
54569
|
-
result.points.style = (_a = bar.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
|
|
54570
|
-
result.stroke.copy(bar.stroke);
|
|
54571
|
-
result.text.copy(parser.label);
|
|
54572
|
-
return result;
|
|
54573
|
-
};
|
|
54574
|
-
DChartAxisBaseBar.prototype.newShapePosition = function () {
|
|
54575
|
-
switch (this._parser.position) {
|
|
54576
|
-
case DChartAxisPosition.LEFT:
|
|
54577
|
-
case DChartAxisPosition.RIGHT:
|
|
54578
|
-
return EShapeBarPosition.TOP;
|
|
54579
|
-
default:
|
|
54580
|
-
return EShapeBarPosition.LEFT;
|
|
54581
|
-
}
|
|
54582
|
-
};
|
|
54583
|
-
DChartAxisBaseBar.prototype.bind = function (container, index) {
|
|
54584
|
-
this._container = container;
|
|
54585
|
-
this._index = index;
|
|
54586
|
-
this.shape.attach(container.container);
|
|
54587
|
-
};
|
|
54588
|
-
DChartAxisBaseBar.prototype.unbind = function () {
|
|
54589
|
-
var shape = this._shape;
|
|
54590
|
-
if (shape != null) {
|
|
54591
|
-
shape.detach();
|
|
54592
|
-
}
|
|
54593
|
-
this._index = 0;
|
|
54594
|
-
this._container = undefined;
|
|
54595
|
-
};
|
|
54596
|
-
DChartAxisBaseBar.prototype.update = function () {
|
|
54597
|
-
var container = this._container;
|
|
54598
|
-
var index = this._index;
|
|
54599
|
-
var shape = this._shape;
|
|
54600
|
-
if (shape != null && container != null) {
|
|
54601
|
-
var plotArea = container.plotArea;
|
|
54602
|
-
var plotAreaWidth = plotArea.width;
|
|
54603
|
-
var plotAreaHeight = plotArea.height;
|
|
54604
|
-
var offset = this._parser.padding * index;
|
|
54605
|
-
shape.disallowUploadedUpdate();
|
|
54606
|
-
var position = shape.transform.position;
|
|
54607
|
-
var size = shape.size;
|
|
54608
|
-
switch (this._parser.position) {
|
|
54609
|
-
case DChartAxisPosition.TOP:
|
|
54610
|
-
position.set(plotAreaWidth * 0.5, 0 - offset);
|
|
54611
|
-
size.set(plotAreaWidth, 0);
|
|
54612
|
-
break;
|
|
54613
|
-
case DChartAxisPosition.BOTTOM:
|
|
54614
|
-
position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
|
|
54615
|
-
size.set(plotAreaWidth, 0);
|
|
54616
|
-
break;
|
|
54617
|
-
case DChartAxisPosition.LEFT:
|
|
54618
|
-
position.set(0 - offset, plotAreaHeight * 0.5);
|
|
54619
|
-
size.set(0, plotAreaHeight);
|
|
54620
|
-
break;
|
|
54621
|
-
case DChartAxisPosition.RIGHT:
|
|
54622
|
-
position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
|
|
54623
|
-
size.set(0, plotAreaHeight);
|
|
54624
|
-
break;
|
|
54625
|
-
}
|
|
54626
|
-
shape.allowUploadedUpdate();
|
|
54627
|
-
return true;
|
|
54628
|
-
}
|
|
54629
|
-
return false;
|
|
54630
|
-
};
|
|
54631
|
-
DChartAxisBaseBar.prototype.destroy = function () {
|
|
54632
|
-
var shape = this._shape;
|
|
54633
|
-
if (shape != null) {
|
|
54634
|
-
shape.destroy();
|
|
54635
|
-
}
|
|
54636
|
-
this._index = 0;
|
|
54637
|
-
this._container = undefined;
|
|
54638
|
-
};
|
|
54639
|
-
return DChartAxisBaseBar;
|
|
54640
|
-
}());
|
|
54641
|
-
|
|
54642
54756
|
var DChartAxisBaseTickMajorGridline = /** @class */ (function () {
|
|
54643
54757
|
function DChartAxisBaseTickMajorGridline(parser) {
|
|
54644
54758
|
this._parser = parser;
|
|
@@ -54836,6 +54950,7 @@
|
|
|
54836
54950
|
shape.points.size = size;
|
|
54837
54951
|
shape.points.style = style;
|
|
54838
54952
|
shape.stroke.copy(minor.stroke);
|
|
54953
|
+
shape.text.copy(minor.text);
|
|
54839
54954
|
shape.size.set(0, 0);
|
|
54840
54955
|
result.push(shape);
|
|
54841
54956
|
}
|
|
@@ -54875,11 +54990,11 @@
|
|
|
54875
54990
|
}());
|
|
54876
54991
|
|
|
54877
54992
|
var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
54878
|
-
function DChartAxisBaseTickContainer(parser) {
|
|
54993
|
+
function DChartAxisBaseTickContainer(parser, options) {
|
|
54879
54994
|
this._parser = parser;
|
|
54880
54995
|
this._index = 0;
|
|
54881
|
-
this._major =
|
|
54882
|
-
this._minor =
|
|
54996
|
+
this._major = this.newMajor(parser, options);
|
|
54997
|
+
this._minor = this.newMinor(parser, options);
|
|
54883
54998
|
this._majorTicks = [];
|
|
54884
54999
|
this._minorTicks = [];
|
|
54885
55000
|
}
|
|
@@ -54890,6 +55005,9 @@
|
|
|
54890
55005
|
enumerable: false,
|
|
54891
55006
|
configurable: true
|
|
54892
55007
|
});
|
|
55008
|
+
DChartAxisBaseTickContainer.prototype.newMajor = function (parser, options) {
|
|
55009
|
+
return new DChartAxisBaseTickMajor(parser);
|
|
55010
|
+
};
|
|
54893
55011
|
Object.defineProperty(DChartAxisBaseTickContainer.prototype, "minor", {
|
|
54894
55012
|
get: function () {
|
|
54895
55013
|
return this._minor;
|
|
@@ -54897,6 +55015,9 @@
|
|
|
54897
55015
|
enumerable: false,
|
|
54898
55016
|
configurable: true
|
|
54899
55017
|
});
|
|
55018
|
+
DChartAxisBaseTickContainer.prototype.newMinor = function (parser, options) {
|
|
55019
|
+
return new DChartAxisBaseTickMinor(parser);
|
|
55020
|
+
};
|
|
54900
55021
|
DChartAxisBaseTickContainer.prototype.bind = function (container, index) {
|
|
54901
55022
|
this._container = container;
|
|
54902
55023
|
this._index = index;
|
|
@@ -54973,9 +55094,10 @@
|
|
|
54973
55094
|
var minorCountPerMajor = minorTick.count;
|
|
54974
55095
|
var minorCount = (majorCapacity + 1) * minorCountPerMajor;
|
|
54975
55096
|
var minorStep = minorTick.step;
|
|
55097
|
+
var minorFormatter = minorTick.formatter;
|
|
54976
55098
|
var majorTicks = this._majorTicks;
|
|
54977
55099
|
var minorTicks = this._minorTicks;
|
|
54978
|
-
|
|
55100
|
+
this.newTicks(coordinate, domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
54979
55101
|
var a = transform.a;
|
|
54980
55102
|
var tx = transform.tx;
|
|
54981
55103
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -54986,24 +55108,15 @@
|
|
|
54986
55108
|
var majorTickProjectedPosition = majorTicks[imajorTick + 1];
|
|
54987
55109
|
var majotTickPositionX = a * majorTickProjectedPosition + tx;
|
|
54988
55110
|
var majorTickStep = majorTicks[imajorTick + 2];
|
|
54989
|
-
majorShape.
|
|
54990
|
-
majorShape.visible = true;
|
|
54991
|
-
majorShape.transform.position.set(majotTickPositionX, shapePositionY);
|
|
54992
|
-
majorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);
|
|
54993
|
-
majorShape.allowUploadedUpdate();
|
|
55111
|
+
this.showMajor(majorShape, majotTickPositionX, shapePositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
|
|
54994
55112
|
if (i < gridlineShapes.length) {
|
|
54995
|
-
|
|
54996
|
-
gridlineShape.disallowUploadedUpdate();
|
|
54997
|
-
gridlineShape.visible = true;
|
|
54998
|
-
gridlineShape.transform.position.set(majotTickPositionX, plotAreaHeight * 0.5);
|
|
54999
|
-
gridlineShape.size.set(0, plotAreaHeight);
|
|
55000
|
-
gridlineShape.allowUploadedUpdate();
|
|
55113
|
+
this.showMajorGridline(gridlineShapes[i], majorTickPosition, majotTickPositionX, plotAreaHeight * 0.5, 0, plotAreaHeight);
|
|
55001
55114
|
}
|
|
55002
55115
|
}
|
|
55003
55116
|
else {
|
|
55004
|
-
majorShape
|
|
55117
|
+
this.hideMajor(majorShape);
|
|
55005
55118
|
if (i < gridlineShapes.length) {
|
|
55006
|
-
gridlineShapes[i]
|
|
55119
|
+
this.hideMajorGridline(gridlineShapes[i]);
|
|
55007
55120
|
}
|
|
55008
55121
|
}
|
|
55009
55122
|
}
|
|
@@ -55011,15 +55124,14 @@
|
|
|
55011
55124
|
var minorShape = minorShapes[i];
|
|
55012
55125
|
var iminorTick = i * 3;
|
|
55013
55126
|
var minorTickPosition = minorTicks[iminorTick + 0];
|
|
55014
|
-
var minorTickProjectedPosition = minorTicks[iminorTick + 1];
|
|
55015
55127
|
if (!isNaN(minorTickPosition)) {
|
|
55016
|
-
|
|
55017
|
-
|
|
55018
|
-
|
|
55019
|
-
minorShape.
|
|
55128
|
+
var minorTickProjectedPosition = minorTicks[iminorTick + 1];
|
|
55129
|
+
var minorTickPositionX = a * minorTickProjectedPosition + tx;
|
|
55130
|
+
var minorTickStep = minorTicks[iminorTick + 2];
|
|
55131
|
+
this.showMinor(minorShape, minorTickPositionX, shapePositionY, minorFormatter === null || minorFormatter === void 0 ? void 0 : minorFormatter.format(minorTickPosition, minorTickStep));
|
|
55020
55132
|
}
|
|
55021
55133
|
else {
|
|
55022
|
-
minorShape
|
|
55134
|
+
this.hideMinor(minorShape);
|
|
55023
55135
|
}
|
|
55024
55136
|
}
|
|
55025
55137
|
return true;
|
|
@@ -55035,9 +55147,10 @@
|
|
|
55035
55147
|
var minorCountPerMajor = minorTick.count;
|
|
55036
55148
|
var minorCount = (majorCapacity + 1) * minorCountPerMajor;
|
|
55037
55149
|
var minorStep = minorTick.step;
|
|
55150
|
+
var minorFormatter = minorTick.formatter;
|
|
55038
55151
|
var majorTicks = this._majorTicks;
|
|
55039
55152
|
var minorTicks = this._minorTicks;
|
|
55040
|
-
|
|
55153
|
+
this.newTicks(coordinate, domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
55041
55154
|
var d = transform.d;
|
|
55042
55155
|
var ty = transform.ty;
|
|
55043
55156
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -55048,24 +55161,15 @@
|
|
|
55048
55161
|
var majorTickProjectedPosition = majorTicks[imajorTick + 1];
|
|
55049
55162
|
var majotTickPositionY = d * majorTickProjectedPosition + ty;
|
|
55050
55163
|
var majorTickStep = majorTicks[imajorTick + 2];
|
|
55051
|
-
majorShape.
|
|
55052
|
-
majorShape.visible = true;
|
|
55053
|
-
majorShape.transform.position.set(shapePositionX, majotTickPositionY);
|
|
55054
|
-
majorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);
|
|
55055
|
-
majorShape.allowUploadedUpdate();
|
|
55164
|
+
this.showMajor(majorShape, shapePositionX, majotTickPositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
|
|
55056
55165
|
if (i < gridlineShapes.length) {
|
|
55057
|
-
|
|
55058
|
-
gridlineShape.disallowUploadedUpdate();
|
|
55059
|
-
gridlineShape.visible = true;
|
|
55060
|
-
gridlineShape.transform.position.set(plotAreaWidth * 0.5, majotTickPositionY);
|
|
55061
|
-
gridlineShape.size.set(plotAreaWidth, 0);
|
|
55062
|
-
gridlineShape.allowUploadedUpdate();
|
|
55166
|
+
this.showMajorGridline(gridlineShapes[i], majorTickPosition, plotAreaWidth * 0.5, majotTickPositionY, plotAreaWidth, 0);
|
|
55063
55167
|
}
|
|
55064
55168
|
}
|
|
55065
55169
|
else {
|
|
55066
|
-
majorShape
|
|
55170
|
+
this.hideMajor(majorShape);
|
|
55067
55171
|
if (i < gridlineShapes.length) {
|
|
55068
|
-
gridlineShapes[i]
|
|
55172
|
+
this.hideMajorGridline(gridlineShapes[i]);
|
|
55069
55173
|
}
|
|
55070
55174
|
}
|
|
55071
55175
|
}
|
|
@@ -55073,19 +55177,51 @@
|
|
|
55073
55177
|
var minorShape = minorShapes[i];
|
|
55074
55178
|
var iminorTick = i * 3;
|
|
55075
55179
|
var minorTickPosition = minorTicks[iminorTick + 0];
|
|
55076
|
-
var minorTickProjectedPosition = minorTicks[iminorTick + 1];
|
|
55077
55180
|
if (!isNaN(minorTickPosition)) {
|
|
55078
|
-
|
|
55079
|
-
|
|
55080
|
-
|
|
55081
|
-
minorShape.
|
|
55181
|
+
var minorTickProjectedPosition = minorTicks[iminorTick + 1];
|
|
55182
|
+
var minorTickPositionY = d * minorTickProjectedPosition + ty;
|
|
55183
|
+
var minorTickStep = minorTicks[iminorTick + 2];
|
|
55184
|
+
this.showMinor(minorShape, shapePositionX, minorTickPositionY, minorFormatter === null || minorFormatter === void 0 ? void 0 : minorFormatter.format(minorTickPosition, minorTickStep));
|
|
55082
55185
|
}
|
|
55083
55186
|
else {
|
|
55084
|
-
minorShape
|
|
55187
|
+
this.hideMinor(minorShape);
|
|
55085
55188
|
}
|
|
55086
55189
|
}
|
|
55087
55190
|
return true;
|
|
55088
55191
|
};
|
|
55192
|
+
DChartAxisBaseTickContainer.prototype.showMajor = function (shape, x, y, text) {
|
|
55193
|
+
shape.disallowUploadedUpdate();
|
|
55194
|
+
shape.visible = true;
|
|
55195
|
+
shape.transform.position.set(x, y);
|
|
55196
|
+
shape.text.value = text != null ? text : "";
|
|
55197
|
+
shape.allowUploadedUpdate();
|
|
55198
|
+
};
|
|
55199
|
+
DChartAxisBaseTickContainer.prototype.showMajorGridline = function (shape, value, x, y, sx, sy) {
|
|
55200
|
+
shape.disallowUploadedUpdate();
|
|
55201
|
+
shape.visible = true;
|
|
55202
|
+
shape.transform.position.set(x, y);
|
|
55203
|
+
shape.size.set(sx, sy);
|
|
55204
|
+
shape.allowUploadedUpdate();
|
|
55205
|
+
};
|
|
55206
|
+
DChartAxisBaseTickContainer.prototype.hideMajor = function (shape) {
|
|
55207
|
+
shape.visible = false;
|
|
55208
|
+
};
|
|
55209
|
+
DChartAxisBaseTickContainer.prototype.hideMajorGridline = function (shape) {
|
|
55210
|
+
shape.visible = false;
|
|
55211
|
+
};
|
|
55212
|
+
DChartAxisBaseTickContainer.prototype.showMinor = function (shape, x, y, text) {
|
|
55213
|
+
shape.disallowUploadedUpdate();
|
|
55214
|
+
shape.visible = true;
|
|
55215
|
+
shape.transform.position.set(x, y);
|
|
55216
|
+
shape.text.value = text != null ? text : "";
|
|
55217
|
+
shape.allowUploadedUpdate();
|
|
55218
|
+
};
|
|
55219
|
+
DChartAxisBaseTickContainer.prototype.hideMinor = function (shape) {
|
|
55220
|
+
shape.visible = false;
|
|
55221
|
+
};
|
|
55222
|
+
DChartAxisBaseTickContainer.prototype.newTicks = function (coordinate, domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
55223
|
+
coordinate.ticks(domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult);
|
|
55224
|
+
};
|
|
55089
55225
|
DChartAxisBaseTickContainer.prototype.destroy = function () {
|
|
55090
55226
|
this._major.destroy();
|
|
55091
55227
|
this._minor.destroy();
|
|
@@ -55103,12 +55239,22 @@
|
|
|
55103
55239
|
function DChartAxisBase(options) {
|
|
55104
55240
|
var theme = this.toTheme(options);
|
|
55105
55241
|
this._theme = theme;
|
|
55106
|
-
var parser =
|
|
55242
|
+
var parser = this.newParser(theme, options);
|
|
55107
55243
|
this._parser = parser;
|
|
55108
55244
|
this._index = 0;
|
|
55109
|
-
this._bar =
|
|
55110
|
-
this._tick =
|
|
55245
|
+
this._bar = this.newBar(parser, theme, options);
|
|
55246
|
+
this._tick = this.newTick(parser, theme, options);
|
|
55111
55247
|
}
|
|
55248
|
+
Object.defineProperty(DChartAxisBase.prototype, "parser", {
|
|
55249
|
+
get: function () {
|
|
55250
|
+
return this._parser;
|
|
55251
|
+
},
|
|
55252
|
+
enumerable: false,
|
|
55253
|
+
configurable: true
|
|
55254
|
+
});
|
|
55255
|
+
DChartAxisBase.prototype.newParser = function (theme, options) {
|
|
55256
|
+
return new DChartAxisBaseOptionParser(theme, options);
|
|
55257
|
+
};
|
|
55112
55258
|
Object.defineProperty(DChartAxisBase.prototype, "position", {
|
|
55113
55259
|
get: function () {
|
|
55114
55260
|
return this._parser.position;
|
|
@@ -55123,6 +55269,9 @@
|
|
|
55123
55269
|
enumerable: false,
|
|
55124
55270
|
configurable: true
|
|
55125
55271
|
});
|
|
55272
|
+
DChartAxisBase.prototype.newBar = function (parser, theme, options) {
|
|
55273
|
+
return new DChartAxisBaseBar(parser);
|
|
55274
|
+
};
|
|
55126
55275
|
Object.defineProperty(DChartAxisBase.prototype, "tick", {
|
|
55127
55276
|
get: function () {
|
|
55128
55277
|
return this._tick;
|
|
@@ -55130,6 +55279,9 @@
|
|
|
55130
55279
|
enumerable: false,
|
|
55131
55280
|
configurable: true
|
|
55132
55281
|
});
|
|
55282
|
+
DChartAxisBase.prototype.newTick = function (parser, theme, options) {
|
|
55283
|
+
return new DChartAxisBaseTickContainer(parser);
|
|
55284
|
+
};
|
|
55133
55285
|
DChartAxisBase.prototype.bind = function (container, index) {
|
|
55134
55286
|
this._container = container;
|
|
55135
55287
|
this._index = index;
|
|
@@ -55162,7 +55314,8 @@
|
|
|
55162
55314
|
this._container = undefined;
|
|
55163
55315
|
};
|
|
55164
55316
|
DChartAxisBase.prototype.toTheme = function (options) {
|
|
55165
|
-
|
|
55317
|
+
var _a;
|
|
55318
|
+
return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
|
|
55166
55319
|
};
|
|
55167
55320
|
DChartAxisBase.prototype.getThemeDefault = function () {
|
|
55168
55321
|
return DThemes.getInstance().get(this.getType());
|
|
@@ -55360,6 +55513,342 @@
|
|
|
55360
55513
|
Y: 1
|
|
55361
55514
|
};
|
|
55362
55515
|
|
|
55516
|
+
/*
|
|
55517
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
55518
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
55519
|
+
*/
|
|
55520
|
+
var DChartCoordinateTransformImpl = /** @class */ (function () {
|
|
55521
|
+
function DChartCoordinateTransformImpl(options) {
|
|
55522
|
+
this._theme = this.toTheme(options);
|
|
55523
|
+
this._id = 0;
|
|
55524
|
+
this._isTranslationEnabled = options === null || options === void 0 ? void 0 : options.translation;
|
|
55525
|
+
this._translate = 0;
|
|
55526
|
+
this._isScalingEnabled = options === null || options === void 0 ? void 0 : options.scaling;
|
|
55527
|
+
this._scale = 1;
|
|
55528
|
+
this._itranslate = 0;
|
|
55529
|
+
this._iscale = 1;
|
|
55530
|
+
}
|
|
55531
|
+
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "id", {
|
|
55532
|
+
get: function () {
|
|
55533
|
+
return this._id;
|
|
55534
|
+
},
|
|
55535
|
+
enumerable: false,
|
|
55536
|
+
configurable: true
|
|
55537
|
+
});
|
|
55538
|
+
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "translate", {
|
|
55539
|
+
get: function () {
|
|
55540
|
+
return this._translate;
|
|
55541
|
+
},
|
|
55542
|
+
set: function (translate) {
|
|
55543
|
+
this.set(translate);
|
|
55544
|
+
},
|
|
55545
|
+
enumerable: false,
|
|
55546
|
+
configurable: true
|
|
55547
|
+
});
|
|
55548
|
+
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "scale", {
|
|
55549
|
+
get: function () {
|
|
55550
|
+
return this._scale;
|
|
55551
|
+
},
|
|
55552
|
+
set: function (scale) {
|
|
55553
|
+
this.set(undefined, scale);
|
|
55554
|
+
},
|
|
55555
|
+
enumerable: false,
|
|
55556
|
+
configurable: true
|
|
55557
|
+
});
|
|
55558
|
+
DChartCoordinateTransformImpl.prototype.bind = function (container, direction) {
|
|
55559
|
+
this.set(0, direction === DChartCoordinateDirection.X ? +1 : -1);
|
|
55560
|
+
};
|
|
55561
|
+
DChartCoordinateTransformImpl.prototype.unbind = function () {
|
|
55562
|
+
// DO NOTHING
|
|
55563
|
+
};
|
|
55564
|
+
DChartCoordinateTransformImpl.prototype.set = function (translate, scale) {
|
|
55565
|
+
var isChanged = false;
|
|
55566
|
+
if (translate != null &&
|
|
55567
|
+
this._isTranslationEnabled !== false &&
|
|
55568
|
+
this._translate !== translate) {
|
|
55569
|
+
isChanged = true;
|
|
55570
|
+
this._translate = translate;
|
|
55571
|
+
}
|
|
55572
|
+
if (scale != null && this._isScalingEnabled !== false && this._scale !== scale) {
|
|
55573
|
+
isChanged = true;
|
|
55574
|
+
this._scale = scale;
|
|
55575
|
+
}
|
|
55576
|
+
if (isChanged) {
|
|
55577
|
+
this._id += 1;
|
|
55578
|
+
this._iscale = this._theme.isZero(this._scale) ? 0 : 1 / this._scale;
|
|
55579
|
+
this._itranslate = -this._translate * this._iscale;
|
|
55580
|
+
}
|
|
55581
|
+
};
|
|
55582
|
+
DChartCoordinateTransformImpl.prototype.blend = function (ratio, mark) {
|
|
55583
|
+
var ratioi = 1 - ratio;
|
|
55584
|
+
var newTranslate = mark.newTranslate * ratio + mark.oldTranslate * ratioi;
|
|
55585
|
+
var newScale = mark.newScale * ratio + mark.oldScale * ratioi;
|
|
55586
|
+
this.set(newTranslate, newScale);
|
|
55587
|
+
};
|
|
55588
|
+
DChartCoordinateTransformImpl.prototype.map = function (value) {
|
|
55589
|
+
return this._translate + this._scale * value;
|
|
55590
|
+
};
|
|
55591
|
+
DChartCoordinateTransformImpl.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
|
|
55592
|
+
var translate = this._translate;
|
|
55593
|
+
var scale = this._scale;
|
|
55594
|
+
for (var i = ifrom + offset; i < iend; i += stride) {
|
|
55595
|
+
values[i] = translate + scale * values[i];
|
|
55596
|
+
}
|
|
55597
|
+
};
|
|
55598
|
+
DChartCoordinateTransformImpl.prototype.unmap = function (value) {
|
|
55599
|
+
return this._itranslate + this._iscale * value;
|
|
55600
|
+
};
|
|
55601
|
+
DChartCoordinateTransformImpl.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
55602
|
+
var itranslate = this._itranslate;
|
|
55603
|
+
var iscale = this._iscale;
|
|
55604
|
+
for (var i = ifrom + offset; i < iend; i += stride) {
|
|
55605
|
+
values[i] = itranslate + iscale * values[i];
|
|
55606
|
+
}
|
|
55607
|
+
};
|
|
55608
|
+
DChartCoordinateTransformImpl.prototype.toTheme = function (options) {
|
|
55609
|
+
return (options && options.theme) || this.getThemeDefault();
|
|
55610
|
+
};
|
|
55611
|
+
DChartCoordinateTransformImpl.prototype.getThemeDefault = function () {
|
|
55612
|
+
return DThemes.getInstance().get(this.getType());
|
|
55613
|
+
};
|
|
55614
|
+
DChartCoordinateTransformImpl.prototype.getType = function () {
|
|
55615
|
+
return "DChartCoordinateTransform";
|
|
55616
|
+
};
|
|
55617
|
+
return DChartCoordinateTransformImpl;
|
|
55618
|
+
}());
|
|
55619
|
+
|
|
55620
|
+
var DChartCoordinateTransformMarkImpl = /** @class */ (function () {
|
|
55621
|
+
function DChartCoordinateTransformMarkImpl() {
|
|
55622
|
+
this.oldTranslate = 0;
|
|
55623
|
+
this.oldScale = 1;
|
|
55624
|
+
this.newTranslate = 0;
|
|
55625
|
+
this.newScale = 1;
|
|
55626
|
+
}
|
|
55627
|
+
DChartCoordinateTransformMarkImpl.prototype.set = function (translate, scale) {
|
|
55628
|
+
if (translate != null) {
|
|
55629
|
+
this.newTranslate = translate;
|
|
55630
|
+
}
|
|
55631
|
+
if (scale != null) {
|
|
55632
|
+
this.newScale = scale;
|
|
55633
|
+
}
|
|
55634
|
+
};
|
|
55635
|
+
return DChartCoordinateTransformMarkImpl;
|
|
55636
|
+
}());
|
|
55637
|
+
|
|
55638
|
+
/*
|
|
55639
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
55640
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
55641
|
+
*/
|
|
55642
|
+
var DChartRegionImpl = /** @class */ (function () {
|
|
55643
|
+
function DChartRegionImpl(from, to) {
|
|
55644
|
+
this.from = from;
|
|
55645
|
+
this.to = to;
|
|
55646
|
+
}
|
|
55647
|
+
DChartRegionImpl.prototype.set = function (from, to) {
|
|
55648
|
+
if (from != null) {
|
|
55649
|
+
this.from = from;
|
|
55650
|
+
}
|
|
55651
|
+
if (to != null) {
|
|
55652
|
+
this.to = to;
|
|
55653
|
+
}
|
|
55654
|
+
return this;
|
|
55655
|
+
};
|
|
55656
|
+
DChartRegionImpl.prototype.add = function (from, to) {
|
|
55657
|
+
if (!isNaN$1(from)) {
|
|
55658
|
+
this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
55659
|
+
}
|
|
55660
|
+
if (!isNaN$1(to)) {
|
|
55661
|
+
this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
55662
|
+
}
|
|
55663
|
+
return this;
|
|
55664
|
+
};
|
|
55665
|
+
DChartRegionImpl.prototype.clear = function () {
|
|
55666
|
+
this.from = NaN;
|
|
55667
|
+
this.to = NaN;
|
|
55668
|
+
return this;
|
|
55669
|
+
};
|
|
55670
|
+
return DChartRegionImpl;
|
|
55671
|
+
}());
|
|
55672
|
+
|
|
55673
|
+
/*
|
|
55674
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
55675
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
55676
|
+
*/
|
|
55677
|
+
var DChartCoordinateBase = /** @class */ (function () {
|
|
55678
|
+
function DChartCoordinateBase(options) {
|
|
55679
|
+
this._id = 0;
|
|
55680
|
+
this._direction = DChartCoordinateDirection.X;
|
|
55681
|
+
this._theme = this.toTheme(options);
|
|
55682
|
+
this._transform = this.newTransform(options === null || options === void 0 ? void 0 : options.transform);
|
|
55683
|
+
this._tick = this.newTick(options === null || options === void 0 ? void 0 : options.tick);
|
|
55684
|
+
this._work = this.newRegion();
|
|
55685
|
+
this._mark = this.newMark();
|
|
55686
|
+
this._from = options === null || options === void 0 ? void 0 : options.from;
|
|
55687
|
+
this._to = options === null || options === void 0 ? void 0 : options.to;
|
|
55688
|
+
}
|
|
55689
|
+
DChartCoordinateBase.prototype.newTransform = function (options) {
|
|
55690
|
+
return new DChartCoordinateTransformImpl(options);
|
|
55691
|
+
};
|
|
55692
|
+
DChartCoordinateBase.prototype.newRegion = function () {
|
|
55693
|
+
return new DChartRegionImpl(NaN, NaN);
|
|
55694
|
+
};
|
|
55695
|
+
DChartCoordinateBase.prototype.newMark = function () {
|
|
55696
|
+
return new DChartCoordinateTransformMarkImpl();
|
|
55697
|
+
};
|
|
55698
|
+
Object.defineProperty(DChartCoordinateBase.prototype, "from", {
|
|
55699
|
+
get: function () {
|
|
55700
|
+
return this._from;
|
|
55701
|
+
},
|
|
55702
|
+
set: function (from) {
|
|
55703
|
+
this._from = from;
|
|
55704
|
+
},
|
|
55705
|
+
enumerable: false,
|
|
55706
|
+
configurable: true
|
|
55707
|
+
});
|
|
55708
|
+
Object.defineProperty(DChartCoordinateBase.prototype, "to", {
|
|
55709
|
+
get: function () {
|
|
55710
|
+
return this._to;
|
|
55711
|
+
},
|
|
55712
|
+
set: function (to) {
|
|
55713
|
+
this._to = to;
|
|
55714
|
+
},
|
|
55715
|
+
enumerable: false,
|
|
55716
|
+
configurable: true
|
|
55717
|
+
});
|
|
55718
|
+
DChartCoordinateBase.prototype.bind = function (container, direction) {
|
|
55719
|
+
this._container = container;
|
|
55720
|
+
this._direction = direction;
|
|
55721
|
+
this._transform.bind(container, direction);
|
|
55722
|
+
};
|
|
55723
|
+
DChartCoordinateBase.prototype.unbind = function () {
|
|
55724
|
+
this._container = undefined;
|
|
55725
|
+
this._transform.unbind();
|
|
55726
|
+
};
|
|
55727
|
+
DChartCoordinateBase.prototype.fit = function (from, to) {
|
|
55728
|
+
this.doFit(from, to, this._transform);
|
|
55729
|
+
};
|
|
55730
|
+
DChartCoordinateBase.prototype.mark = function (from, to) {
|
|
55731
|
+
var mark = this._mark;
|
|
55732
|
+
var transform = this._transform;
|
|
55733
|
+
mark.oldTranslate = transform.translate;
|
|
55734
|
+
mark.oldScale = transform.scale;
|
|
55735
|
+
this.doFit(from, to, mark);
|
|
55736
|
+
};
|
|
55737
|
+
DChartCoordinateBase.prototype.blend = function (ratio) {
|
|
55738
|
+
this._transform.blend(ratio, this._mark);
|
|
55739
|
+
};
|
|
55740
|
+
DChartCoordinateBase.prototype.doFit = function (from, to, result) {
|
|
55741
|
+
var container = this._container;
|
|
55742
|
+
if (container) {
|
|
55743
|
+
var plotArea = container.container.plotArea;
|
|
55744
|
+
var padding = plotArea.padding;
|
|
55745
|
+
var work = this._work;
|
|
55746
|
+
switch (this._direction) {
|
|
55747
|
+
case DChartCoordinateDirection.X:
|
|
55748
|
+
this.doFit_(padding.getLeft(), plotArea.width - padding.getRight(), this.toFitDomain(from, to, plotArea, work), result);
|
|
55749
|
+
break;
|
|
55750
|
+
case DChartCoordinateDirection.Y:
|
|
55751
|
+
this.doFit_(plotArea.height - padding.getBottom(), padding.getTop(), this.toFitRange(from, to, plotArea, work), result);
|
|
55752
|
+
break;
|
|
55753
|
+
}
|
|
55754
|
+
}
|
|
55755
|
+
};
|
|
55756
|
+
DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
55757
|
+
if (from == null) {
|
|
55758
|
+
from = this._from;
|
|
55759
|
+
}
|
|
55760
|
+
if (to == null) {
|
|
55761
|
+
to = this._to;
|
|
55762
|
+
}
|
|
55763
|
+
if (from != null && to != null) {
|
|
55764
|
+
result.set(from, to);
|
|
55765
|
+
}
|
|
55766
|
+
else {
|
|
55767
|
+
plotArea.series.getDomain(this, result);
|
|
55768
|
+
result.set(from, to);
|
|
55769
|
+
}
|
|
55770
|
+
return result;
|
|
55771
|
+
};
|
|
55772
|
+
DChartCoordinateBase.prototype.toFitRange = function (from, to, plotArea, result) {
|
|
55773
|
+
if (from == null) {
|
|
55774
|
+
from = this._from;
|
|
55775
|
+
}
|
|
55776
|
+
if (to == null) {
|
|
55777
|
+
to = this._to;
|
|
55778
|
+
}
|
|
55779
|
+
if (from != null && to != null) {
|
|
55780
|
+
result.set(from, to);
|
|
55781
|
+
}
|
|
55782
|
+
else {
|
|
55783
|
+
plotArea.series.getRange(this, result);
|
|
55784
|
+
result.set(from, to);
|
|
55785
|
+
}
|
|
55786
|
+
return result;
|
|
55787
|
+
};
|
|
55788
|
+
DChartCoordinateBase.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
|
|
55789
|
+
var regionFrom = region.from;
|
|
55790
|
+
var regionTo = region.to;
|
|
55791
|
+
if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
|
|
55792
|
+
// Scale
|
|
55793
|
+
var newScale = 1;
|
|
55794
|
+
var regionFromMapped = this.map(regionFrom);
|
|
55795
|
+
var regionToMapped = this.map(regionTo);
|
|
55796
|
+
var regionSizeMapped = regionToMapped - regionFromMapped;
|
|
55797
|
+
if (!this._theme.isZero(regionSizeMapped)) {
|
|
55798
|
+
var pixelSize = pixelTo - pixelFrom;
|
|
55799
|
+
newScale = pixelSize / regionSizeMapped;
|
|
55800
|
+
}
|
|
55801
|
+
else {
|
|
55802
|
+
newScale = pixelTo < pixelFrom ? -1 : 1;
|
|
55803
|
+
}
|
|
55804
|
+
// Translation
|
|
55805
|
+
var newTranslation = pixelFrom - regionFromMapped * newScale;
|
|
55806
|
+
// Done
|
|
55807
|
+
result.set(newTranslation, newScale);
|
|
55808
|
+
}
|
|
55809
|
+
};
|
|
55810
|
+
Object.defineProperty(DChartCoordinateBase.prototype, "id", {
|
|
55811
|
+
get: function () {
|
|
55812
|
+
return this._id;
|
|
55813
|
+
},
|
|
55814
|
+
enumerable: false,
|
|
55815
|
+
configurable: true
|
|
55816
|
+
});
|
|
55817
|
+
Object.defineProperty(DChartCoordinateBase.prototype, "transform", {
|
|
55818
|
+
get: function () {
|
|
55819
|
+
return this._transform;
|
|
55820
|
+
},
|
|
55821
|
+
enumerable: false,
|
|
55822
|
+
configurable: true
|
|
55823
|
+
});
|
|
55824
|
+
DChartCoordinateBase.prototype.map = function (value) {
|
|
55825
|
+
return value;
|
|
55826
|
+
};
|
|
55827
|
+
DChartCoordinateBase.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
|
|
55828
|
+
// DO NOTHING
|
|
55829
|
+
};
|
|
55830
|
+
DChartCoordinateBase.prototype.unmap = function (value) {
|
|
55831
|
+
return value;
|
|
55832
|
+
};
|
|
55833
|
+
DChartCoordinateBase.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
55834
|
+
// DO NOTHING
|
|
55835
|
+
};
|
|
55836
|
+
DChartCoordinateBase.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
55837
|
+
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
55838
|
+
};
|
|
55839
|
+
DChartCoordinateBase.prototype.toTheme = function (options) {
|
|
55840
|
+
var _a;
|
|
55841
|
+
return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
|
|
55842
|
+
};
|
|
55843
|
+
DChartCoordinateBase.prototype.getThemeDefault = function () {
|
|
55844
|
+
return DThemes.getInstance().get(this.getType());
|
|
55845
|
+
};
|
|
55846
|
+
DChartCoordinateBase.prototype.getType = function () {
|
|
55847
|
+
return "DChartCoordinate";
|
|
55848
|
+
};
|
|
55849
|
+
return DChartCoordinateBase;
|
|
55850
|
+
}());
|
|
55851
|
+
|
|
55363
55852
|
/*
|
|
55364
55853
|
* Copyright (C) 2019 Toshiba Corporation
|
|
55365
55854
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -55659,7 +56148,8 @@
|
|
|
55659
56148
|
}
|
|
55660
56149
|
};
|
|
55661
56150
|
DChartCoordinateLinearTick.prototype.toTheme = function (options) {
|
|
55662
|
-
|
|
56151
|
+
var _a;
|
|
56152
|
+
return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
|
|
55663
56153
|
};
|
|
55664
56154
|
DChartCoordinateLinearTick.prototype.getThemeDefault = function () {
|
|
55665
56155
|
return DThemes.getInstance().get(this.getType());
|
|
@@ -55674,325 +56164,16 @@
|
|
|
55674
56164
|
* Copyright (C) 2019 Toshiba Corporation
|
|
55675
56165
|
* SPDX-License-Identifier: Apache-2.0
|
|
55676
56166
|
*/
|
|
55677
|
-
var
|
|
55678
|
-
|
|
55679
|
-
|
|
55680
|
-
this
|
|
55681
|
-
this._isTranslationEnabled = options === null || options === void 0 ? void 0 : options.translation;
|
|
55682
|
-
this._translate = 0;
|
|
55683
|
-
this._isScalingEnabled = options === null || options === void 0 ? void 0 : options.scaling;
|
|
55684
|
-
this._scale = 1;
|
|
55685
|
-
this._itranslate = 0;
|
|
55686
|
-
this._iscale = 1;
|
|
55687
|
-
}
|
|
55688
|
-
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "id", {
|
|
55689
|
-
get: function () {
|
|
55690
|
-
return this._id;
|
|
55691
|
-
},
|
|
55692
|
-
enumerable: false,
|
|
55693
|
-
configurable: true
|
|
55694
|
-
});
|
|
55695
|
-
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "translate", {
|
|
55696
|
-
get: function () {
|
|
55697
|
-
return this._translate;
|
|
55698
|
-
},
|
|
55699
|
-
set: function (translate) {
|
|
55700
|
-
this.set(translate);
|
|
55701
|
-
},
|
|
55702
|
-
enumerable: false,
|
|
55703
|
-
configurable: true
|
|
55704
|
-
});
|
|
55705
|
-
Object.defineProperty(DChartCoordinateTransformImpl.prototype, "scale", {
|
|
55706
|
-
get: function () {
|
|
55707
|
-
return this._scale;
|
|
55708
|
-
},
|
|
55709
|
-
set: function (scale) {
|
|
55710
|
-
this.set(undefined, scale);
|
|
55711
|
-
},
|
|
55712
|
-
enumerable: false,
|
|
55713
|
-
configurable: true
|
|
55714
|
-
});
|
|
55715
|
-
DChartCoordinateTransformImpl.prototype.bind = function (container, direction) {
|
|
55716
|
-
this.set(0, direction === DChartCoordinateDirection.X ? +1 : -1);
|
|
55717
|
-
};
|
|
55718
|
-
DChartCoordinateTransformImpl.prototype.unbind = function () {
|
|
55719
|
-
// DO NOTHING
|
|
55720
|
-
};
|
|
55721
|
-
DChartCoordinateTransformImpl.prototype.set = function (translate, scale) {
|
|
55722
|
-
var isChanged = false;
|
|
55723
|
-
if (translate != null &&
|
|
55724
|
-
this._isTranslationEnabled !== false &&
|
|
55725
|
-
this._translate !== translate) {
|
|
55726
|
-
isChanged = true;
|
|
55727
|
-
this._translate = translate;
|
|
55728
|
-
}
|
|
55729
|
-
if (scale != null && this._isScalingEnabled !== false && this._scale !== scale) {
|
|
55730
|
-
isChanged = true;
|
|
55731
|
-
this._scale = scale;
|
|
55732
|
-
}
|
|
55733
|
-
if (isChanged) {
|
|
55734
|
-
this._id += 1;
|
|
55735
|
-
this._iscale = this._theme.isZero(this._scale) ? 0 : 1 / this._scale;
|
|
55736
|
-
this._itranslate = -this._translate * this._iscale;
|
|
55737
|
-
}
|
|
55738
|
-
};
|
|
55739
|
-
DChartCoordinateTransformImpl.prototype.blend = function (ratio, mark) {
|
|
55740
|
-
var ratioi = 1 - ratio;
|
|
55741
|
-
var newTranslate = mark.newTranslate * ratio + mark.oldTranslate * ratioi;
|
|
55742
|
-
var newScale = mark.newScale * ratio + mark.oldScale * ratioi;
|
|
55743
|
-
this.set(newTranslate, newScale);
|
|
55744
|
-
};
|
|
55745
|
-
DChartCoordinateTransformImpl.prototype.map = function (value) {
|
|
55746
|
-
return this._translate + this._scale * value;
|
|
55747
|
-
};
|
|
55748
|
-
DChartCoordinateTransformImpl.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
|
|
55749
|
-
var translate = this._translate;
|
|
55750
|
-
var scale = this._scale;
|
|
55751
|
-
for (var i = ifrom + offset; i < iend; i += stride) {
|
|
55752
|
-
values[i] = translate + scale * values[i];
|
|
55753
|
-
}
|
|
55754
|
-
};
|
|
55755
|
-
DChartCoordinateTransformImpl.prototype.unmap = function (value) {
|
|
55756
|
-
return this._itranslate + this._iscale * value;
|
|
55757
|
-
};
|
|
55758
|
-
DChartCoordinateTransformImpl.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
55759
|
-
var itranslate = this._itranslate;
|
|
55760
|
-
var iscale = this._iscale;
|
|
55761
|
-
for (var i = ifrom + offset; i < iend; i += stride) {
|
|
55762
|
-
values[i] = itranslate + iscale * values[i];
|
|
55763
|
-
}
|
|
55764
|
-
};
|
|
55765
|
-
DChartCoordinateTransformImpl.prototype.toTheme = function (options) {
|
|
55766
|
-
return (options && options.theme) || this.getThemeDefault();
|
|
55767
|
-
};
|
|
55768
|
-
DChartCoordinateTransformImpl.prototype.getThemeDefault = function () {
|
|
55769
|
-
return DThemes.getInstance().get(this.getType());
|
|
55770
|
-
};
|
|
55771
|
-
DChartCoordinateTransformImpl.prototype.getType = function () {
|
|
55772
|
-
return "DChartCoordinateTransform";
|
|
55773
|
-
};
|
|
55774
|
-
return DChartCoordinateTransformImpl;
|
|
55775
|
-
}());
|
|
55776
|
-
|
|
55777
|
-
var DChartCoordinateTransformMarkImpl = /** @class */ (function () {
|
|
55778
|
-
function DChartCoordinateTransformMarkImpl() {
|
|
55779
|
-
this.oldTranslate = 0;
|
|
55780
|
-
this.oldScale = 1;
|
|
55781
|
-
this.newTranslate = 0;
|
|
55782
|
-
this.newScale = 1;
|
|
55783
|
-
}
|
|
55784
|
-
DChartCoordinateTransformMarkImpl.prototype.set = function (translate, scale) {
|
|
55785
|
-
if (translate != null) {
|
|
55786
|
-
this.newTranslate = translate;
|
|
55787
|
-
}
|
|
55788
|
-
if (scale != null) {
|
|
55789
|
-
this.newScale = scale;
|
|
55790
|
-
}
|
|
55791
|
-
};
|
|
55792
|
-
return DChartCoordinateTransformMarkImpl;
|
|
55793
|
-
}());
|
|
55794
|
-
|
|
55795
|
-
/*
|
|
55796
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
55797
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
55798
|
-
*/
|
|
55799
|
-
var DChartRegionImpl = /** @class */ (function () {
|
|
55800
|
-
function DChartRegionImpl(from, to) {
|
|
55801
|
-
this.from = from;
|
|
55802
|
-
this.to = to;
|
|
55803
|
-
}
|
|
55804
|
-
DChartRegionImpl.prototype.set = function (from, to) {
|
|
55805
|
-
if (from != null) {
|
|
55806
|
-
this.from = from;
|
|
55807
|
-
}
|
|
55808
|
-
if (to != null) {
|
|
55809
|
-
this.to = to;
|
|
55810
|
-
}
|
|
55811
|
-
return this;
|
|
55812
|
-
};
|
|
55813
|
-
DChartRegionImpl.prototype.add = function (from, to) {
|
|
55814
|
-
if (!isNaN$1(from)) {
|
|
55815
|
-
this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
55816
|
-
}
|
|
55817
|
-
if (!isNaN$1(to)) {
|
|
55818
|
-
this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
55819
|
-
}
|
|
55820
|
-
return this;
|
|
55821
|
-
};
|
|
55822
|
-
DChartRegionImpl.prototype.clear = function () {
|
|
55823
|
-
this.from = NaN;
|
|
55824
|
-
this.to = NaN;
|
|
55825
|
-
return this;
|
|
55826
|
-
};
|
|
55827
|
-
return DChartRegionImpl;
|
|
55828
|
-
}());
|
|
55829
|
-
|
|
55830
|
-
/*
|
|
55831
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
55832
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
55833
|
-
*/
|
|
55834
|
-
var DChartCoordinateLinear = /** @class */ (function () {
|
|
55835
|
-
function DChartCoordinateLinear(options) {
|
|
55836
|
-
this._id = 0;
|
|
55837
|
-
this._direction = DChartCoordinateDirection.X;
|
|
55838
|
-
this._theme = this.toTheme(options);
|
|
55839
|
-
this._transform = new DChartCoordinateTransformImpl(options === null || options === void 0 ? void 0 : options.transform);
|
|
55840
|
-
this._tick = new DChartCoordinateLinearTick(options === null || options === void 0 ? void 0 : options.tick);
|
|
55841
|
-
this._work = new DChartRegionImpl(NaN, NaN);
|
|
55842
|
-
this._mark = new DChartCoordinateTransformMarkImpl();
|
|
55843
|
-
this._from = options === null || options === void 0 ? void 0 : options.from;
|
|
55844
|
-
this._to = options === null || options === void 0 ? void 0 : options.to;
|
|
56167
|
+
var DChartCoordinateLinear = /** @class */ (function (_super) {
|
|
56168
|
+
__extends(DChartCoordinateLinear, _super);
|
|
56169
|
+
function DChartCoordinateLinear() {
|
|
56170
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
55845
56171
|
}
|
|
55846
|
-
|
|
55847
|
-
|
|
55848
|
-
return this._from;
|
|
55849
|
-
},
|
|
55850
|
-
set: function (from) {
|
|
55851
|
-
this._from = from;
|
|
55852
|
-
},
|
|
55853
|
-
enumerable: false,
|
|
55854
|
-
configurable: true
|
|
55855
|
-
});
|
|
55856
|
-
Object.defineProperty(DChartCoordinateLinear.prototype, "to", {
|
|
55857
|
-
get: function () {
|
|
55858
|
-
return this._to;
|
|
55859
|
-
},
|
|
55860
|
-
set: function (to) {
|
|
55861
|
-
this._to = to;
|
|
55862
|
-
},
|
|
55863
|
-
enumerable: false,
|
|
55864
|
-
configurable: true
|
|
55865
|
-
});
|
|
55866
|
-
DChartCoordinateLinear.prototype.bind = function (container, direction) {
|
|
55867
|
-
this._container = container;
|
|
55868
|
-
this._direction = direction;
|
|
55869
|
-
this._transform.bind(container, direction);
|
|
55870
|
-
};
|
|
55871
|
-
DChartCoordinateLinear.prototype.unbind = function () {
|
|
55872
|
-
this._container = undefined;
|
|
55873
|
-
this._transform.unbind();
|
|
55874
|
-
};
|
|
55875
|
-
DChartCoordinateLinear.prototype.fit = function (from, to) {
|
|
55876
|
-
this.doFit(from, to, this._transform);
|
|
55877
|
-
};
|
|
55878
|
-
DChartCoordinateLinear.prototype.mark = function (from, to) {
|
|
55879
|
-
var mark = this._mark;
|
|
55880
|
-
var transform = this._transform;
|
|
55881
|
-
mark.oldTranslate = transform.translate;
|
|
55882
|
-
mark.oldScale = transform.scale;
|
|
55883
|
-
this.doFit(from, to, mark);
|
|
55884
|
-
};
|
|
55885
|
-
DChartCoordinateLinear.prototype.blend = function (ratio) {
|
|
55886
|
-
this._transform.blend(ratio, this._mark);
|
|
55887
|
-
};
|
|
55888
|
-
DChartCoordinateLinear.prototype.doFit = function (from, to, result) {
|
|
55889
|
-
var container = this._container;
|
|
55890
|
-
if (container) {
|
|
55891
|
-
var plotArea = container.container.plotArea;
|
|
55892
|
-
var padding = plotArea.padding;
|
|
55893
|
-
var work = this._work;
|
|
55894
|
-
switch (this._direction) {
|
|
55895
|
-
case DChartCoordinateDirection.X:
|
|
55896
|
-
this.doFit_(padding.getLeft(), plotArea.width - padding.getRight(), this.toFitDomain(from, to, plotArea, work), result);
|
|
55897
|
-
break;
|
|
55898
|
-
case DChartCoordinateDirection.Y:
|
|
55899
|
-
this.doFit_(plotArea.height - padding.getBottom(), padding.getTop(), this.toFitRange(from, to, plotArea, work), result);
|
|
55900
|
-
break;
|
|
55901
|
-
}
|
|
55902
|
-
}
|
|
55903
|
-
};
|
|
55904
|
-
DChartCoordinateLinear.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
55905
|
-
if (from == null) {
|
|
55906
|
-
from = this._from;
|
|
55907
|
-
}
|
|
55908
|
-
if (to == null) {
|
|
55909
|
-
to = this._to;
|
|
55910
|
-
}
|
|
55911
|
-
if (from != null && to != null) {
|
|
55912
|
-
result.set(from, to);
|
|
55913
|
-
}
|
|
55914
|
-
else {
|
|
55915
|
-
plotArea.series.getDomain(this, result);
|
|
55916
|
-
result.set(from, to);
|
|
55917
|
-
}
|
|
55918
|
-
return result;
|
|
55919
|
-
};
|
|
55920
|
-
DChartCoordinateLinear.prototype.toFitRange = function (from, to, plotArea, result) {
|
|
55921
|
-
if (from == null) {
|
|
55922
|
-
from = this._from;
|
|
55923
|
-
}
|
|
55924
|
-
if (to == null) {
|
|
55925
|
-
to = this._to;
|
|
55926
|
-
}
|
|
55927
|
-
if (from != null && to != null) {
|
|
55928
|
-
result.set(from, to);
|
|
55929
|
-
}
|
|
55930
|
-
else {
|
|
55931
|
-
plotArea.series.getRange(this, result);
|
|
55932
|
-
result.set(from, to);
|
|
55933
|
-
}
|
|
55934
|
-
return result;
|
|
55935
|
-
};
|
|
55936
|
-
DChartCoordinateLinear.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
|
|
55937
|
-
var regionFrom = region.from;
|
|
55938
|
-
var regionTo = region.to;
|
|
55939
|
-
if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
|
|
55940
|
-
// Scale
|
|
55941
|
-
var newScale = 1;
|
|
55942
|
-
var regionSize = regionTo - regionFrom;
|
|
55943
|
-
if (!this._theme.isZero(regionSize)) {
|
|
55944
|
-
var pixelSize = pixelTo - pixelFrom;
|
|
55945
|
-
newScale = pixelSize / regionSize;
|
|
55946
|
-
}
|
|
55947
|
-
else {
|
|
55948
|
-
newScale = pixelTo < pixelFrom ? -1 : 1;
|
|
55949
|
-
}
|
|
55950
|
-
// Translation
|
|
55951
|
-
var newTranslation = pixelFrom - regionFrom * newScale;
|
|
55952
|
-
// Done
|
|
55953
|
-
result.set(newTranslation, newScale);
|
|
55954
|
-
}
|
|
55955
|
-
};
|
|
55956
|
-
Object.defineProperty(DChartCoordinateLinear.prototype, "id", {
|
|
55957
|
-
get: function () {
|
|
55958
|
-
return this._id;
|
|
55959
|
-
},
|
|
55960
|
-
enumerable: false,
|
|
55961
|
-
configurable: true
|
|
55962
|
-
});
|
|
55963
|
-
Object.defineProperty(DChartCoordinateLinear.prototype, "transform", {
|
|
55964
|
-
get: function () {
|
|
55965
|
-
return this._transform;
|
|
55966
|
-
},
|
|
55967
|
-
enumerable: false,
|
|
55968
|
-
configurable: true
|
|
55969
|
-
});
|
|
55970
|
-
DChartCoordinateLinear.prototype.map = function (value) {
|
|
55971
|
-
return value;
|
|
55972
|
-
};
|
|
55973
|
-
DChartCoordinateLinear.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
|
|
55974
|
-
// DO NOTHING
|
|
55975
|
-
};
|
|
55976
|
-
DChartCoordinateLinear.prototype.unmap = function (value) {
|
|
55977
|
-
return value;
|
|
55978
|
-
};
|
|
55979
|
-
DChartCoordinateLinear.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
55980
|
-
// DO NOTHING
|
|
55981
|
-
};
|
|
55982
|
-
DChartCoordinateLinear.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
55983
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
55984
|
-
};
|
|
55985
|
-
DChartCoordinateLinear.prototype.toTheme = function (options) {
|
|
55986
|
-
return (options && options.theme) || this.getThemeDefault();
|
|
55987
|
-
};
|
|
55988
|
-
DChartCoordinateLinear.prototype.getThemeDefault = function () {
|
|
55989
|
-
return DThemes.getInstance().get(this.getType());
|
|
55990
|
-
};
|
|
55991
|
-
DChartCoordinateLinear.prototype.getType = function () {
|
|
55992
|
-
return "DChartCoordinate";
|
|
56172
|
+
DChartCoordinateLinear.prototype.newTick = function (options) {
|
|
56173
|
+
return new DChartCoordinateLinearTick(options);
|
|
55993
56174
|
};
|
|
55994
56175
|
return DChartCoordinateLinear;
|
|
55995
|
-
}());
|
|
56176
|
+
}(DChartCoordinateBase));
|
|
55996
56177
|
|
|
55997
56178
|
/*
|
|
55998
56179
|
* Copyright (C) 2019 Toshiba Corporation
|
|
@@ -56117,7 +56298,8 @@
|
|
|
56117
56298
|
}
|
|
56118
56299
|
};
|
|
56119
56300
|
DChartCoordinateLogTick.prototype.toTheme = function (options) {
|
|
56120
|
-
|
|
56301
|
+
var _a;
|
|
56302
|
+
return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
|
|
56121
56303
|
};
|
|
56122
56304
|
DChartCoordinateLogTick.prototype.getThemeDefault = function () {
|
|
56123
56305
|
return DThemes.getInstance().get(this.getType());
|
|
@@ -56132,142 +56314,14 @@
|
|
|
56132
56314
|
* Copyright (C) 2019 Toshiba Corporation
|
|
56133
56315
|
* SPDX-License-Identifier: Apache-2.0
|
|
56134
56316
|
*/
|
|
56135
|
-
var DChartCoordinateLog = /** @class */ (function () {
|
|
56136
|
-
|
|
56137
|
-
|
|
56138
|
-
this
|
|
56139
|
-
this._theme = this.toTheme(options);
|
|
56140
|
-
this._transform = new DChartCoordinateTransformImpl(options === null || options === void 0 ? void 0 : options.transform);
|
|
56141
|
-
this._tick = new DChartCoordinateLogTick(options === null || options === void 0 ? void 0 : options.tick);
|
|
56142
|
-
this._work = new DChartRegionImpl(NaN, NaN);
|
|
56143
|
-
this._mark = new DChartCoordinateTransformMarkImpl();
|
|
56144
|
-
this._from = options === null || options === void 0 ? void 0 : options.from;
|
|
56145
|
-
this._to = options === null || options === void 0 ? void 0 : options.to;
|
|
56317
|
+
var DChartCoordinateLog = /** @class */ (function (_super) {
|
|
56318
|
+
__extends(DChartCoordinateLog, _super);
|
|
56319
|
+
function DChartCoordinateLog() {
|
|
56320
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
56146
56321
|
}
|
|
56147
|
-
|
|
56148
|
-
|
|
56149
|
-
return this._from;
|
|
56150
|
-
},
|
|
56151
|
-
set: function (from) {
|
|
56152
|
-
this._from = from;
|
|
56153
|
-
},
|
|
56154
|
-
enumerable: false,
|
|
56155
|
-
configurable: true
|
|
56156
|
-
});
|
|
56157
|
-
Object.defineProperty(DChartCoordinateLog.prototype, "to", {
|
|
56158
|
-
get: function () {
|
|
56159
|
-
return this._to;
|
|
56160
|
-
},
|
|
56161
|
-
set: function (to) {
|
|
56162
|
-
this._to = to;
|
|
56163
|
-
},
|
|
56164
|
-
enumerable: false,
|
|
56165
|
-
configurable: true
|
|
56166
|
-
});
|
|
56167
|
-
DChartCoordinateLog.prototype.bind = function (container, direction) {
|
|
56168
|
-
this._container = container;
|
|
56169
|
-
this._direction = direction;
|
|
56170
|
-
};
|
|
56171
|
-
DChartCoordinateLog.prototype.unbind = function () {
|
|
56172
|
-
this._container = undefined;
|
|
56173
|
-
};
|
|
56174
|
-
DChartCoordinateLog.prototype.fit = function (from, to) {
|
|
56175
|
-
this.doFit(from, to, this._transform);
|
|
56176
|
-
};
|
|
56177
|
-
DChartCoordinateLog.prototype.mark = function (from, to) {
|
|
56178
|
-
var mark = this._mark;
|
|
56179
|
-
var transform = this._transform;
|
|
56180
|
-
mark.oldTranslate = transform.translate;
|
|
56181
|
-
mark.oldScale = transform.scale;
|
|
56182
|
-
this.doFit(from, to, mark);
|
|
56183
|
-
};
|
|
56184
|
-
DChartCoordinateLog.prototype.blend = function (ratio) {
|
|
56185
|
-
this._transform.blend(ratio, this._mark);
|
|
56186
|
-
};
|
|
56187
|
-
DChartCoordinateLog.prototype.doFit = function (from, to, result) {
|
|
56188
|
-
var container = this._container;
|
|
56189
|
-
if (container) {
|
|
56190
|
-
var plotArea = container.container.plotArea;
|
|
56191
|
-
var padding = plotArea.padding;
|
|
56192
|
-
var work = this._work;
|
|
56193
|
-
switch (this._direction) {
|
|
56194
|
-
case DChartCoordinateDirection.X:
|
|
56195
|
-
this.doFit_(padding.getLeft(), plotArea.width - padding.getRight(), this.toFitDomain(from, to, plotArea, work), result);
|
|
56196
|
-
break;
|
|
56197
|
-
case DChartCoordinateDirection.Y:
|
|
56198
|
-
this.doFit_(plotArea.height - padding.getBottom(), padding.getTop(), this.toFitRange(from, to, plotArea, work), result);
|
|
56199
|
-
break;
|
|
56200
|
-
}
|
|
56201
|
-
}
|
|
56202
|
-
};
|
|
56203
|
-
DChartCoordinateLog.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
56204
|
-
if (from == null) {
|
|
56205
|
-
from = this._from;
|
|
56206
|
-
}
|
|
56207
|
-
if (to == null) {
|
|
56208
|
-
to = this._to;
|
|
56209
|
-
}
|
|
56210
|
-
if (from != null && to != null) {
|
|
56211
|
-
result.set(from, to);
|
|
56212
|
-
}
|
|
56213
|
-
else {
|
|
56214
|
-
plotArea.series.getDomain(this, result);
|
|
56215
|
-
result.set(from, to);
|
|
56216
|
-
}
|
|
56217
|
-
return result;
|
|
56218
|
-
};
|
|
56219
|
-
DChartCoordinateLog.prototype.toFitRange = function (from, to, plotArea, result) {
|
|
56220
|
-
if (from == null) {
|
|
56221
|
-
from = this._from;
|
|
56222
|
-
}
|
|
56223
|
-
if (to == null) {
|
|
56224
|
-
to = this._to;
|
|
56225
|
-
}
|
|
56226
|
-
if (from != null && to != null) {
|
|
56227
|
-
result.set(from, to);
|
|
56228
|
-
}
|
|
56229
|
-
else {
|
|
56230
|
-
plotArea.series.getRange(this, result);
|
|
56231
|
-
result.set(from, to);
|
|
56232
|
-
}
|
|
56233
|
-
return result;
|
|
56322
|
+
DChartCoordinateLog.prototype.newTick = function (options) {
|
|
56323
|
+
return new DChartCoordinateLogTick(options);
|
|
56234
56324
|
};
|
|
56235
|
-
DChartCoordinateLog.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
|
|
56236
|
-
var regionFrom = region.from;
|
|
56237
|
-
var regionTo = region.to;
|
|
56238
|
-
if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
|
|
56239
|
-
// Scale
|
|
56240
|
-
var newScale = 1;
|
|
56241
|
-
var regionFromMapped = this.map(regionFrom);
|
|
56242
|
-
var regionToMapped = this.map(regionTo);
|
|
56243
|
-
var regionSizeMapped = regionToMapped - regionFromMapped;
|
|
56244
|
-
if (!this._theme.isZero(regionSizeMapped)) {
|
|
56245
|
-
var pixelSize = pixelTo - pixelFrom;
|
|
56246
|
-
newScale = pixelSize / regionSizeMapped;
|
|
56247
|
-
}
|
|
56248
|
-
else {
|
|
56249
|
-
newScale = pixelTo < pixelFrom ? -1 : 1;
|
|
56250
|
-
}
|
|
56251
|
-
// Translation
|
|
56252
|
-
var newTranslation = pixelFrom - regionFromMapped * newScale;
|
|
56253
|
-
// Done
|
|
56254
|
-
result.set(newTranslation, newScale);
|
|
56255
|
-
}
|
|
56256
|
-
};
|
|
56257
|
-
Object.defineProperty(DChartCoordinateLog.prototype, "id", {
|
|
56258
|
-
get: function () {
|
|
56259
|
-
return this._id;
|
|
56260
|
-
},
|
|
56261
|
-
enumerable: false,
|
|
56262
|
-
configurable: true
|
|
56263
|
-
});
|
|
56264
|
-
Object.defineProperty(DChartCoordinateLog.prototype, "transform", {
|
|
56265
|
-
get: function () {
|
|
56266
|
-
return this._transform;
|
|
56267
|
-
},
|
|
56268
|
-
enumerable: false,
|
|
56269
|
-
configurable: true
|
|
56270
|
-
});
|
|
56271
56325
|
DChartCoordinateLog.prototype.map = function (value) {
|
|
56272
56326
|
return Math.log(Math.max(0, value)) / Math.LN10;
|
|
56273
56327
|
};
|
|
@@ -56286,20 +56340,8 @@
|
|
|
56286
56340
|
values[i] = Math.pow(10, values[i]);
|
|
56287
56341
|
}
|
|
56288
56342
|
};
|
|
56289
|
-
DChartCoordinateLog.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
56290
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
56291
|
-
};
|
|
56292
|
-
DChartCoordinateLog.prototype.toTheme = function (options) {
|
|
56293
|
-
return (options && options.theme) || this.getThemeDefault();
|
|
56294
|
-
};
|
|
56295
|
-
DChartCoordinateLog.prototype.getThemeDefault = function () {
|
|
56296
|
-
return DThemes.getInstance().get(this.getType());
|
|
56297
|
-
};
|
|
56298
|
-
DChartCoordinateLog.prototype.getType = function () {
|
|
56299
|
-
return "DChartCoordinate";
|
|
56300
|
-
};
|
|
56301
56343
|
return DChartCoordinateLog;
|
|
56302
|
-
}());
|
|
56344
|
+
}(DChartCoordinateBase));
|
|
56303
56345
|
|
|
56304
56346
|
/*
|
|
56305
56347
|
* Copyright (C) 2019 Toshiba Corporation
|
|
@@ -57852,10 +57894,12 @@
|
|
|
57852
57894
|
var DChartSeriesLineOfAny = /** @class */ (function (_super) {
|
|
57853
57895
|
__extends(DChartSeriesLineOfAny, _super);
|
|
57854
57896
|
function DChartSeriesLineOfAny(options) {
|
|
57855
|
-
var _this =
|
|
57897
|
+
var _this = this;
|
|
57898
|
+
var _a;
|
|
57899
|
+
_this = _super.call(this, options) || this;
|
|
57856
57900
|
_this._line = null;
|
|
57857
57901
|
_this._options = options;
|
|
57858
|
-
_this._points = (options
|
|
57902
|
+
_this._points = (_a = options === null || options === void 0 ? void 0 : options.points) !== null && _a !== void 0 ? _a : [];
|
|
57859
57903
|
_this._pointId = 0;
|
|
57860
57904
|
_this._pointIdUpdated = NaN;
|
|
57861
57905
|
return _this;
|
|
@@ -69312,6 +69356,43 @@
|
|
|
69312
69356
|
result.height -= dy;
|
|
69313
69357
|
}
|
|
69314
69358
|
};
|
|
69359
|
+
/**
|
|
69360
|
+
* Scroll to the given row or row index.
|
|
69361
|
+
*
|
|
69362
|
+
* @param target a row or an row index to which the body scrolls to.
|
|
69363
|
+
* @returns true if succeeded
|
|
69364
|
+
*/
|
|
69365
|
+
DTableBody.prototype.scrollTo = function (target) {
|
|
69366
|
+
var parent = this.parent;
|
|
69367
|
+
if (parent == null) {
|
|
69368
|
+
return false;
|
|
69369
|
+
}
|
|
69370
|
+
var parentParent = parent.parent;
|
|
69371
|
+
if (parentParent == null) {
|
|
69372
|
+
return false;
|
|
69373
|
+
}
|
|
69374
|
+
var rowIndexMapped = -1;
|
|
69375
|
+
if (isNumber(target)) {
|
|
69376
|
+
if (0 <= target && target < this.data.mapped.size()) {
|
|
69377
|
+
rowIndexMapped = target;
|
|
69378
|
+
}
|
|
69379
|
+
}
|
|
69380
|
+
else {
|
|
69381
|
+
this.data.mapped.each(function (row, _, index) {
|
|
69382
|
+
if (row === target) {
|
|
69383
|
+
rowIndexMapped = index;
|
|
69384
|
+
return false;
|
|
69385
|
+
}
|
|
69386
|
+
return true;
|
|
69387
|
+
});
|
|
69388
|
+
}
|
|
69389
|
+
if (rowIndexMapped < 0) {
|
|
69390
|
+
return false;
|
|
69391
|
+
}
|
|
69392
|
+
parent.position.y = Math.max(Math.min(0, parentParent.height - parent.height), -rowIndexMapped * this._rowHeight);
|
|
69393
|
+
DApplications.update(this);
|
|
69394
|
+
return true;
|
|
69395
|
+
};
|
|
69315
69396
|
DTableBody.prototype.toRowIndexMapped = function (local) {
|
|
69316
69397
|
if (0 <= this.parent.position.y + local.y) {
|
|
69317
69398
|
return Math.floor(local.y / this._rowHeight);
|
|
@@ -70865,7 +70946,7 @@
|
|
|
70865
70946
|
}
|
|
70866
70947
|
else {
|
|
70867
70948
|
return function (row) {
|
|
70868
|
-
return key_1
|
|
70949
|
+
return Object.prototype.hasOwnProperty.call(row, key_1) ? row[key_1] : def;
|
|
70869
70950
|
};
|
|
70870
70951
|
}
|
|
70871
70952
|
}
|
|
@@ -70884,7 +70965,7 @@
|
|
|
70884
70965
|
row = row[path[i]];
|
|
70885
70966
|
}
|
|
70886
70967
|
var key = path[path.length - 1];
|
|
70887
|
-
return key
|
|
70968
|
+
return Object.prototype.hasOwnProperty.call(row, key) ? row[key] : def;
|
|
70888
70969
|
};
|
|
70889
70970
|
}
|
|
70890
70971
|
}
|
|
@@ -70940,7 +71021,7 @@
|
|
|
70940
71021
|
if (pathLength_1 <= 1) {
|
|
70941
71022
|
var key_3 = path[0];
|
|
70942
71023
|
return function (row) {
|
|
70943
|
-
return key_3
|
|
71024
|
+
return Object.prototype.hasOwnProperty.call(row, key_3);
|
|
70944
71025
|
};
|
|
70945
71026
|
}
|
|
70946
71027
|
else {
|
|
@@ -73737,7 +73818,12 @@
|
|
|
73737
73818
|
DButton: DButton,
|
|
73738
73819
|
DCanvasContainer: DCanvasContainer,
|
|
73739
73820
|
DCanvas: DCanvas,
|
|
73821
|
+
DChartAxisBaseBar: DChartAxisBaseBar,
|
|
73740
73822
|
DChartAxisBaseOptionParser: DChartAxisBaseOptionParser,
|
|
73823
|
+
DChartAxisBaseTickContainer: DChartAxisBaseTickContainer,
|
|
73824
|
+
DChartAxisBaseTickMajorGridline: DChartAxisBaseTickMajorGridline,
|
|
73825
|
+
DChartAxisBaseTickMajor: DChartAxisBaseTickMajor,
|
|
73826
|
+
DChartAxisBaseTickMinor: DChartAxisBaseTickMinor,
|
|
73741
73827
|
DChartAxisBase: DChartAxisBase,
|
|
73742
73828
|
DChartAxisContainerImpl: DChartAxisContainerImpl,
|
|
73743
73829
|
DChartAxisPosition: DChartAxisPosition,
|
|
@@ -73747,6 +73833,7 @@
|
|
|
73747
73833
|
DChartAxisY: DChartAxisY,
|
|
73748
73834
|
DChartColorSet1: DChartColorSet1,
|
|
73749
73835
|
DChartColorSet2: DChartColorSet2,
|
|
73836
|
+
DChartCoordinateBase: DChartCoordinateBase,
|
|
73750
73837
|
DChartCoordinateContainerImpl: DChartCoordinateContainerImpl,
|
|
73751
73838
|
DChartCoordinateContainerSubImpl: DChartCoordinateContainerSubImpl,
|
|
73752
73839
|
DChartCoordinateDirection: DChartCoordinateDirection,
|