@wcardinal/wcardinal-ui 0.296.0 → 0.298.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 +5 -3
- package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +1 -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/types/wcardinal/ui/d-chart-selection-container-impl.d.ts +18 -0
- package/dist/types/wcardinal/ui/{d-chart-selection-gridline-container.d.ts → d-chart-selection-container.d.ts} +4 -4
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-x.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-y.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-selection-marker.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-selection-shape-base.d.ts +5 -3
- package/dist/types/wcardinal/ui/d-chart-selection-shape.d.ts +4 -3
- package/dist/types/wcardinal/ui/d-chart-selection-simple.d.ts +2 -0
- package/dist/types/wcardinal/ui/d-chart-selection-sub-impl.d.ts +3 -5
- package/dist/types/wcardinal/ui/d-chart-selection-sub.d.ts +3 -2
- package/dist/types/wcardinal/ui/index.d.ts +2 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-x.d.ts +6 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-y.d.ts +3 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-marker.d.ts +2 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-shape.d.ts +7 -0
- package/dist/types/wcardinal/ui/theme/dark/index.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-x.d.ts +6 -2
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-y.d.ts +3 -2
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-selection-marker.d.ts +2 -2
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-selection-shape.d.ts +7 -0
- package/dist/types/wcardinal/ui/theme/white/index.d.ts +4 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +41 -14
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-base.js +2 -2
- 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/d-chart-selection-container-impl.js +48 -0
- package/dist/wcardinal/ui/d-chart-selection-container-impl.js.map +1 -0
- package/dist/wcardinal/ui/{d-chart-selection-gridline-container.js → d-chart-selection-container.js} +1 -1
- package/dist/wcardinal/ui/d-chart-selection-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +5 -4
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +5 -4
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-marker.js +3 -3
- package/dist/wcardinal/ui/d-chart-selection-marker.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape-base.js +28 -10
- package/dist/wcardinal/ui/d-chart-selection-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-simple.js +22 -6
- package/dist/wcardinal/ui/d-chart-selection-simple.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js +11 -15
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub.js.map +1 -1
- package/dist/wcardinal/ui/index.js +2 -2
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-x-datetime.js +5 -5
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-x-datetime.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-transform.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-transform.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-x.js +14 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-x.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-y.js +7 -3
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-y.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-marker.js +8 -9
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-marker.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-shape.js +11 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-shape.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/index.js +4 -0
- package/dist/wcardinal/ui/theme/dark/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-x-datetime.js +5 -5
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-x-datetime.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-transform.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-transform.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-x.js +15 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-x.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-y.js +8 -3
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-y.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-marker.js +8 -9
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-marker.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-shape.js +11 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-shape.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/index.js +4 -0
- package/dist/wcardinal/ui/theme/white/index.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +38 -34
- 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 +40 -34
- 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 +331 -268
- package/dist/wcardinal-ui.js +259 -206
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-container-impl.d.ts +0 -18
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline.d.ts +0 -7
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline.d.ts +0 -7
- package/dist/wcardinal/ui/d-chart-selection-gridline-container-impl.js +0 -50
- package/dist/wcardinal/ui/d-chart-selection-gridline-container-impl.js.map +0 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-container.js.map +0 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline.js +0 -22
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline.js.map +0 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline.js +0 -22
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline.js.map +0 -1
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.298.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -55034,38 +55034,59 @@
|
|
|
55034
55034
|
var gridlineShapes = this._major.gridline.shapes;
|
|
55035
55035
|
var parser = this._parser;
|
|
55036
55036
|
var offset = parser.padding * this._index;
|
|
55037
|
+
var work = this._work;
|
|
55037
55038
|
var coordinate = void 0;
|
|
55038
55039
|
switch (parser.position) {
|
|
55039
55040
|
case DChartAxisPosition.TOP:
|
|
55040
55041
|
coordinate = plotArea.coordinate.x.get(parser.coordinate);
|
|
55041
55042
|
if (coordinate) {
|
|
55042
|
-
var domain = this.getDomain(plotArea, coordinate,
|
|
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;
|
|
55043
55049
|
var plotAreaHeight = plotArea.height;
|
|
55044
|
-
return this.updateX(
|
|
55050
|
+
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaHeight);
|
|
55045
55051
|
}
|
|
55046
55052
|
break;
|
|
55047
55053
|
case DChartAxisPosition.BOTTOM:
|
|
55048
55054
|
coordinate = plotArea.coordinate.x.get(parser.coordinate);
|
|
55049
55055
|
if (coordinate) {
|
|
55050
|
-
var domain = this.getDomain(plotArea, coordinate,
|
|
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;
|
|
55051
55062
|
var plotAreaHeight = plotArea.height;
|
|
55052
|
-
return this.updateX(
|
|
55063
|
+
return this.updateX(domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaHeight + offset, transform, plotAreaHeight);
|
|
55053
55064
|
}
|
|
55054
55065
|
break;
|
|
55055
55066
|
case DChartAxisPosition.LEFT:
|
|
55056
55067
|
coordinate = plotArea.coordinate.y.get(parser.coordinate);
|
|
55057
55068
|
if (coordinate) {
|
|
55058
|
-
var range = this.getRange(plotArea, coordinate,
|
|
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;
|
|
55059
55075
|
var plotAreaWidth = plotArea.width;
|
|
55060
|
-
return this.updateY(
|
|
55076
|
+
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, 0 - offset, transform, plotAreaWidth);
|
|
55061
55077
|
}
|
|
55062
55078
|
break;
|
|
55063
55079
|
case DChartAxisPosition.RIGHT:
|
|
55064
55080
|
coordinate = plotArea.coordinate.y.get(parser.coordinate);
|
|
55065
55081
|
if (coordinate) {
|
|
55066
|
-
var range = this.getRange(plotArea, coordinate,
|
|
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;
|
|
55067
55088
|
var plotAreaWidth = plotArea.width;
|
|
55068
|
-
return this.updateY(
|
|
55089
|
+
return this.updateY(rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, plotAreaWidth + offset, transform, plotAreaWidth);
|
|
55069
55090
|
}
|
|
55070
55091
|
break;
|
|
55071
55092
|
}
|
|
@@ -55077,12 +55098,18 @@
|
|
|
55077
55098
|
var transform = coordinate.transform;
|
|
55078
55099
|
return result.set(coordinate.unmap(transform.unmap(bounds.x)), coordinate.unmap(transform.unmap(bounds.x + bounds.width)));
|
|
55079
55100
|
};
|
|
55101
|
+
DChartAxisBaseTickContainer.prototype.getDomainVisible = function (plotArea, coordinate, result) {
|
|
55102
|
+
return result;
|
|
55103
|
+
};
|
|
55080
55104
|
DChartAxisBaseTickContainer.prototype.getRange = function (plotArea, coordinate, result) {
|
|
55081
55105
|
var bounds = plotArea.getBoundsInContainer();
|
|
55082
55106
|
var transform = coordinate.transform;
|
|
55083
55107
|
return result.set(coordinate.unmap(transform.unmap(bounds.y)), coordinate.unmap(transform.unmap(bounds.y + bounds.height)));
|
|
55084
55108
|
};
|
|
55085
|
-
DChartAxisBaseTickContainer.prototype.
|
|
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) {
|
|
55086
55113
|
var tick = this._parser.tick;
|
|
55087
55114
|
var majorTick = tick.major;
|
|
55088
55115
|
var majorCount = majorTick.count;
|
|
@@ -55096,7 +55123,7 @@
|
|
|
55096
55123
|
var minorFormatter = minorTick.formatter;
|
|
55097
55124
|
var majorTicks = this._majorTicks;
|
|
55098
55125
|
var minorTicks = this._minorTicks;
|
|
55099
|
-
this.newTicks(coordinate,
|
|
55126
|
+
this.newTicks(coordinate, domainFrom, domainTo, domainVisibleFrom, domainVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
55100
55127
|
var a = transform.a;
|
|
55101
55128
|
var tx = transform.tx;
|
|
55102
55129
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -55135,7 +55162,7 @@
|
|
|
55135
55162
|
}
|
|
55136
55163
|
return true;
|
|
55137
55164
|
};
|
|
55138
|
-
DChartAxisBaseTickContainer.prototype.updateY = function (
|
|
55165
|
+
DChartAxisBaseTickContainer.prototype.updateY = function (rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, coordinate, majorShapes, minorShapes, gridlineShapes, shapePositionX, transform, plotAreaWidth) {
|
|
55139
55166
|
var tick = this._parser.tick;
|
|
55140
55167
|
var majorTick = tick.major;
|
|
55141
55168
|
var majorCount = majorTick.count;
|
|
@@ -55149,7 +55176,7 @@
|
|
|
55149
55176
|
var minorFormatter = minorTick.formatter;
|
|
55150
55177
|
var majorTicks = this._majorTicks;
|
|
55151
55178
|
var minorTicks = this._minorTicks;
|
|
55152
|
-
this.newTicks(coordinate,
|
|
55179
|
+
this.newTicks(coordinate, rangeFrom, rangeTo, rangeVisibleFrom, rangeVisibleTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
|
|
55153
55180
|
var d = transform.d;
|
|
55154
55181
|
var ty = transform.ty;
|
|
55155
55182
|
for (var i = 0; i < majorCapacity; ++i) {
|
|
@@ -55218,8 +55245,8 @@
|
|
|
55218
55245
|
DChartAxisBaseTickContainer.prototype.hideMinor = function (shape) {
|
|
55219
55246
|
shape.visible = false;
|
|
55220
55247
|
};
|
|
55221
|
-
DChartAxisBaseTickContainer.prototype.newTicks = function (coordinate,
|
|
55222
|
-
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);
|
|
55223
55250
|
};
|
|
55224
55251
|
DChartAxisBaseTickContainer.prototype.destroy = function () {
|
|
55225
55252
|
this._major.destroy();
|
|
@@ -55822,8 +55849,8 @@
|
|
|
55822
55849
|
DChartCoordinateBase.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
|
|
55823
55850
|
// DO NOTHING
|
|
55824
55851
|
};
|
|
55825
|
-
DChartCoordinateBase.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
|
|
55826
|
-
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);
|
|
55827
55854
|
};
|
|
55828
55855
|
DChartCoordinateBase.prototype.toTheme = function (options) {
|
|
55829
55856
|
var _a;
|
|
@@ -56060,65 +56087,63 @@
|
|
|
56060
56087
|
}
|
|
56061
56088
|
}
|
|
56062
56089
|
};
|
|
56063
|
-
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) {
|
|
56064
56091
|
if (majorCount <= 0) {
|
|
56065
56092
|
return;
|
|
56066
56093
|
}
|
|
56067
56094
|
var transform = coordinate.transform;
|
|
56068
56095
|
var domainMin = Math.min(domainFrom, domainTo);
|
|
56069
56096
|
var domainMax = Math.max(domainFrom, domainTo);
|
|
56070
|
-
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);
|
|
56071
56112
|
if (majorStepMapped <= 0) {
|
|
56072
|
-
|
|
56073
|
-
|
|
56074
|
-
|
|
56075
|
-
|
|
56076
|
-
|
|
56077
|
-
majorResult[imajorResult + 0] = NaN;
|
|
56078
|
-
majorResult[imajorResult + 1] = NaN;
|
|
56079
|
-
majorResult[imajorResult + 2] = NaN;
|
|
56080
|
-
}
|
|
56081
|
-
for (var i = 0; i < minorCount; ++i) {
|
|
56082
|
-
var iminorResult = i * 3;
|
|
56083
|
-
minorResult[iminorResult + 0] = NaN;
|
|
56084
|
-
minorResult[iminorResult + 1] = NaN;
|
|
56085
|
-
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;
|
|
56086
56118
|
}
|
|
56087
|
-
return;
|
|
56088
56119
|
}
|
|
56089
|
-
|
|
56090
|
-
|
|
56091
|
-
|
|
56092
|
-
|
|
56093
|
-
|
|
56094
|
-
|
|
56095
|
-
|
|
56096
|
-
|
|
56097
|
-
|
|
56098
|
-
|
|
56099
|
-
|
|
56100
|
-
|
|
56101
|
-
|
|
56102
|
-
|
|
56103
|
-
|
|
56104
|
-
|
|
56105
|
-
|
|
56106
|
-
|
|
56107
|
-
|
|
56108
|
-
|
|
56109
|
-
|
|
56110
|
-
|
|
56111
|
-
|
|
56112
|
-
|
|
56113
|
-
|
|
56114
|
-
|
|
56115
|
-
|
|
56116
|
-
if (from <= minorPositionMapped && minorPositionMapped <= to) {
|
|
56117
|
-
var iminorResult = iminor * 3;
|
|
56118
|
-
minorResult[iminorResult + 0] = minorPosition;
|
|
56119
|
-
minorResult[iminorResult + 1] = minorPositionMapped;
|
|
56120
|
-
minorResult[iminorResult + 2] = minorStepMapped;
|
|
56121
|
-
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
|
+
}
|
|
56122
56147
|
}
|
|
56123
56148
|
}
|
|
56124
56149
|
}
|
|
@@ -56211,64 +56236,63 @@
|
|
|
56211
56236
|
}
|
|
56212
56237
|
}
|
|
56213
56238
|
};
|
|
56214
|
-
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) {
|
|
56215
56240
|
if (majorCount <= 0) {
|
|
56216
56241
|
return;
|
|
56217
56242
|
}
|
|
56218
56243
|
var transform = coordinate.transform;
|
|
56219
|
-
var
|
|
56220
|
-
var
|
|
56221
|
-
var
|
|
56222
|
-
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;
|
|
56223
56260
|
var majorStepMapped = this.toMajorStep(domainMinMapped, domainMaxMapped, majorCount, majorStep);
|
|
56224
56261
|
if (majorStepMapped <= 0) {
|
|
56225
|
-
|
|
56226
|
-
|
|
56227
|
-
|
|
56228
|
-
|
|
56229
|
-
|
|
56230
|
-
var imajorResult = i * 3;
|
|
56231
|
-
majorResult[imajorResult + 0] = NaN;
|
|
56232
|
-
majorResult[imajorResult + 1] = NaN;
|
|
56233
|
-
majorResult[imajorResult + 2] = NaN;
|
|
56234
|
-
}
|
|
56235
|
-
for (var i = 0; i < minorCount; ++i) {
|
|
56236
|
-
var iminorResult = i * 3;
|
|
56237
|
-
minorResult[iminorResult + 0] = NaN;
|
|
56238
|
-
minorResult[iminorResult + 1] = NaN;
|
|
56239
|
-
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;
|
|
56240
56267
|
}
|
|
56241
|
-
return;
|
|
56242
56268
|
}
|
|
56243
|
-
|
|
56244
|
-
|
|
56245
|
-
|
|
56246
|
-
|
|
56247
|
-
|
|
56248
|
-
|
|
56249
|
-
|
|
56250
|
-
|
|
56251
|
-
|
|
56252
|
-
|
|
56253
|
-
|
|
56254
|
-
|
|
56255
|
-
|
|
56256
|
-
|
|
56257
|
-
|
|
56258
|
-
|
|
56259
|
-
|
|
56260
|
-
|
|
56261
|
-
|
|
56262
|
-
|
|
56263
|
-
|
|
56264
|
-
|
|
56265
|
-
|
|
56266
|
-
|
|
56267
|
-
|
|
56268
|
-
|
|
56269
|
-
|
|
56270
|
-
minorResult[iminorResult + 2] = coordinate.unmap(minorPositionMapped - 1);
|
|
56271
|
-
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
|
+
}
|
|
56272
56296
|
}
|
|
56273
56297
|
}
|
|
56274
56298
|
}
|
|
@@ -57103,6 +57127,53 @@
|
|
|
57103
57127
|
return DChartRegionImplObservable;
|
|
57104
57128
|
}());
|
|
57105
57129
|
|
|
57130
|
+
/*
|
|
57131
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
57132
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
57133
|
+
*/
|
|
57134
|
+
var DChartSelectionContainerImpl = /** @class */ (function () {
|
|
57135
|
+
function DChartSelectionContainerImpl(x, y) {
|
|
57136
|
+
this._x = x;
|
|
57137
|
+
this._y = y;
|
|
57138
|
+
}
|
|
57139
|
+
Object.defineProperty(DChartSelectionContainerImpl.prototype, "x", {
|
|
57140
|
+
get: function () {
|
|
57141
|
+
return this._x;
|
|
57142
|
+
},
|
|
57143
|
+
enumerable: false,
|
|
57144
|
+
configurable: true
|
|
57145
|
+
});
|
|
57146
|
+
Object.defineProperty(DChartSelectionContainerImpl.prototype, "y", {
|
|
57147
|
+
get: function () {
|
|
57148
|
+
return this._y;
|
|
57149
|
+
},
|
|
57150
|
+
enumerable: false,
|
|
57151
|
+
configurable: true
|
|
57152
|
+
});
|
|
57153
|
+
DChartSelectionContainerImpl.prototype.bind = function (container) {
|
|
57154
|
+
this._x.bind(container);
|
|
57155
|
+
this._y.bind(container);
|
|
57156
|
+
};
|
|
57157
|
+
DChartSelectionContainerImpl.prototype.unbind = function () {
|
|
57158
|
+
this._x.unbind();
|
|
57159
|
+
this._y.unbind();
|
|
57160
|
+
};
|
|
57161
|
+
DChartSelectionContainerImpl.prototype.set = function (container, position, mappedPosition, series) {
|
|
57162
|
+
this._x.set(container, position, mappedPosition, series);
|
|
57163
|
+
this._y.set(container, position, mappedPosition, series);
|
|
57164
|
+
};
|
|
57165
|
+
DChartSelectionContainerImpl.prototype.unset = function () {
|
|
57166
|
+
this._x.unset();
|
|
57167
|
+
this._y.unset();
|
|
57168
|
+
};
|
|
57169
|
+
DChartSelectionContainerImpl.prototype.update = function (container, position, mappedPosition) {
|
|
57170
|
+
var isXUpdated = this._x.update(container, position, mappedPosition);
|
|
57171
|
+
var isYUpdated = this._y.update(container, position, mappedPosition);
|
|
57172
|
+
return isXUpdated || isYUpdated;
|
|
57173
|
+
};
|
|
57174
|
+
return DChartSelectionContainerImpl;
|
|
57175
|
+
}());
|
|
57176
|
+
|
|
57106
57177
|
/*
|
|
57107
57178
|
* Copyright (C) 2019 Toshiba Corporation
|
|
57108
57179
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -57115,12 +57186,32 @@
|
|
|
57115
57186
|
var state = new DBaseStateSetImpl().add((_a = options === null || options === void 0 ? void 0 : options.state) !== null && _a !== void 0 ? _a : DBaseState.HOVERED);
|
|
57116
57187
|
this._state = state;
|
|
57117
57188
|
this._isEnabled = (_b = options === null || options === void 0 ? void 0 : options.enable) !== null && _b !== void 0 ? _b : theme.isEnabled(state);
|
|
57118
|
-
|
|
57189
|
+
if (options != null) {
|
|
57190
|
+
var shape = options.shape;
|
|
57191
|
+
if (shape != null) {
|
|
57192
|
+
if (isFunction(shape)) {
|
|
57193
|
+
this._newShape = shape;
|
|
57194
|
+
}
|
|
57195
|
+
else {
|
|
57196
|
+
this._shape = shape;
|
|
57197
|
+
}
|
|
57198
|
+
}
|
|
57199
|
+
}
|
|
57119
57200
|
this._style = (_c = options === null || options === void 0 ? void 0 : options.style) !== null && _c !== void 0 ? _c : this.setStyle;
|
|
57120
57201
|
}
|
|
57121
57202
|
DChartSelectionShapeBase.prototype.bind = function (container) {
|
|
57122
57203
|
if (this._isEnabled) {
|
|
57123
|
-
var shape = this._shape
|
|
57204
|
+
var shape = this._shape;
|
|
57205
|
+
if (shape == null) {
|
|
57206
|
+
var state = this._state;
|
|
57207
|
+
var newShape = this._newShape;
|
|
57208
|
+
if (newShape != null) {
|
|
57209
|
+
shape = newShape(state);
|
|
57210
|
+
}
|
|
57211
|
+
else {
|
|
57212
|
+
shape = this.newShape(state, this._theme);
|
|
57213
|
+
}
|
|
57214
|
+
}
|
|
57124
57215
|
this._shape = shape;
|
|
57125
57216
|
shape.attach(container.plotArea.axis.container);
|
|
57126
57217
|
shape.visible = false;
|
|
@@ -57132,21 +57223,18 @@
|
|
|
57132
57223
|
shape.detach();
|
|
57133
57224
|
}
|
|
57134
57225
|
};
|
|
57135
|
-
DChartSelectionShapeBase.prototype.newShape = function (theme) {
|
|
57136
|
-
return theme.newShape(
|
|
57226
|
+
DChartSelectionShapeBase.prototype.newShape = function (state, theme) {
|
|
57227
|
+
return theme.newShape(state);
|
|
57137
57228
|
};
|
|
57138
|
-
DChartSelectionShapeBase.prototype.set = function (container, mappedPosition, series) {
|
|
57139
|
-
this.update(container, mappedPosition);
|
|
57229
|
+
DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
|
|
57230
|
+
this.update(container, position, mappedPosition);
|
|
57140
57231
|
var shape = this._shape;
|
|
57141
57232
|
if (shape) {
|
|
57142
57233
|
this._style(shape, series);
|
|
57143
57234
|
}
|
|
57144
57235
|
};
|
|
57145
57236
|
DChartSelectionShapeBase.prototype.setStyle = function (shape, series) {
|
|
57146
|
-
|
|
57147
|
-
if (seriesShape) {
|
|
57148
|
-
shape.stroke.color = seriesShape.stroke.color;
|
|
57149
|
-
}
|
|
57237
|
+
// DO NOTHING
|
|
57150
57238
|
};
|
|
57151
57239
|
DChartSelectionShapeBase.prototype.unset = function () {
|
|
57152
57240
|
var shape = this._shape;
|
|
@@ -57181,20 +57269,21 @@
|
|
|
57181
57269
|
function DChartSelectionGridlineX() {
|
|
57182
57270
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
57183
57271
|
}
|
|
57184
|
-
DChartSelectionGridlineX.prototype.update = function (container, mappedPosition) {
|
|
57272
|
+
DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition) {
|
|
57185
57273
|
var shape = this._shape;
|
|
57186
57274
|
if (shape) {
|
|
57187
57275
|
var mappedX = mappedPosition.x;
|
|
57188
57276
|
var height = container.plotArea.height;
|
|
57189
57277
|
shape.transform.position.set(mappedX, height * 0.5);
|
|
57190
57278
|
shape.size.set(0, height);
|
|
57191
|
-
shape.visible = this.isVisible(container,
|
|
57279
|
+
shape.visible = this.isVisible(container, position, mappedPosition);
|
|
57192
57280
|
return true;
|
|
57193
57281
|
}
|
|
57194
57282
|
return false;
|
|
57195
57283
|
};
|
|
57196
|
-
DChartSelectionGridlineX.prototype.isVisible = function (container,
|
|
57197
|
-
|
|
57284
|
+
DChartSelectionGridlineX.prototype.isVisible = function (container, position, mappedPosition) {
|
|
57285
|
+
var x = mappedPosition.x;
|
|
57286
|
+
return 0 <= x && x <= container.plotArea.width;
|
|
57198
57287
|
};
|
|
57199
57288
|
DChartSelectionGridlineX.prototype.getType = function () {
|
|
57200
57289
|
return "DChartSelectionGridlineX";
|
|
@@ -57211,20 +57300,21 @@
|
|
|
57211
57300
|
function DChartSelectionGridlineY() {
|
|
57212
57301
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
57213
57302
|
}
|
|
57214
|
-
DChartSelectionGridlineY.prototype.update = function (container, mappedPosition) {
|
|
57303
|
+
DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition) {
|
|
57215
57304
|
var shape = this._shape;
|
|
57216
57305
|
if (shape) {
|
|
57217
57306
|
var mappedY = mappedPosition.y;
|
|
57218
57307
|
var width = container.plotArea.width;
|
|
57219
57308
|
shape.transform.position.set(width * 0.5, mappedY);
|
|
57220
57309
|
shape.size.set(width, 0);
|
|
57221
|
-
shape.visible = this.isVisible(container,
|
|
57310
|
+
shape.visible = this.isVisible(container, position, mappedPosition);
|
|
57222
57311
|
return true;
|
|
57223
57312
|
}
|
|
57224
57313
|
return false;
|
|
57225
57314
|
};
|
|
57226
|
-
DChartSelectionGridlineY.prototype.isVisible = function (container,
|
|
57227
|
-
|
|
57315
|
+
DChartSelectionGridlineY.prototype.isVisible = function (container, position, mappedPosition) {
|
|
57316
|
+
var y = mappedPosition.y;
|
|
57317
|
+
return 0 <= y && y <= container.plotArea.height;
|
|
57228
57318
|
};
|
|
57229
57319
|
DChartSelectionGridlineY.prototype.getType = function () {
|
|
57230
57320
|
return "DChartSelectionGridlineY";
|
|
@@ -57232,53 +57322,6 @@
|
|
|
57232
57322
|
return DChartSelectionGridlineY;
|
|
57233
57323
|
}(DChartSelectionShapeBase));
|
|
57234
57324
|
|
|
57235
|
-
/*
|
|
57236
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
57237
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
57238
|
-
*/
|
|
57239
|
-
var DChartSelectionGridlineContainerImpl = /** @class */ (function () {
|
|
57240
|
-
function DChartSelectionGridlineContainerImpl(options) {
|
|
57241
|
-
this._x = new DChartSelectionGridlineX(options === null || options === void 0 ? void 0 : options.x);
|
|
57242
|
-
this._y = new DChartSelectionGridlineY(options === null || options === void 0 ? void 0 : options.y);
|
|
57243
|
-
}
|
|
57244
|
-
Object.defineProperty(DChartSelectionGridlineContainerImpl.prototype, "x", {
|
|
57245
|
-
get: function () {
|
|
57246
|
-
return this._x;
|
|
57247
|
-
},
|
|
57248
|
-
enumerable: false,
|
|
57249
|
-
configurable: true
|
|
57250
|
-
});
|
|
57251
|
-
Object.defineProperty(DChartSelectionGridlineContainerImpl.prototype, "y", {
|
|
57252
|
-
get: function () {
|
|
57253
|
-
return this._y;
|
|
57254
|
-
},
|
|
57255
|
-
enumerable: false,
|
|
57256
|
-
configurable: true
|
|
57257
|
-
});
|
|
57258
|
-
DChartSelectionGridlineContainerImpl.prototype.bind = function (container) {
|
|
57259
|
-
this._x.bind(container);
|
|
57260
|
-
this._y.bind(container);
|
|
57261
|
-
};
|
|
57262
|
-
DChartSelectionGridlineContainerImpl.prototype.unbind = function () {
|
|
57263
|
-
this._x.unbind();
|
|
57264
|
-
this._y.unbind();
|
|
57265
|
-
};
|
|
57266
|
-
DChartSelectionGridlineContainerImpl.prototype.set = function (container, mappedPosition, series) {
|
|
57267
|
-
this._x.set(container, mappedPosition, series);
|
|
57268
|
-
this._y.set(container, mappedPosition, series);
|
|
57269
|
-
};
|
|
57270
|
-
DChartSelectionGridlineContainerImpl.prototype.unset = function () {
|
|
57271
|
-
this._x.unset();
|
|
57272
|
-
this._y.unset();
|
|
57273
|
-
};
|
|
57274
|
-
DChartSelectionGridlineContainerImpl.prototype.update = function (container, mappedPosition) {
|
|
57275
|
-
var isXUpdated = this._x.update(container, mappedPosition);
|
|
57276
|
-
var isYUpdated = this._y.update(container, mappedPosition);
|
|
57277
|
-
return isXUpdated || isYUpdated;
|
|
57278
|
-
};
|
|
57279
|
-
return DChartSelectionGridlineContainerImpl;
|
|
57280
|
-
}());
|
|
57281
|
-
|
|
57282
57325
|
/*
|
|
57283
57326
|
* Copyright (C) 2019 Toshiba Corporation
|
|
57284
57327
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -57288,16 +57331,16 @@
|
|
|
57288
57331
|
function DChartSelectionMarker() {
|
|
57289
57332
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
57290
57333
|
}
|
|
57291
|
-
DChartSelectionMarker.prototype.update = function (container, mappedPosition) {
|
|
57334
|
+
DChartSelectionMarker.prototype.update = function (container, position, mappedPosition) {
|
|
57292
57335
|
var shape = this._shape;
|
|
57293
57336
|
if (shape) {
|
|
57294
57337
|
shape.transform.position.copyFrom(mappedPosition);
|
|
57295
|
-
shape.visible = this.isVisible(container, mappedPosition);
|
|
57338
|
+
shape.visible = this.isVisible(container, position, mappedPosition);
|
|
57296
57339
|
return true;
|
|
57297
57340
|
}
|
|
57298
57341
|
return false;
|
|
57299
57342
|
};
|
|
57300
|
-
DChartSelectionMarker.prototype.isVisible = function (container, mappedPosition) {
|
|
57343
|
+
DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition) {
|
|
57301
57344
|
var x = mappedPosition.x;
|
|
57302
57345
|
var y = mappedPosition.y;
|
|
57303
57346
|
var plotArea = container.plotArea;
|
|
@@ -57328,18 +57371,18 @@
|
|
|
57328
57371
|
__extends(DChartSelectionSubImpl, _super);
|
|
57329
57372
|
function DChartSelectionSubImpl(options) {
|
|
57330
57373
|
var _this = this;
|
|
57331
|
-
var _a, _b, _c;
|
|
57374
|
+
var _a, _b, _c, _d, _e;
|
|
57332
57375
|
_this = _super.call(this) || this;
|
|
57333
57376
|
_this._container = null;
|
|
57334
57377
|
_this._series = null;
|
|
57335
57378
|
_this._isEnabled = (_a = options.enable) !== null && _a !== void 0 ? _a : true;
|
|
57336
|
-
_this._gridline = new
|
|
57379
|
+
_this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX((_b = options.gridline) === null || _b === void 0 ? void 0 : _b.x), new DChartSelectionGridlineY((_c = options.gridline) === null || _c === void 0 ? void 0 : _c.y));
|
|
57337
57380
|
_this._marker = new DChartSelectionMarker(options.marker);
|
|
57338
|
-
_this._state = (
|
|
57381
|
+
_this._state = (_d = options.state) !== null && _d !== void 0 ? _d : DBaseState.HOVERED;
|
|
57339
57382
|
_this._coordinateX = null;
|
|
57340
57383
|
_this._coordinateY = null;
|
|
57341
57384
|
_this._position = new pixi_js.Point();
|
|
57342
|
-
_this._point = (
|
|
57385
|
+
_this._point = (_e = options.point) !== null && _e !== void 0 ? _e : DChartSelectionPoint.CLOSER;
|
|
57343
57386
|
_this._work = new pixi_js.Point();
|
|
57344
57387
|
// Events
|
|
57345
57388
|
var on = options.on;
|
|
@@ -57434,8 +57477,8 @@
|
|
|
57434
57477
|
work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
|
|
57435
57478
|
transform.apply(work, work);
|
|
57436
57479
|
}
|
|
57437
|
-
this._gridline.set(container, work, series);
|
|
57438
|
-
this._marker.set(container, work, series);
|
|
57480
|
+
this._gridline.set(container, position, work, series);
|
|
57481
|
+
this._marker.set(container, position, work, series);
|
|
57439
57482
|
DApplications.update(container.plotArea);
|
|
57440
57483
|
}
|
|
57441
57484
|
var oldSeries = this._series;
|
|
@@ -57449,12 +57492,6 @@
|
|
|
57449
57492
|
}
|
|
57450
57493
|
this.emit("change", this);
|
|
57451
57494
|
};
|
|
57452
|
-
DChartSelectionSubImpl.prototype.setStyle = function (shape, series) {
|
|
57453
|
-
var seriesShape = series.shape;
|
|
57454
|
-
if (seriesShape) {
|
|
57455
|
-
shape.stroke.color = seriesShape.stroke.color;
|
|
57456
|
-
}
|
|
57457
|
-
};
|
|
57458
57495
|
DChartSelectionSubImpl.prototype.unset = function () {
|
|
57459
57496
|
var series = this._series;
|
|
57460
57497
|
if (series) {
|
|
@@ -57476,8 +57513,8 @@
|
|
|
57476
57513
|
var work = this._work;
|
|
57477
57514
|
work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
|
|
57478
57515
|
container.plotArea.container.localTransform.apply(work, work);
|
|
57479
|
-
var isGridlineUpdated = this._gridline.update(container, work);
|
|
57480
|
-
var isMarkerUpdated = this._marker.update(container, work);
|
|
57516
|
+
var isGridlineUpdated = this._gridline.update(container, position, work);
|
|
57517
|
+
var isMarkerUpdated = this._marker.update(container, position, work);
|
|
57481
57518
|
return isGridlineUpdated || isMarkerUpdated;
|
|
57482
57519
|
}
|
|
57483
57520
|
return false;
|
|
@@ -57519,12 +57556,19 @@
|
|
|
57519
57556
|
return _this;
|
|
57520
57557
|
}
|
|
57521
57558
|
DChartSelectionSimple.prototype.newSelected = function (point, options) {
|
|
57522
|
-
return new DChartSelectionSubImpl(this.
|
|
57559
|
+
return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
|
|
57523
57560
|
};
|
|
57524
57561
|
DChartSelectionSimple.prototype.newHovered = function (point, options) {
|
|
57525
|
-
return new DChartSelectionSubImpl(this.
|
|
57562
|
+
return new DChartSelectionSubImpl(this.toHoveredOptions(point, options));
|
|
57563
|
+
};
|
|
57564
|
+
DChartSelectionSimple.prototype.toSelectedOptions = function (point, options) {
|
|
57565
|
+
return this.toSubOptions(point, options, DBaseState.ACTIVE);
|
|
57566
|
+
};
|
|
57567
|
+
DChartSelectionSimple.prototype.toHoveredOptions = function (point, options) {
|
|
57568
|
+
return this.toSubOptions(point, options, DBaseState.HOVERED);
|
|
57526
57569
|
};
|
|
57527
57570
|
DChartSelectionSimple.prototype.toSubOptions = function (point, options, state) {
|
|
57571
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
57528
57572
|
options = options || {};
|
|
57529
57573
|
if (options.point == null) {
|
|
57530
57574
|
options.point = point;
|
|
@@ -57532,19 +57576,28 @@
|
|
|
57532
57576
|
if (options.state == null) {
|
|
57533
57577
|
options.state = state;
|
|
57534
57578
|
}
|
|
57535
|
-
var gridline = options.gridline
|
|
57536
|
-
var gridlineX = gridline.x
|
|
57579
|
+
var gridline = ((_a = options.gridline) !== null && _a !== void 0 ? _a : (options.gridline = {}));
|
|
57580
|
+
var gridlineX = ((_b = gridline.x) !== null && _b !== void 0 ? _b : (gridline.x = {}));
|
|
57537
57581
|
if (gridlineX.state == null) {
|
|
57538
57582
|
gridlineX.state = state;
|
|
57539
57583
|
}
|
|
57540
|
-
var gridlineY = gridline.y
|
|
57584
|
+
var gridlineY = ((_c = gridline.y) !== null && _c !== void 0 ? _c : (gridline.y = {}));
|
|
57541
57585
|
if (gridlineY.state == null) {
|
|
57542
57586
|
gridlineY.state = state;
|
|
57543
57587
|
}
|
|
57544
|
-
var marker = options.marker
|
|
57588
|
+
var marker = ((_d = options.marker) !== null && _d !== void 0 ? _d : (options.marker = {}));
|
|
57545
57589
|
if (marker.state == null) {
|
|
57546
57590
|
marker.state = state;
|
|
57547
57591
|
}
|
|
57592
|
+
var label = ((_e = options.label) !== null && _e !== void 0 ? _e : (options.label = {}));
|
|
57593
|
+
var labelX = ((_f = label.x) !== null && _f !== void 0 ? _f : (label.x = {}));
|
|
57594
|
+
if (labelX.state == null) {
|
|
57595
|
+
labelX.state = state;
|
|
57596
|
+
}
|
|
57597
|
+
var labelY = ((_g = label.y) !== null && _g !== void 0 ? _g : (label.y = {}));
|
|
57598
|
+
if (labelY.state == null) {
|
|
57599
|
+
labelY.state = state;
|
|
57600
|
+
}
|
|
57548
57601
|
return options;
|
|
57549
57602
|
};
|
|
57550
57603
|
DChartSelectionSimple.prototype.onClick = function (e) {
|
|
@@ -73897,7 +73950,7 @@
|
|
|
73897
73950
|
DChartPlotAreaImpl: DChartPlotAreaImpl,
|
|
73898
73951
|
DChartRegionImplObservable: DChartRegionImplObservable,
|
|
73899
73952
|
DChartRegionImpl: DChartRegionImpl,
|
|
73900
|
-
|
|
73953
|
+
DChartSelectionContainerImpl: DChartSelectionContainerImpl,
|
|
73901
73954
|
DChartSelectionGridlineX: DChartSelectionGridlineX,
|
|
73902
73955
|
DChartSelectionGridlineY: DChartSelectionGridlineY,
|
|
73903
73956
|
DChartSelectionMarker: DChartSelectionMarker,
|