@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.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
|
|
|
@@ -54947,6 +54947,41 @@
|
|
|
54947
54947
|
return DChartAxisBaseTickMinor;
|
|
54948
54948
|
}());
|
|
54949
54949
|
|
|
54950
|
+
/*
|
|
54951
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
54952
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
54953
|
+
*/
|
|
54954
|
+
var DChartRegionImpl = /** @class */ (function () {
|
|
54955
|
+
function DChartRegionImpl(from, to) {
|
|
54956
|
+
this.from = from;
|
|
54957
|
+
this.to = to;
|
|
54958
|
+
}
|
|
54959
|
+
DChartRegionImpl.prototype.set = function (from, to) {
|
|
54960
|
+
if (from != null) {
|
|
54961
|
+
this.from = from;
|
|
54962
|
+
}
|
|
54963
|
+
if (to != null) {
|
|
54964
|
+
this.to = to;
|
|
54965
|
+
}
|
|
54966
|
+
return this;
|
|
54967
|
+
};
|
|
54968
|
+
DChartRegionImpl.prototype.add = function (from, to) {
|
|
54969
|
+
if (!isNaN$1(from)) {
|
|
54970
|
+
this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
54971
|
+
}
|
|
54972
|
+
if (!isNaN$1(to)) {
|
|
54973
|
+
this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
54974
|
+
}
|
|
54975
|
+
return this;
|
|
54976
|
+
};
|
|
54977
|
+
DChartRegionImpl.prototype.clear = function () {
|
|
54978
|
+
this.from = NaN;
|
|
54979
|
+
this.to = NaN;
|
|
54980
|
+
return this;
|
|
54981
|
+
};
|
|
54982
|
+
return DChartRegionImpl;
|
|
54983
|
+
}());
|
|
54984
|
+
|
|
54950
54985
|
var DChartAxisBaseTickContainer = /** @class */ (function () {
|
|
54951
54986
|
function DChartAxisBaseTickContainer(parser, options) {
|
|
54952
54987
|
this._parser = parser;
|
|
@@ -54955,6 +54990,7 @@
|
|
|
54955
54990
|
this._minor = this.newMinor(parser, options);
|
|
54956
54991
|
this._majorTicks = [];
|
|
54957
54992
|
this._minorTicks = [];
|
|
54993
|
+
this._work = new DChartRegionImpl(0, 0);
|
|
54958
54994
|
}
|
|
54959
54995
|
Object.defineProperty(DChartAxisBaseTickContainer.prototype, "major", {
|
|
54960
54996
|
get: function () {
|
|
@@ -54994,54 +55030,86 @@
|
|
|
54994
55030
|
var minorShapes = this._minor.shapes;
|
|
54995
55031
|
if (container != null && majorShapes && minorShapes) {
|
|
54996
55032
|
var plotArea = container.plotArea;
|
|
54997
|
-
var bounds = plotArea.getBoundsInContainer();
|
|
54998
55033
|
var transform = plotArea.container.transform.localTransform;
|
|
54999
55034
|
var gridlineShapes = this._major.gridline.shapes;
|
|
55000
55035
|
var parser = this._parser;
|
|
55001
55036
|
var offset = parser.padding * this._index;
|
|
55037
|
+
var work = this._work;
|
|
55002
55038
|
var coordinate = void 0;
|
|
55003
55039
|
switch (parser.position) {
|
|
55004
55040
|
case DChartAxisPosition.TOP:
|
|
55005
55041
|
coordinate = plotArea.coordinate.x.get(parser.coordinate);
|
|
55006
55042
|
if (coordinate) {
|
|
55007
|
-
var
|
|
55008
|
-
var
|
|
55043
|
+
var domain = this.getDomain(plotArea, coordinate, work);
|
|
55044
|
+
var domainFrom = domain.from;
|
|
55045
|
+
var domainTo = domain.to;
|
|
55046
|
+
var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
|
|
55047
|
+
var domainVisibleFrom = domainVisible.from;
|
|
55048
|
+
var domainVisibleTo = domainVisible.to;
|
|
55009
55049
|
var plotAreaHeight = plotArea.height;
|
|
55010
|
-
return this.updateX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaHeight);
|
|
55050
|
+
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaHeight);
|
|
55011
55051
|
}
|
|
55012
55052
|
break;
|
|
55013
55053
|
case DChartAxisPosition.BOTTOM:
|
|
55014
55054
|
coordinate = plotArea.coordinate.x.get(parser.coordinate);
|
|
55015
55055
|
if (coordinate) {
|
|
55016
|
-
var
|
|
55017
|
-
var
|
|
55056
|
+
var domain = this.getDomain(plotArea, coordinate, work);
|
|
55057
|
+
var domainFrom = domain.from;
|
|
55058
|
+
var domainTo = domain.to;
|
|
55059
|
+
var domainVisible = this.getDomainVisible(plotArea, coordinate, work);
|
|
55060
|
+
var domainVisibleFrom = domainVisible.from;
|
|
55061
|
+
var domainVisibleTo = domainVisible.to;
|
|
55018
55062
|
var plotAreaHeight = plotArea.height;
|
|
55019
|
-
return this.updateX(domainFrom, domainTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + offset, transform, plotAreaHeight);
|
|
55063
|
+
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + offset, transform, plotAreaHeight);
|
|
55020
55064
|
}
|
|
55021
55065
|
break;
|
|
55022
55066
|
case DChartAxisPosition.LEFT:
|
|
55023
55067
|
coordinate = plotArea.coordinate.y.get(parser.coordinate);
|
|
55024
55068
|
if (coordinate) {
|
|
55025
|
-
var
|
|
55026
|
-
var
|
|
55069
|
+
var range = this.getRange(plotArea, coordinate, work);
|
|
55070
|
+
var rangeFrom = range.from;
|
|
55071
|
+
var rangeTo = range.to;
|
|
55072
|
+
var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
|
|
55073
|
+
var rangeVisibleFrom = rangeVisible.from;
|
|
55074
|
+
var rangeVisibleTo = rangeVisible.to;
|
|
55027
55075
|
var plotAreaWidth = plotArea.width;
|
|
55028
|
-
return this.updateY(
|
|
55076
|
+
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaWidth);
|
|
55029
55077
|
}
|
|
55030
55078
|
break;
|
|
55031
55079
|
case DChartAxisPosition.RIGHT:
|
|
55032
55080
|
coordinate = plotArea.coordinate.y.get(parser.coordinate);
|
|
55033
55081
|
if (coordinate) {
|
|
55034
|
-
var
|
|
55035
|
-
var
|
|
55082
|
+
var range = this.getRange(plotArea, coordinate, work);
|
|
55083
|
+
var rangeFrom = range.from;
|
|
55084
|
+
var rangeTo = range.to;
|
|
55085
|
+
var rangeVisible = this.getRangeVisible(plotArea, coordinate, work);
|
|
55086
|
+
var rangeVisibleFrom = rangeVisible.from;
|
|
55087
|
+
var rangeVisibleTo = rangeVisible.to;
|
|
55036
55088
|
var plotAreaWidth = plotArea.width;
|
|
55037
|
-
return this.updateY(
|
|
55089
|
+
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaWidth + offset, transform, plotAreaWidth);
|
|
55038
55090
|
}
|
|
55039
55091
|
break;
|
|
55040
55092
|
}
|
|
55041
55093
|
}
|
|
55042
55094
|
return false;
|
|
55043
55095
|
};
|
|
55044
|
-
DChartAxisBaseTickContainer.prototype.
|
|
55096
|
+
DChartAxisBaseTickContainer.prototype.getDomain = function (plotArea, coordinate, result) {
|
|
55097
|
+
var bounds = plotArea.getBoundsInContainer();
|
|
55098
|
+
var transform = coordinate.transform;
|
|
55099
|
+
return result.set(coordinate.unmap(transform.unmap(bounds.x)), coordinate.unmap(transform.unmap(bounds.x + bounds.width)));
|
|
55100
|
+
};
|
|
55101
|
+
DChartAxisBaseTickContainer.prototype.getDomainVisible = function (plotArea, coordinate, result) {
|
|
55102
|
+
return result;
|
|
55103
|
+
};
|
|
55104
|
+
DChartAxisBaseTickContainer.prototype.getRange = function (plotArea, coordinate, result) {
|
|
55105
|
+
var bounds = plotArea.getBoundsInContainer();
|
|
55106
|
+
var transform = coordinate.transform;
|
|
55107
|
+
return result.set(coordinate.unmap(transform.unmap(bounds.y)), coordinate.unmap(transform.unmap(bounds.y + bounds.height)));
|
|
55108
|
+
};
|
|
55109
|
+
DChartAxisBaseTickContainer.prototype.getRangeVisible = function (plotArea, coordinate, result) {
|
|
55110
|
+
return result;
|
|
55111
|
+
};
|
|
55112
|
+
DChartAxisBaseTickContainer.prototype.updateX = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionY, transform, plotAreaHeight) {
|
|
55045
55113
|
var tick = this._parser.tick;
|
|
55046
55114
|
var majorTick = tick.major;
|
|
55047
55115
|
var majorCount = majorTick.count;
|
|
@@ -55055,7 +55123,7 @@
|
|
|
55055
55123
|
var minorFormatter = minorTick.formatter;
|
|
55056
55124
|
var majorTicks = this._majorTicks;
|
|
55057
55125
|
var minorTicks = this._minorTicks;
|
|
55058
|
-
this.newTicks(coordinate,
|
|
55126
|
+
this.newTicks(coordinate, domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
55059
55127
|
var a = transform.a;
|
|
55060
55128
|
var tx = transform.tx;
|
|
55061
55129
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -55094,7 +55162,7 @@
|
|
|
55094
55162
|
}
|
|
55095
55163
|
return true;
|
|
55096
55164
|
};
|
|
55097
|
-
DChartAxisBaseTickContainer.prototype.updateY = function (
|
|
55165
|
+
DChartAxisBaseTickContainer.prototype.updateY = function (rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaWidth) {
|
|
55098
55166
|
var tick = this._parser.tick;
|
|
55099
55167
|
var majorTick = tick.major;
|
|
55100
55168
|
var majorCount = majorTick.count;
|
|
@@ -55108,7 +55176,7 @@
|
|
|
55108
55176
|
var minorFormatter = minorTick.formatter;
|
|
55109
55177
|
var majorTicks = this._majorTicks;
|
|
55110
55178
|
var minorTicks = this._minorTicks;
|
|
55111
|
-
this.newTicks(coordinate,
|
|
55179
|
+
this.newTicks(coordinate, rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
55112
55180
|
var d = transform.d;
|
|
55113
55181
|
var ty = transform.ty;
|
|
55114
55182
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -55177,8 +55245,8 @@
|
|
|
55177
55245
|
DChartAxisBaseTickContainer.prototype.hideMinor = function (shape) {
|
|
55178
55246
|
shape.visible = false;
|
|
55179
55247
|
};
|
|
55180
|
-
DChartAxisBaseTickContainer.prototype.newTicks = function (coordinate,
|
|
55181
|
-
coordinate.ticks(
|
|
55248
|
+
DChartAxisBaseTickContainer.prototype.newTicks = function (coordinate, domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
55249
|
+
coordinate.ticks(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult);
|
|
55182
55250
|
};
|
|
55183
55251
|
DChartAxisBaseTickContainer.prototype.destroy = function () {
|
|
55184
55252
|
this._major.destroy();
|
|
@@ -55609,41 +55677,6 @@
|
|
|
55609
55677
|
return DChartCoordinateTransformMarkImpl;
|
|
55610
55678
|
}());
|
|
55611
55679
|
|
|
55612
|
-
/*
|
|
55613
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
55614
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
55615
|
-
*/
|
|
55616
|
-
var DChartRegionImpl = /** @class */ (function () {
|
|
55617
|
-
function DChartRegionImpl(from, to) {
|
|
55618
|
-
this.from = from;
|
|
55619
|
-
this.to = to;
|
|
55620
|
-
}
|
|
55621
|
-
DChartRegionImpl.prototype.set = function (from, to) {
|
|
55622
|
-
if (from != null) {
|
|
55623
|
-
this.from = from;
|
|
55624
|
-
}
|
|
55625
|
-
if (to != null) {
|
|
55626
|
-
this.to = to;
|
|
55627
|
-
}
|
|
55628
|
-
return this;
|
|
55629
|
-
};
|
|
55630
|
-
DChartRegionImpl.prototype.add = function (from, to) {
|
|
55631
|
-
if (!isNaN$1(from)) {
|
|
55632
|
-
this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
|
|
55633
|
-
}
|
|
55634
|
-
if (!isNaN$1(to)) {
|
|
55635
|
-
this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
|
|
55636
|
-
}
|
|
55637
|
-
return this;
|
|
55638
|
-
};
|
|
55639
|
-
DChartRegionImpl.prototype.clear = function () {
|
|
55640
|
-
this.from = NaN;
|
|
55641
|
-
this.to = NaN;
|
|
55642
|
-
return this;
|
|
55643
|
-
};
|
|
55644
|
-
return DChartRegionImpl;
|
|
55645
|
-
}());
|
|
55646
|
-
|
|
55647
55680
|
/*
|
|
55648
55681
|
* Copyright (C) 2019 Toshiba Corporation
|
|
55649
55682
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -55715,18 +55748,27 @@
|
|
|
55715
55748
|
var container = this._container;
|
|
55716
55749
|
if (container) {
|
|
55717
55750
|
var plotArea = container.container.plotArea;
|
|
55718
|
-
var padding = plotArea.padding;
|
|
55719
55751
|
var work = this._work;
|
|
55720
55752
|
switch (this._direction) {
|
|
55721
55753
|
case DChartCoordinateDirection.X:
|
|
55722
|
-
this.
|
|
55754
|
+
this.getPixelDomain(plotArea, work);
|
|
55755
|
+
this.doFit_(work.from, work.to, this.toFitDomain(from, to, plotArea, work), result);
|
|
55723
55756
|
break;
|
|
55724
55757
|
case DChartCoordinateDirection.Y:
|
|
55725
|
-
this.
|
|
55758
|
+
this.getPixelRange(plotArea, work);
|
|
55759
|
+
this.doFit_(work.from, work.to, this.toFitRange(from, to, plotArea, work), result);
|
|
55726
55760
|
break;
|
|
55727
55761
|
}
|
|
55728
55762
|
}
|
|
55729
55763
|
};
|
|
55764
|
+
DChartCoordinateBase.prototype.getPixelDomain = function (plotArea, result) {
|
|
55765
|
+
var padding = plotArea.padding;
|
|
55766
|
+
return result.set(padding.getLeft(), plotArea.width - padding.getRight());
|
|
55767
|
+
};
|
|
55768
|
+
DChartCoordinateBase.prototype.getPixelRange = function (plotArea, result) {
|
|
55769
|
+
var padding = plotArea.padding;
|
|
55770
|
+
return result.set(plotArea.height - padding.getBottom(), padding.getTop());
|
|
55771
|
+
};
|
|
55730
55772
|
DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
55731
55773
|
if (from == null) {
|
|
55732
55774
|
from = this._from;
|
|
@@ -55807,8 +55849,8 @@
|
|
|
55807
55849
|
DChartCoordinateBase.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
55808
55850
|
// DO NOTHING
|
|
55809
55851
|
};
|
|
55810
|
-
DChartCoordinateBase.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
55811
|
-
this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
55852
|
+
DChartCoordinateBase.prototype.ticks = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
55853
|
+
this._tick.calculate(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
|
|
55812
55854
|
};
|
|
55813
55855
|
DChartCoordinateBase.prototype.toTheme = function (options) {
|
|
55814
55856
|
var _a;
|
|
@@ -56045,65 +56087,63 @@
|
|
|
56045
56087
|
}
|
|
56046
56088
|
}
|
|
56047
56089
|
};
|
|
56048
|
-
DChartCoordinateLinearTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
56090
|
+
DChartCoordinateLinearTick.prototype.calculate = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
56049
56091
|
if (majorCount <= 0) {
|
|
56050
56092
|
return;
|
|
56051
56093
|
}
|
|
56052
56094
|
var transform = coordinate.transform;
|
|
56053
56095
|
var domainMin = Math.min(domainFrom, domainTo);
|
|
56054
56096
|
var domainMax = Math.max(domainFrom, domainTo);
|
|
56055
|
-
var
|
|
56097
|
+
var domainVisibleMin = Math.min(domainVisibleFrom, domainVisibleTo);
|
|
56098
|
+
var domainVisibleMax = Math.max(domainVisibleFrom, domainVisibleTo);
|
|
56099
|
+
var domainVisibleMinMapped = coordinate.map(domainVisibleMin);
|
|
56100
|
+
var domainVisibleMaxMapped = coordinate.map(domainVisibleMax);
|
|
56101
|
+
var from0 = Math.min(domainVisibleMinMapped, domainVisibleMaxMapped);
|
|
56102
|
+
var to0 = Math.max(domainVisibleMinMapped, domainVisibleMaxMapped);
|
|
56103
|
+
var domainMinMapped = coordinate.map(domainMin);
|
|
56104
|
+
var domainMaxMapped = coordinate.map(domainMax);
|
|
56105
|
+
var from1 = Math.min(domainMinMapped, domainMaxMapped);
|
|
56106
|
+
var to1 = Math.max(domainMinMapped, domainMaxMapped);
|
|
56107
|
+
var from = Math.max(from0, from1);
|
|
56108
|
+
var to = Math.min(to0, to1);
|
|
56109
|
+
var imajor = 0;
|
|
56110
|
+
var iminor = 0;
|
|
56111
|
+
var majorStepMapped = this.toMajorStep(domainMinMapped, domainMaxMapped, majorCount, majorStep);
|
|
56056
56112
|
if (majorStepMapped <= 0) {
|
|
56057
|
-
|
|
56058
|
-
|
|
56059
|
-
|
|
56060
|
-
|
|
56061
|
-
|
|
56062
|
-
majorResult[imajorResult + 0] = NaN;
|
|
56063
|
-
majorResult[imajorResult + 1] = NaN;
|
|
56064
|
-
majorResult[imajorResult + 2] = NaN;
|
|
56065
|
-
}
|
|
56066
|
-
for (var i = 0; i < minorCount; ++i) {
|
|
56067
|
-
var iminorResult = i * 3;
|
|
56068
|
-
minorResult[iminorResult + 0] = NaN;
|
|
56069
|
-
minorResult[iminorResult + 1] = NaN;
|
|
56070
|
-
minorResult[iminorResult + 2] = NaN;
|
|
56113
|
+
if (from <= domainMinMapped && domainMinMapped <= to) {
|
|
56114
|
+
majorResult[0] = domainMin;
|
|
56115
|
+
majorResult[1] = transform.map(domainMinMapped);
|
|
56116
|
+
majorResult[2] = 0;
|
|
56117
|
+
imajor += 1;
|
|
56071
56118
|
}
|
|
56072
|
-
return;
|
|
56073
56119
|
}
|
|
56074
|
-
|
|
56075
|
-
|
|
56076
|
-
|
|
56077
|
-
|
|
56078
|
-
|
|
56079
|
-
|
|
56080
|
-
|
|
56081
|
-
|
|
56082
|
-
|
|
56083
|
-
|
|
56084
|
-
|
|
56085
|
-
|
|
56086
|
-
|
|
56087
|
-
|
|
56088
|
-
|
|
56089
|
-
|
|
56090
|
-
|
|
56091
|
-
|
|
56092
|
-
|
|
56093
|
-
|
|
56094
|
-
|
|
56095
|
-
|
|
56096
|
-
|
|
56097
|
-
|
|
56098
|
-
|
|
56099
|
-
|
|
56100
|
-
|
|
56101
|
-
if (from <= minorPositionMapped && minorPositionMapped <= to) {
|
|
56102
|
-
var iminorResult = iminor * 3;
|
|
56103
|
-
minorResult[iminorResult + 0] = minorPosition;
|
|
56104
|
-
minorResult[iminorResult + 1] = minorPositionMapped;
|
|
56105
|
-
minorResult[iminorResult + 2] = minorStepMapped;
|
|
56106
|
-
iminor += 1;
|
|
56120
|
+
else {
|
|
56121
|
+
// Major tick start position
|
|
56122
|
+
var idomainStartMapped = Math.floor(domainMinMapped / majorStepMapped) - 1;
|
|
56123
|
+
var idomainEndMapped = Math.ceil(domainMaxMapped / majorStepMapped) + 1;
|
|
56124
|
+
// Major / minor tick positions
|
|
56125
|
+
var minorStepMapped = this.toMinorStep(majorStepMapped, minorCountPerMajor, minorStep);
|
|
56126
|
+
for (var i = idomainStartMapped; i <= idomainEndMapped; ++i) {
|
|
56127
|
+
var majorPositionMapped = i * majorStepMapped;
|
|
56128
|
+
if (imajor < majorCapacity) {
|
|
56129
|
+
if (from <= majorPositionMapped && majorPositionMapped <= to) {
|
|
56130
|
+
var imajorResult = imajor * 3;
|
|
56131
|
+
majorResult[imajorResult + 0] = coordinate.unmap(majorPositionMapped);
|
|
56132
|
+
majorResult[imajorResult + 1] = transform.map(majorPositionMapped);
|
|
56133
|
+
majorResult[imajorResult + 2] = majorStepMapped;
|
|
56134
|
+
imajor += 1;
|
|
56135
|
+
}
|
|
56136
|
+
}
|
|
56137
|
+
for (var j = 0; j < minorCountPerMajor; j += 1) {
|
|
56138
|
+
if (iminor < minorCount) {
|
|
56139
|
+
var minorPositionMapped = majorPositionMapped + (j + 1) * minorStepMapped;
|
|
56140
|
+
if (from <= minorPositionMapped && minorPositionMapped <= to) {
|
|
56141
|
+
var iminorResult = iminor * 3;
|
|
56142
|
+
minorResult[iminorResult + 0] = coordinate.unmap(minorPositionMapped);
|
|
56143
|
+
minorResult[iminorResult + 1] = transform.map(minorPositionMapped);
|
|
56144
|
+
minorResult[iminorResult + 2] = minorStepMapped;
|
|
56145
|
+
iminor += 1;
|
|
56146
|
+
}
|
|
56107
56147
|
}
|
|
56108
56148
|
}
|
|
56109
56149
|
}
|
|
@@ -56196,64 +56236,63 @@
|
|
|
56196
56236
|
}
|
|
56197
56237
|
}
|
|
56198
56238
|
};
|
|
56199
|
-
DChartCoordinateLogTick.prototype.calculate = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
56239
|
+
DChartCoordinateLogTick.prototype.calculate = function (domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, coordinate) {
|
|
56200
56240
|
if (majorCount <= 0) {
|
|
56201
56241
|
return;
|
|
56202
56242
|
}
|
|
56203
56243
|
var transform = coordinate.transform;
|
|
56204
|
-
var
|
|
56205
|
-
var
|
|
56206
|
-
var
|
|
56207
|
-
var
|
|
56244
|
+
var domainMin = Math.min(domainFrom, domainTo);
|
|
56245
|
+
var domainMax = Math.max(domainFrom, domainTo);
|
|
56246
|
+
var domainVisibleMin = Math.min(domainVisibleFrom, domainVisibleTo);
|
|
56247
|
+
var domainVisibleMax = Math.max(domainVisibleFrom, domainVisibleTo);
|
|
56248
|
+
var domainVisibleMinMapped = coordinate.map(domainVisibleMin);
|
|
56249
|
+
var domainVisibleMaxMapped = coordinate.map(domainVisibleMax);
|
|
56250
|
+
var from0 = Math.min(domainVisibleMinMapped, domainVisibleMaxMapped);
|
|
56251
|
+
var to0 = Math.max(domainVisibleMinMapped, domainVisibleMaxMapped);
|
|
56252
|
+
var domainMinMapped = coordinate.map(domainMin);
|
|
56253
|
+
var domainMaxMapped = coordinate.map(domainMax);
|
|
56254
|
+
var from1 = Math.min(domainMinMapped, domainMaxMapped);
|
|
56255
|
+
var to1 = Math.max(domainMinMapped, domainMaxMapped);
|
|
56256
|
+
var from = Math.max(from0, from1);
|
|
56257
|
+
var to = Math.min(to0, to1);
|
|
56258
|
+
var imajor = 0;
|
|
56259
|
+
var iminor = 0;
|
|
56208
56260
|
var majorStepMapped = this.toMajorStep(domainMinMapped, domainMaxMapped, majorCount, majorStep);
|
|
56209
56261
|
if (majorStepMapped <= 0) {
|
|
56210
|
-
|
|
56211
|
-
|
|
56212
|
-
|
|
56213
|
-
|
|
56214
|
-
|
|
56215
|
-
var imajorResult = i * 3;
|
|
56216
|
-
majorResult[imajorResult + 0] = NaN;
|
|
56217
|
-
majorResult[imajorResult + 1] = NaN;
|
|
56218
|
-
majorResult[imajorResult + 2] = NaN;
|
|
56219
|
-
}
|
|
56220
|
-
for (var i = 0; i < minorCount; ++i) {
|
|
56221
|
-
var iminorResult = i * 3;
|
|
56222
|
-
minorResult[iminorResult + 0] = NaN;
|
|
56223
|
-
minorResult[iminorResult + 1] = NaN;
|
|
56224
|
-
minorResult[iminorResult + 2] = NaN;
|
|
56262
|
+
if (from <= domainMinMapped && domainMinMapped <= to) {
|
|
56263
|
+
majorResult[0] = domainMin;
|
|
56264
|
+
majorResult[1] = transform.map(domainMinMapped);
|
|
56265
|
+
majorResult[2] = 0;
|
|
56266
|
+
imajor += 1;
|
|
56225
56267
|
}
|
|
56226
|
-
return;
|
|
56227
56268
|
}
|
|
56228
|
-
|
|
56229
|
-
|
|
56230
|
-
|
|
56231
|
-
|
|
56232
|
-
|
|
56233
|
-
|
|
56234
|
-
|
|
56235
|
-
|
|
56236
|
-
|
|
56237
|
-
|
|
56238
|
-
|
|
56239
|
-
|
|
56240
|
-
|
|
56241
|
-
|
|
56242
|
-
|
|
56243
|
-
|
|
56244
|
-
|
|
56245
|
-
|
|
56246
|
-
|
|
56247
|
-
|
|
56248
|
-
|
|
56249
|
-
|
|
56250
|
-
|
|
56251
|
-
|
|
56252
|
-
|
|
56253
|
-
|
|
56254
|
-
|
|
56255
|
-
minorResult[iminorResult + 2] = coordinate.unmap(minorPositionMapped - 1);
|
|
56256
|
-
iminor += 1;
|
|
56269
|
+
else {
|
|
56270
|
+
// Major tick start position
|
|
56271
|
+
var idomainStartMapped = Math.floor(domainMinMapped / majorStepMapped) - 1;
|
|
56272
|
+
var idomainEndMapped = Math.ceil(domainMaxMapped / majorStepMapped) + 1;
|
|
56273
|
+
// Major / minor tick positions
|
|
56274
|
+
var minorStepMapped = this.toMinorStep(majorStepMapped, minorCountPerMajor, minorStep);
|
|
56275
|
+
for (var i = idomainStartMapped; i <= idomainEndMapped; ++i) {
|
|
56276
|
+
var majorPositionMapped = i * majorStepMapped;
|
|
56277
|
+
if (imajor < majorCapacity) {
|
|
56278
|
+
if (from <= majorPositionMapped && majorPositionMapped <= to) {
|
|
56279
|
+
var imajorResult = imajor * 3;
|
|
56280
|
+
majorResult[imajorResult + 0] = coordinate.unmap(majorPositionMapped);
|
|
56281
|
+
majorResult[imajorResult + 1] = transform.map(majorPositionMapped);
|
|
56282
|
+
majorResult[imajorResult + 2] = coordinate.unmap(majorPositionMapped - 1);
|
|
56283
|
+
imajor += 1;
|
|
56284
|
+
}
|
|
56285
|
+
}
|
|
56286
|
+
for (var j = 0; j < minorCountPerMajor; j += 1) {
|
|
56287
|
+
if (iminor < minorCount) {
|
|
56288
|
+
var minorPositionMapped = majorPositionMapped + (j + 1) * minorStepMapped;
|
|
56289
|
+
if (from <= minorPositionMapped && minorPositionMapped <= to) {
|
|
56290
|
+
var iminorResult = iminor * 3;
|
|
56291
|
+
minorResult[iminorResult + 0] = coordinate.unmap(minorPositionMapped);
|
|
56292
|
+
minorResult[iminorResult + 1] = transform.map(minorPositionMapped);
|
|
56293
|
+
minorResult[iminorResult + 2] = coordinate.unmap(minorPositionMapped - 1);
|
|
56294
|
+
iminor += 1;
|
|
56295
|
+
}
|
|
56257
56296
|
}
|
|
56258
56297
|
}
|
|
56259
56298
|
}
|