@wcardinal/wcardinal-ui 0.295.0 → 0.297.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-tick-container.d.ts +10 -3
- package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +3 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-linear-tick.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-log-tick.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-tick.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate.d.ts +5 -3
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +53 -19
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-base.js +14 -5
- package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js +47 -49
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js +48 -49
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +199 -160
- package/dist/wcardinal-ui.js +199 -160
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.297.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -73263,6 +73263,41 @@ var DChartAxisBaseTickMinor = /** @class */ (function () {
|
|
|
73263
73263
|
return DChartAxisBaseTickMinor;
|
|
73264
73264
|
}());
|
|
73265
73265
|
|
|
73266
|
+
/*
|
|
73267
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
73268
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
73269
|
+
*/
|
|
73270
|
+
var DChartRegionImpl = /** @class */ (function () {
|
|
73271
|
+
function DChartRegionImpl(from, to) {
|
|
73272
|
+
this.from = from;
|
|
73273
|
+
this.to = to;
|
|
73274
|
+
}
|
|
73275
|
+
DChartRegionImpl.prototype.set = function (from, to) {
|
|
73276
|
+
if (from != null) {
|
|
73277
|
+
this.from = from;
|
|
73278
|
+
}
|
|
73279
|
+
if (to != null) {
|
|
73280
|
+
this.to = to;
|
|
73281
|
+
}
|
|
73282
|
+
return this;
|
|
73283
|
+
};
|
|
73284
|
+
DChartRegionImpl.prototype.add = function (from, to) {
|
|
73285
|
+
if (!isNaN$1(from)) {
|
|
73286
|
+
this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
73287
|
+
}
|
|
73288
|
+
if (!isNaN$1(to)) {
|
|
73289
|
+
this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
73290
|
+
}
|
|
73291
|
+
return this;
|
|
73292
|
+
};
|
|
73293
|
+
DChartRegionImpl.prototype.clear = function () {
|
|
73294
|
+
this.from = NaN;
|
|
73295
|
+
this.to = NaN;
|
|
73296
|
+
return this;
|
|
73297
|
+
};
|
|
73298
|
+
return DChartRegionImpl;
|
|
73299
|
+
}());
|
|
73300
|
+
|
|
73266
73301
|
var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
73267
73302
|
function DChartAxisBaseTickContainer(parser, options) {
|
|
73268
73303
|
this._parser = parser;
|
|
@@ -73271,6 +73306,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73271
73306
|
this._minor = this.newMinor(parser, options);
|
|
73272
73307
|
this._majorTicks = [];
|
|
73273
73308
|
this._minorTicks = [];
|
|
73309
|
+
this._work = new DChartRegionImpl(0, 0);
|
|
73274
73310
|
}
|
|
73275
73311
|
Object.defineProperty(DChartAxisBaseTickContainer.prototype, "major", {
|
|
73276
73312
|
get: function () {
|
|
@@ -73310,54 +73346,86 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73310
73346
|
var minorShapes = this._minor.shapes;
|
|
73311
73347
|
if (container != null && majorShapes && minorShapes) {
|
|
73312
73348
|
var plotArea = container.plotArea;
|
|
73313
|
-
var bounds = plotArea.getBoundsInContainer();
|
|
73314
73349
|
var transform = plotArea.container.transform.localTransform;
|
|
73315
73350
|
var gridlineShapes = this._major.gridline.shapes;
|
|
73316
73351
|
var parser = this._parser;
|
|
73317
73352
|
var offset = parser.padding * this._index;
|
|
73353
|
+
var work = this._work;
|
|
73318
73354
|
var coordinate = void 0;
|
|
73319
73355
|
switch (parser.position) {
|
|
73320
73356
|
case DChartAxisPosition.TOP:
|
|
73321
73357
|
coordinate = plotArea.coordinate.x.get(parser.coordinate);
|
|
73322
73358
|
if (coordinate) {
|
|
73323
|
-
var
|
|
73324
|
-
var
|
|
73359
|
+
var domain = this.getDomain(plotArea, coordinate, work);
|
|
73360
|
+
var domainFrom = domain.from;
|
|
73361
|
+
var domainTo = domain.to;
|
|
73362
|
+
var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
|
|
73363
|
+
var domainVisibleFrom = domainVisible.from;
|
|
73364
|
+
var domainVisibleTo = domainVisible.to;
|
|
73325
73365
|
var plotAreaHeight = plotArea.height;
|
|
73326
|
-
return this.updateX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaHeight);
|
|
73366
|
+
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaHeight);
|
|
73327
73367
|
}
|
|
73328
73368
|
break;
|
|
73329
73369
|
case DChartAxisPosition.BOTTOM:
|
|
73330
73370
|
coordinate = plotArea.coordinate.x.get(parser.coordinate);
|
|
73331
73371
|
if (coordinate) {
|
|
73332
|
-
var
|
|
73333
|
-
var
|
|
73372
|
+
var domain = this.getDomain(plotArea, coordinate, work);
|
|
73373
|
+
var domainFrom = domain.from;
|
|
73374
|
+
var domainTo = domain.to;
|
|
73375
|
+
var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
|
|
73376
|
+
var domainVisibleFrom = domainVisible.from;
|
|
73377
|
+
var domainVisibleTo = domainVisible.to;
|
|
73334
73378
|
var plotAreaHeight = plotArea.height;
|
|
73335
|
-
return this.updateX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + offset, transform, plotAreaHeight);
|
|
73379
|
+
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + offset, transform, plotAreaHeight);
|
|
73336
73380
|
}
|
|
73337
73381
|
break;
|
|
73338
73382
|
case DChartAxisPosition.LEFT:
|
|
73339
73383
|
coordinate = plotArea.coordinate.y.get(parser.coordinate);
|
|
73340
73384
|
if (coordinate) {
|
|
73341
|
-
var
|
|
73342
|
-
var
|
|
73385
|
+
var range = this.getRange(plotArea, coordinate, work);
|
|
73386
|
+
var rangeFrom = range.from;
|
|
73387
|
+
var rangeTo = range.to;
|
|
73388
|
+
var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
|
|
73389
|
+
var rangeVisibleFrom = rangeVisible.from;
|
|
73390
|
+
var rangeVisibleTo = rangeVisible.to;
|
|
73343
73391
|
var plotAreaWidth = plotArea.width;
|
|
73344
|
-
return this.updateY(
|
|
73392
|
+
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaWidth);
|
|
73345
73393
|
}
|
|
73346
73394
|
break;
|
|
73347
73395
|
case DChartAxisPosition.RIGHT:
|
|
73348
73396
|
coordinate = plotArea.coordinate.y.get(parser.coordinate);
|
|
73349
73397
|
if (coordinate) {
|
|
73350
|
-
var
|
|
73351
|
-
var
|
|
73398
|
+
var range = this.getRange(plotArea, coordinate, work);
|
|
73399
|
+
var rangeFrom = range.from;
|
|
73400
|
+
var rangeTo = range.to;
|
|
73401
|
+
var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
|
|
73402
|
+
var rangeVisibleFrom = rangeVisible.from;
|
|
73403
|
+
var rangeVisibleTo = rangeVisible.to;
|
|
73352
73404
|
var plotAreaWidth = plotArea.width;
|
|
73353
|
-
return this.updateY(
|
|
73405
|
+
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaWidth + offset, transform, plotAreaWidth);
|
|
73354
73406
|
}
|
|
73355
73407
|
break;
|
|
73356
73408
|
}
|
|
73357
73409
|
}
|
|
73358
73410
|
return false;
|
|
73359
73411
|
};
|
|
73360
|
-
DChartAxisBaseTickContainer.prototype.
|
|
73412
|
+
DChartAxisBaseTickContainer.prototype.getDomain = function (plotArea, coordinate, result) {
|
|
73413
|
+
var bounds = plotArea.getBoundsInContainer();
|
|
73414
|
+
var transform = coordinate.transform;
|
|
73415
|
+
return result.set(coordinate.unmap(transform.unmap(bounds.x)), coordinate.unmap(transform.unmap(bounds.x + bounds.width)));
|
|
73416
|
+
};
|
|
73417
|
+
DChartAxisBaseTickContainer.prototype.getDomainVisible = function (plotArea, coordinate, result) {
|
|
73418
|
+
return result;
|
|
73419
|
+
};
|
|
73420
|
+
DChartAxisBaseTickContainer.prototype.getRange = function (plotArea, coordinate, result) {
|
|
73421
|
+
var bounds = plotArea.getBoundsInContainer();
|
|
73422
|
+
var transform = coordinate.transform;
|
|
73423
|
+
return result.set(coordinate.unmap(transform.unmap(bounds.y)), coordinate.unmap(transform.unmap(bounds.y + bounds.height)));
|
|
73424
|
+
};
|
|
73425
|
+
DChartAxisBaseTickContainer.prototype.getRangeVisible = function (plotArea, coordinate, result) {
|
|
73426
|
+
return result;
|
|
73427
|
+
};
|
|
73428
|
+
DChartAxisBaseTickContainer.prototype.updateX = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionY, transform, plotAreaHeight) {
|
|
73361
73429
|
var tick = this._parser.tick;
|
|
73362
73430
|
var majorTick = tick.major;
|
|
73363
73431
|
var majorCount = majorTick.count;
|
|
@@ -73371,7 +73439,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73371
73439
|
var minorFormatter = minorTick.formatter;
|
|
73372
73440
|
var majorTicks = this._majorTicks;
|
|
73373
73441
|
var minorTicks = this._minorTicks;
|
|
73374
|
-
this.newTicks(coordinate,
|
|
73442
|
+
this.newTicks(coordinate, domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
73375
73443
|
var a = transform.a;
|
|
73376
73444
|
var tx = transform.tx;
|
|
73377
73445
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -73410,7 +73478,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73410
73478
|
}
|
|
73411
73479
|
return true;
|
|
73412
73480
|
};
|
|
73413
|
-
DChartAxisBaseTickContainer.prototype.updateY = function (
|
|
73481
|
+
DChartAxisBaseTickContainer.prototype.updateY = function (rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaWidth) {
|
|
73414
73482
|
var tick = this._parser.tick;
|
|
73415
73483
|
var majorTick = tick.major;
|
|
73416
73484
|
var majorCount = majorTick.count;
|
|
@@ -73424,7 +73492,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73424
73492
|
var minorFormatter = minorTick.formatter;
|
|
73425
73493
|
var majorTicks = this._majorTicks;
|
|
73426
73494
|
var minorTicks = this._minorTicks;
|
|
73427
|
-
this.newTicks(coordinate,
|
|
73495
|
+
this.newTicks(coordinate, rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
73428
73496
|
var d = transform.d;
|
|
73429
73497
|
var ty = transform.ty;
|
|
73430
73498
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -73493,8 +73561,8 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
|
73493
73561
|
DChartAxisBaseTickContainer.prototype.hideMinor = function (shape) {
|
|
73494
73562
|
shape.visible = false;
|
|
73495
73563
|
};
|
|
73496
|
-
DChartAxisBaseTickContainer.prototype.newTicks = function (coordinate,
|
|
73497
|
-
coordinate.ticks(
|
|
73564
|
+
DChartAxisBaseTickContainer.prototype.newTicks = function (coordinate, domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
73565
|
+
coordinate.ticks(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult);
|
|
73498
73566
|
};
|
|
73499
73567
|
DChartAxisBaseTickContainer.prototype.destroy = function () {
|
|
73500
73568
|
this._major.destroy();
|
|
@@ -73925,41 +73993,6 @@ var DChartCoordinateTransformMarkImpl = /** @class */ (function () {
|
|
|
73925
73993
|
return DChartCoordinateTransformMarkImpl;
|
|
73926
73994
|
}());
|
|
73927
73995
|
|
|
73928
|
-
/*
|
|
73929
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
73930
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
73931
|
-
*/
|
|
73932
|
-
var DChartRegionImpl = /** @class */ (function () {
|
|
73933
|
-
function DChartRegionImpl(from, to) {
|
|
73934
|
-
this.from = from;
|
|
73935
|
-
this.to = to;
|
|
73936
|
-
}
|
|
73937
|
-
DChartRegionImpl.prototype.set = function (from, to) {
|
|
73938
|
-
if (from != null) {
|
|
73939
|
-
this.from = from;
|
|
73940
|
-
}
|
|
73941
|
-
if (to != null) {
|
|
73942
|
-
this.to = to;
|
|
73943
|
-
}
|
|
73944
|
-
return this;
|
|
73945
|
-
};
|
|
73946
|
-
DChartRegionImpl.prototype.add = function (from, to) {
|
|
73947
|
-
if (!isNaN$1(from)) {
|
|
73948
|
-
this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
73949
|
-
}
|
|
73950
|
-
if (!isNaN$1(to)) {
|
|
73951
|
-
this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
73952
|
-
}
|
|
73953
|
-
return this;
|
|
73954
|
-
};
|
|
73955
|
-
DChartRegionImpl.prototype.clear = function () {
|
|
73956
|
-
this.from = NaN;
|
|
73957
|
-
this.to = NaN;
|
|
73958
|
-
return this;
|
|
73959
|
-
};
|
|
73960
|
-
return DChartRegionImpl;
|
|
73961
|
-
}());
|
|
73962
|
-
|
|
73963
73996
|
/*
|
|
73964
73997
|
* Copyright (C) 2019 Toshiba Corporation
|
|
73965
73998
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -74031,18 +74064,27 @@ var DChartCoordinateBase = /** @class */ (function () {
|
|
|
74031
74064
|
var container = this._container;
|
|
74032
74065
|
if (container) {
|
|
74033
74066
|
var plotArea = container.container.plotArea;
|
|
74034
|
-
var padding = plotArea.padding;
|
|
74035
74067
|
var work = this._work;
|
|
74036
74068
|
switch (this._direction) {
|
|
74037
74069
|
case DChartCoordinateDirection.X:
|
|
74038
|
-
this.
|
|
74070
|
+
this.getPixelDomain(plotArea, work);
|
|
74071
|
+
this.doFit_(work.from, work.to, this.toFitDomain(from, to, plotArea, work), result);
|
|
74039
74072
|
break;
|
|
74040
74073
|
case DChartCoordinateDirection.Y:
|
|
74041
|
-
this.
|
|
74074
|
+
this.getPixelRange(plotArea, work);
|
|
74075
|
+
this.doFit_(work.from, work.to, this.toFitRange(from, to, plotArea, work), result);
|
|
74042
74076
|
break;
|
|
74043
74077
|
}
|
|
74044
74078
|
}
|
|
74045
74079
|
};
|
|
74080
|
+
DChartCoordinateBase.prototype.getPixelDomain = function (plotArea, result) {
|
|
74081
|
+
var padding = plotArea.padding;
|
|
74082
|
+
return result.set(padding.getLeft(), plotArea.width - padding.getRight());
|
|
74083
|
+
};
|
|
74084
|
+
DChartCoordinateBase.prototype.getPixelRange = function (plotArea, result) {
|
|
74085
|
+
var padding = plotArea.padding;
|
|
74086
|
+
return result.set(plotArea.height - padding.getBottom(), padding.getTop());
|
|
74087
|
+
};
|
|
74046
74088
|
DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
74047
74089
|
if (from == null) {
|
|
74048
74090
|
from = this._from;
|
|
@@ -74123,8 +74165,8 @@ var DChartCoordinateBase = /** @class */ (function () {
|
|
|
74123
74165
|
DChartCoordinateBase.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
74124
74166
|
// DO NOTHING
|
|
74125
74167
|
};
|
|
74126
|
-
DChartCoordinateBase.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
74127
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
74168
|
+
DChartCoordinateBase.prototype.ticks = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
74169
|
+
this._tick.calculate(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
74128
74170
|
};
|
|
74129
74171
|
DChartCoordinateBase.prototype.toTheme = function (options) {
|
|
74130
74172
|
var _a;
|
|
@@ -74361,65 +74403,63 @@ var DChartCoordinateLinearTick = /** @class */ (function () {
|
|
|
74361
74403
|
}
|
|
74362
74404
|
}
|
|
74363
74405
|
};
|
|
74364
|
-
DChartCoordinateLinearTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
74406
|
+
DChartCoordinateLinearTick.prototype.calculate = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
74365
74407
|
if (majorCount <= 0) {
|
|
74366
74408
|
return;
|
|
74367
74409
|
}
|
|
74368
74410
|
var transform = coordinate.transform;
|
|
74369
74411
|
var domainMin = Math.min(domainFrom, domainTo);
|
|
74370
74412
|
var domainMax = Math.max(domainFrom, domainTo);
|
|
74371
|
-
var
|
|
74413
|
+
var domainVisibleMin = Math.min(domainVisibleFrom, domainVisibleTo);
|
|
74414
|
+
var domainVisibleMax = Math.max(domainVisibleFrom, domainVisibleTo);
|
|
74415
|
+
var domainVisibleMinMapped = coordinate.map(domainVisibleMin);
|
|
74416
|
+
var domainVisibleMaxMapped = coordinate.map(domainVisibleMax);
|
|
74417
|
+
var from0 = Math.min(domainVisibleMinMapped, domainVisibleMaxMapped);
|
|
74418
|
+
var to0 = Math.max(domainVisibleMinMapped, domainVisibleMaxMapped);
|
|
74419
|
+
var domainMinMapped = coordinate.map(domainMin);
|
|
74420
|
+
var domainMaxMapped = coordinate.map(domainMax);
|
|
74421
|
+
var from1 = Math.min(domainMinMapped, domainMaxMapped);
|
|
74422
|
+
var to1 = Math.max(domainMinMapped, domainMaxMapped);
|
|
74423
|
+
var from = Math.max(from0, from1);
|
|
74424
|
+
var to = Math.min(to0, to1);
|
|
74425
|
+
var imajor = 0;
|
|
74426
|
+
var iminor = 0;
|
|
74427
|
+
var majorStepMapped = this.toMajorStep(domainMinMapped, domainMaxMapped, majorCount, majorStep);
|
|
74372
74428
|
if (majorStepMapped <= 0) {
|
|
74373
|
-
|
|
74374
|
-
|
|
74375
|
-
|
|
74376
|
-
|
|
74377
|
-
|
|
74378
|
-
majorResult[imajorResult + 0] = NaN;
|
|
74379
|
-
majorResult[imajorResult + 1] = NaN;
|
|
74380
|
-
majorResult[imajorResult + 2] = NaN;
|
|
74381
|
-
}
|
|
74382
|
-
for (var i = 0; i < minorCount; ++i) {
|
|
74383
|
-
var iminorResult = i * 3;
|
|
74384
|
-
minorResult[iminorResult + 0] = NaN;
|
|
74385
|
-
minorResult[iminorResult + 1] = NaN;
|
|
74386
|
-
minorResult[iminorResult + 2] = NaN;
|
|
74429
|
+
if (from <= domainMinMapped && domainMinMapped <= to) {
|
|
74430
|
+
majorResult[0] = domainMin;
|
|
74431
|
+
majorResult[1] = transform.map(domainMinMapped);
|
|
74432
|
+
majorResult[2] = 0;
|
|
74433
|
+
imajor += 1;
|
|
74387
74434
|
}
|
|
74388
|
-
return;
|
|
74389
74435
|
}
|
|
74390
|
-
|
|
74391
|
-
|
|
74392
|
-
|
|
74393
|
-
|
|
74394
|
-
|
|
74395
|
-
|
|
74396
|
-
|
|
74397
|
-
|
|
74398
|
-
|
|
74399
|
-
|
|
74400
|
-
|
|
74401
|
-
|
|
74402
|
-
|
|
74403
|
-
|
|
74404
|
-
|
|
74405
|
-
|
|
74406
|
-
|
|
74407
|
-
|
|
74408
|
-
|
|
74409
|
-
|
|
74410
|
-
|
|
74411
|
-
|
|
74412
|
-
|
|
74413
|
-
|
|
74414
|
-
|
|
74415
|
-
|
|
74416
|
-
|
|
74417
|
-
if (from <= minorPositionMapped && minorPositionMapped <= to) {
|
|
74418
|
-
var iminorResult = iminor * 3;
|
|
74419
|
-
minorResult[iminorResult + 0] = minorPosition;
|
|
74420
|
-
minorResult[iminorResult + 1] = minorPositionMapped;
|
|
74421
|
-
minorResult[iminorResult + 2] = minorStepMapped;
|
|
74422
|
-
iminor += 1;
|
|
74436
|
+
else {
|
|
74437
|
+
// Major tick start position
|
|
74438
|
+
var idomainStartMapped = Math.floor(domainMinMapped / majorStepMapped) - 1;
|
|
74439
|
+
var idomainEndMapped = Math.ceil(domainMaxMapped / majorStepMapped) + 1;
|
|
74440
|
+
// Major / minor tick positions
|
|
74441
|
+
var minorStepMapped = this.toMinorStep(majorStepMapped, minorCountPerMajor, minorStep);
|
|
74442
|
+
for (var i = idomainStartMapped; i <= idomainEndMapped; ++i) {
|
|
74443
|
+
var majorPositionMapped = i * majorStepMapped;
|
|
74444
|
+
if (imajor < majorCapacity) {
|
|
74445
|
+
if (from <= majorPositionMapped && majorPositionMapped <= to) {
|
|
74446
|
+
var imajorResult = imajor * 3;
|
|
74447
|
+
majorResult[imajorResult + 0] = coordinate.unmap(majorPositionMapped);
|
|
74448
|
+
majorResult[imajorResult + 1] = transform.map(majorPositionMapped);
|
|
74449
|
+
majorResult[imajorResult + 2] = majorStepMapped;
|
|
74450
|
+
imajor += 1;
|
|
74451
|
+
}
|
|
74452
|
+
}
|
|
74453
|
+
for (var j = 0; j < minorCountPerMajor; j += 1) {
|
|
74454
|
+
if (iminor < minorCount) {
|
|
74455
|
+
var minorPositionMapped = majorPositionMapped + (j + 1) * minorStepMapped;
|
|
74456
|
+
if (from <= minorPositionMapped && minorPositionMapped <= to) {
|
|
74457
|
+
var iminorResult = iminor * 3;
|
|
74458
|
+
minorResult[iminorResult + 0] = coordinate.unmap(minorPositionMapped);
|
|
74459
|
+
minorResult[iminorResult + 1] = transform.map(minorPositionMapped);
|
|
74460
|
+
minorResult[iminorResult + 2] = minorStepMapped;
|
|
74461
|
+
iminor += 1;
|
|
74462
|
+
}
|
|
74423
74463
|
}
|
|
74424
74464
|
}
|
|
74425
74465
|
}
|
|
@@ -74512,64 +74552,63 @@ var DChartCoordinateLogTick = /** @class */ (function () {
|
|
|
74512
74552
|
}
|
|
74513
74553
|
}
|
|
74514
74554
|
};
|
|
74515
|
-
DChartCoordinateLogTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
74555
|
+
DChartCoordinateLogTick.prototype.calculate = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
74516
74556
|
if (majorCount <= 0) {
|
|
74517
74557
|
return;
|
|
74518
74558
|
}
|
|
74519
74559
|
var transform = coordinate.transform;
|
|
74520
|
-
var
|
|
74521
|
-
var
|
|
74522
|
-
var
|
|
74523
|
-
var
|
|
74560
|
+
var domainMin = Math.min(domainFrom, domainTo);
|
|
74561
|
+
var domainMax = Math.max(domainFrom, domainTo);
|
|
74562
|
+
var domainVisibleMin = Math.min(domainVisibleFrom, domainVisibleTo);
|
|
74563
|
+
var domainVisibleMax = Math.max(domainVisibleFrom, domainVisibleTo);
|
|
74564
|
+
var domainVisibleMinMapped = coordinate.map(domainVisibleMin);
|
|
74565
|
+
var domainVisibleMaxMapped = coordinate.map(domainVisibleMax);
|
|
74566
|
+
var from0 = Math.min(domainVisibleMinMapped, domainVisibleMaxMapped);
|
|
74567
|
+
var to0 = Math.max(domainVisibleMinMapped, domainVisibleMaxMapped);
|
|
74568
|
+
var domainMinMapped = coordinate.map(domainMin);
|
|
74569
|
+
var domainMaxMapped = coordinate.map(domainMax);
|
|
74570
|
+
var from1 = Math.min(domainMinMapped, domainMaxMapped);
|
|
74571
|
+
var to1 = Math.max(domainMinMapped, domainMaxMapped);
|
|
74572
|
+
var from = Math.max(from0, from1);
|
|
74573
|
+
var to = Math.min(to0, to1);
|
|
74574
|
+
var imajor = 0;
|
|
74575
|
+
var iminor = 0;
|
|
74524
74576
|
var majorStepMapped = this.toMajorStep(domainMinMapped, domainMaxMapped, majorCount, majorStep);
|
|
74525
74577
|
if (majorStepMapped <= 0) {
|
|
74526
|
-
|
|
74527
|
-
|
|
74528
|
-
|
|
74529
|
-
|
|
74530
|
-
|
|
74531
|
-
var imajorResult = i * 3;
|
|
74532
|
-
majorResult[imajorResult + 0] = NaN;
|
|
74533
|
-
majorResult[imajorResult + 1] = NaN;
|
|
74534
|
-
majorResult[imajorResult + 2] = NaN;
|
|
74535
|
-
}
|
|
74536
|
-
for (var i = 0; i < minorCount; ++i) {
|
|
74537
|
-
var iminorResult = i * 3;
|
|
74538
|
-
minorResult[iminorResult + 0] = NaN;
|
|
74539
|
-
minorResult[iminorResult + 1] = NaN;
|
|
74540
|
-
minorResult[iminorResult + 2] = NaN;
|
|
74578
|
+
if (from <= domainMinMapped && domainMinMapped <= to) {
|
|
74579
|
+
majorResult[0] = domainMin;
|
|
74580
|
+
majorResult[1] = transform.map(domainMinMapped);
|
|
74581
|
+
majorResult[2] = 0;
|
|
74582
|
+
imajor += 1;
|
|
74541
74583
|
}
|
|
74542
|
-
return;
|
|
74543
74584
|
}
|
|
74544
|
-
|
|
74545
|
-
|
|
74546
|
-
|
|
74547
|
-
|
|
74548
|
-
|
|
74549
|
-
|
|
74550
|
-
|
|
74551
|
-
|
|
74552
|
-
|
|
74553
|
-
|
|
74554
|
-
|
|
74555
|
-
|
|
74556
|
-
|
|
74557
|
-
|
|
74558
|
-
|
|
74559
|
-
|
|
74560
|
-
|
|
74561
|
-
|
|
74562
|
-
|
|
74563
|
-
|
|
74564
|
-
|
|
74565
|
-
|
|
74566
|
-
|
|
74567
|
-
|
|
74568
|
-
|
|
74569
|
-
|
|
74570
|
-
|
|
74571
|
-
minorResult[iminorResult + 2] = coordinate.unmap(minorPositionMapped - 1);
|
|
74572
|
-
iminor += 1;
|
|
74585
|
+
else {
|
|
74586
|
+
// Major tick start position
|
|
74587
|
+
var idomainStartMapped = Math.floor(domainMinMapped / majorStepMapped) - 1;
|
|
74588
|
+
var idomainEndMapped = Math.ceil(domainMaxMapped / majorStepMapped) + 1;
|
|
74589
|
+
// Major / minor tick positions
|
|
74590
|
+
var minorStepMapped = this.toMinorStep(majorStepMapped, minorCountPerMajor, minorStep);
|
|
74591
|
+
for (var i = idomainStartMapped; i <= idomainEndMapped; ++i) {
|
|
74592
|
+
var majorPositionMapped = i * majorStepMapped;
|
|
74593
|
+
if (imajor < majorCapacity) {
|
|
74594
|
+
if (from <= majorPositionMapped && majorPositionMapped <= to) {
|
|
74595
|
+
var imajorResult = imajor * 3;
|
|
74596
|
+
majorResult[imajorResult + 0] = coordinate.unmap(majorPositionMapped);
|
|
74597
|
+
majorResult[imajorResult + 1] = transform.map(majorPositionMapped);
|
|
74598
|
+
majorResult[imajorResult + 2] = coordinate.unmap(majorPositionMapped - 1);
|
|
74599
|
+
imajor += 1;
|
|
74600
|
+
}
|
|
74601
|
+
}
|
|
74602
|
+
for (var j = 0; j < minorCountPerMajor; j += 1) {
|
|
74603
|
+
if (iminor < minorCount) {
|
|
74604
|
+
var minorPositionMapped = majorPositionMapped + (j + 1) * minorStepMapped;
|
|
74605
|
+
if (from <= minorPositionMapped && minorPositionMapped <= to) {
|
|
74606
|
+
var iminorResult = iminor * 3;
|
|
74607
|
+
minorResult[iminorResult + 0] = coordinate.unmap(minorPositionMapped);
|
|
74608
|
+
minorResult[iminorResult + 1] = transform.map(minorPositionMapped);
|
|
74609
|
+
minorResult[iminorResult + 2] = coordinate.unmap(minorPositionMapped - 1);
|
|
74610
|
+
iminor += 1;
|
|
74611
|
+
}
|
|
74573
74612
|
}
|
|
74574
74613
|
}
|
|
74575
74614
|
}
|