plottable 3.11.0 → 3.12.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/build/src/animators/easingAnimator.d.ts +2 -2
- package/build/src/animators/easingAnimator.js +3 -2
- package/build/src/animators/index.js +2 -2
- package/build/src/animators/nullAnimator.js +2 -1
- package/build/src/axes/axis.d.ts +9 -5
- package/build/src/axes/axis.js +4 -3
- package/build/src/axes/categoryAxis.d.ts +9 -5
- package/build/src/axes/categoryAxis.js +13 -11
- package/build/src/axes/index.js +3 -3
- package/build/src/axes/numericAxis.d.ts +9 -5
- package/build/src/axes/numericAxis.js +2 -1
- package/build/src/axes/timeAxis.d.ts +18 -14
- package/build/src/axes/timeAxis.js +6 -5
- package/build/src/components/component.d.ts +2 -2
- package/build/src/components/component.js +7 -6
- package/build/src/components/componentContainer.js +3 -2
- package/build/src/components/dragBoxLayer.d.ts +4 -4
- package/build/src/components/dragBoxLayer.js +3 -2
- package/build/src/components/dragLineLayer.js +2 -1
- package/build/src/components/gridlines.d.ts +2 -2
- package/build/src/components/gridlines.js +2 -1
- package/build/src/components/group.js +2 -1
- package/build/src/components/guideLineLayer.d.ts +1 -1
- package/build/src/components/guideLineLayer.js +2 -1
- package/build/src/components/index.js +14 -14
- package/build/src/components/interpolatedColorLegend.d.ts +7 -3
- package/build/src/components/interpolatedColorLegend.js +4 -3
- package/build/src/components/label.js +4 -3
- package/build/src/components/legend.d.ts +5 -1
- package/build/src/components/legend.js +2 -1
- package/build/src/components/plotGroup.js +2 -1
- package/build/src/components/selectionBoxLayer.d.ts +4 -4
- package/build/src/components/selectionBoxLayer.js +2 -1
- package/build/src/components/table.d.ts +10 -6
- package/build/src/components/table.js +4 -3
- package/build/src/components/wrappedLabel.js +2 -1
- package/build/src/components/xDragBoxLayer.js +2 -1
- package/build/src/components/yDragBoxLayer.js +2 -1
- package/build/src/core/config.js +1 -0
- package/build/src/core/dataset.d.ts +5 -1
- package/build/src/core/dataset.js +1 -0
- package/build/src/core/formatters.d.ts +4 -0
- package/build/src/core/formatters.js +1 -0
- package/build/src/core/renderController.d.ts +1 -1
- package/build/src/core/renderController.js +2 -1
- package/build/src/core/renderPolicy.d.ts +4 -0
- package/build/src/core/renderPolicy.js +1 -0
- package/build/src/core/symbolFactories.d.ts +4 -0
- package/build/src/core/symbolFactories.js +1 -0
- package/build/src/core/version.d.ts +4 -0
- package/build/src/core/version.js +2 -1
- package/build/src/core/version.js.bak +1 -0
- package/build/src/dispatchers/dispatcher.d.ts +7 -3
- package/build/src/dispatchers/dispatcher.js +2 -1
- package/build/src/dispatchers/index.js +3 -3
- package/build/src/dispatchers/keyDispatcher.d.ts +2 -2
- package/build/src/dispatchers/keyDispatcher.js +2 -1
- package/build/src/dispatchers/mouseDispatcher.d.ts +1 -1
- package/build/src/dispatchers/mouseDispatcher.js +2 -1
- package/build/src/dispatchers/touchDispatcher.d.ts +1 -1
- package/build/src/dispatchers/touchDispatcher.js +2 -1
- package/build/src/drawers/arcDrawer.js +2 -1
- package/build/src/drawers/arcOutlineDrawer.js +2 -1
- package/build/src/drawers/areaDrawer.js +6 -5
- package/build/src/drawers/canvasBuffer.js +1 -0
- package/build/src/drawers/canvasDrawer.js +1 -0
- package/build/src/drawers/drawer.js +1 -0
- package/build/src/drawers/index.js +11 -10
- package/build/src/drawers/lineDrawer.js +4 -3
- package/build/src/drawers/rectangleDrawer.js +7 -5
- package/build/src/drawers/segmentDrawer.js +2 -1
- package/build/src/drawers/svgDrawer.d.ts +2 -2
- package/build/src/drawers/svgDrawer.js +1 -0
- package/build/src/drawers/symbolDrawer.js +6 -6
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +17 -14
- package/build/src/interactions/clickInteraction.d.ts +4 -4
- package/build/src/interactions/clickInteraction.js +2 -1
- package/build/src/interactions/dragInteraction.d.ts +4 -4
- package/build/src/interactions/dragInteraction.js +2 -1
- package/build/src/interactions/index.js +7 -6
- package/build/src/interactions/interaction.d.ts +2 -2
- package/build/src/interactions/interaction.js +1 -0
- package/build/src/interactions/keyInteraction.d.ts +2 -2
- package/build/src/interactions/keyInteraction.js +2 -1
- package/build/src/interactions/panZoomConstraints.js +1 -0
- package/build/src/interactions/panZoomInteraction.d.ts +13 -9
- package/build/src/interactions/panZoomInteraction.js +4 -3
- package/build/src/interactions/pointerInteraction.d.ts +3 -3
- package/build/src/interactions/pointerInteraction.js +2 -1
- package/build/src/memoize/index.js +5 -4
- package/build/src/memoize/memThunk.js +2 -1
- package/build/src/memoize/memoize.d.ts +5 -0
- package/build/src/memoize/memoize.js +2 -1
- package/build/src/memoize/memoizeProjectors.js +3 -2
- package/build/src/memoize/signature.d.ts +14 -0
- package/build/src/memoize/signature.js +4 -3
- package/build/src/plots/areaPlot.d.ts +9 -5
- package/build/src/plots/areaPlot.js +4 -3
- package/build/src/plots/barPlot.d.ts +16 -22
- package/build/src/plots/barPlot.js +6 -5
- package/build/src/plots/clusteredBarPlot.d.ts +3 -5
- package/build/src/plots/clusteredBarPlot.js +2 -1
- package/build/src/plots/commons.js +1 -0
- package/build/src/plots/deferredRenderer.d.ts +1 -1
- package/build/src/plots/deferredRenderer.js +1 -0
- package/build/src/plots/index.js +12 -12
- package/build/src/plots/linePlot.d.ts +6 -6
- package/build/src/plots/linePlot.js +5 -4
- package/build/src/plots/piePlot.d.ts +9 -5
- package/build/src/plots/piePlot.js +3 -2
- package/build/src/plots/plot.d.ts +5 -5
- package/build/src/plots/plot.js +7 -6
- package/build/src/plots/rectanglePlot.d.ts +10 -6
- package/build/src/plots/rectanglePlot.js +2 -1
- package/build/src/plots/scatterPlot.d.ts +8 -9
- package/build/src/plots/scatterPlot.js +3 -2
- package/build/src/plots/segmentPlot.d.ts +7 -3
- package/build/src/plots/segmentPlot.js +3 -2
- package/build/src/plots/stackedAreaPlot.d.ts +6 -2
- package/build/src/plots/stackedAreaPlot.js +4 -3
- package/build/src/plots/stackedBarPlot.d.ts +5 -4
- package/build/src/plots/stackedBarPlot.js +5 -4
- package/build/src/plots/waterfallPlot.d.ts +4 -6
- package/build/src/plots/waterfallPlot.js +2 -1
- package/build/src/plots/xyPlot.d.ts +5 -5
- package/build/src/plots/xyPlot.js +2 -1
- package/build/src/scales/categoryScale.d.ts +7 -3
- package/build/src/scales/categoryScale.js +3 -2
- package/build/src/scales/colorScale.d.ts +5 -1
- package/build/src/scales/colorScale.js +2 -1
- package/build/src/scales/index.d.ts +1 -1
- package/build/src/scales/index.js +8 -7
- package/build/src/scales/interpolatedColorScale.d.ts +7 -3
- package/build/src/scales/interpolatedColorScale.js +5 -4
- package/build/src/scales/linearScale.d.ts +4 -0
- package/build/src/scales/linearScale.js +2 -1
- package/build/src/scales/logScale.d.ts +4 -0
- package/build/src/scales/logScale.js +2 -1
- package/build/src/scales/modifiedLogScale.d.ts +8 -4
- package/build/src/scales/modifiedLogScale.js +2 -1
- package/build/src/scales/quantitativeScale.d.ts +5 -1
- package/build/src/scales/quantitativeScale.js +3 -2
- package/build/src/scales/scale.d.ts +4 -0
- package/build/src/scales/scale.js +1 -0
- package/build/src/scales/tickGenerators.js +1 -0
- package/build/src/scales/timeScale.js +2 -1
- package/build/src/utils/addD3SelectionMulti.d.ts +8 -0
- package/build/src/utils/arrayUtils.d.ts +4 -0
- package/build/src/utils/arrayUtils.js +1 -0
- package/build/src/utils/bucket.js +1 -0
- package/build/src/utils/callbackSet.js +2 -1
- package/build/src/utils/coerceD3.js +1 -0
- package/build/src/utils/colorUtils.d.ts +4 -0
- package/build/src/utils/colorUtils.js +1 -0
- package/build/src/utils/domUtils.d.ts +3 -10
- package/build/src/utils/domUtils.js +1 -0
- package/build/src/utils/entityStore.js +1 -0
- package/build/src/utils/index.d.ts +1 -1
- package/build/src/utils/index.js +9 -8
- package/build/src/utils/makeEnum.js +1 -0
- package/build/src/utils/map.d.ts +4 -0
- package/build/src/utils/map.js +1 -0
- package/build/src/utils/mathUtils.d.ts +4 -0
- package/build/src/utils/mathUtils.js +3 -2
- package/build/src/utils/objectUtils.js +1 -0
- package/build/src/utils/rTree.d.ts +1 -1
- package/build/src/utils/rTree.js +1 -0
- package/build/src/utils/rTreeSplitStrategies.d.ts +2 -2
- package/build/src/utils/rTreeSplitStrategies.js +1 -0
- package/build/src/utils/set.js +1 -0
- package/build/src/utils/stackingUtils.d.ts +5 -1
- package/build/src/utils/stackingUtils.js +6 -5
- package/build/src/utils/transformAwareTranslator.d.ts +4 -0
- package/build/src/utils/transformAwareTranslator.js +1 -0
- package/build/src/utils/windowUtils.d.ts +4 -0
- package/build/src/utils/windowUtils.js +1 -0
- package/package.json +6 -5
- package/plottable.js +40761 -29021
- package/plottable.js.map +1 -1
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Time = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var d3 = require("d3");
|
|
9
10
|
var timeAxis_1 = require("../axes/timeAxis");
|
|
10
11
|
var quantitativeScale_1 = require("./quantitativeScale");
|
|
11
12
|
var Time = /** @class */ (function (_super) {
|
|
12
|
-
tslib_1.__extends(Time, _super);
|
|
13
|
+
(0, tslib_1.__extends)(Time, _super);
|
|
13
14
|
/**
|
|
14
15
|
* A Time Scale maps Date objects to numbers.
|
|
15
16
|
*
|
|
@@ -1 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2014-present Palantir Technologies
|
|
3
|
+
* @license MIT
|
|
4
|
+
*
|
|
5
|
+
* @fileoverview manually add d3-selection-multi to d3 default bundle. Most of this code is
|
|
6
|
+
* copied from d3-selection-multi@1.0.0.
|
|
7
|
+
* See https://github.com/d3/d3-selection-multi/issues/11 for why we have to do this
|
|
8
|
+
*/
|
|
1
9
|
export {};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.CallbackSet = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var set_1 = require("./set");
|
|
9
10
|
/**
|
|
@@ -12,7 +13,7 @@ var set_1 = require("./set");
|
|
|
12
13
|
* All callbacks should have the same signature.
|
|
13
14
|
*/
|
|
14
15
|
var CallbackSet = /** @class */ (function (_super) {
|
|
15
|
-
tslib_1.__extends(CallbackSet, _super);
|
|
16
|
+
(0, tslib_1.__extends)(CallbackSet, _super);
|
|
16
17
|
function CallbackSet() {
|
|
17
18
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
18
19
|
}
|
|
@@ -14,7 +14,7 @@ export declare function contains(parent: Element, child: Element): boolean;
|
|
|
14
14
|
* @param {d3.Selection} element
|
|
15
15
|
* @returns {SVGRed} The bounding box.
|
|
16
16
|
*/
|
|
17
|
-
export declare function elementBBox(element: SimpleSelection<any>): SVGRect
|
|
17
|
+
export declare function elementBBox(element: SimpleSelection<any>): Pick<SVGRect, "x" | "y" | "width" | "height">;
|
|
18
18
|
export declare function entityBounds(element: Element): IEntityBounds;
|
|
19
19
|
/**
|
|
20
20
|
* Screen refresh rate which is assumed to be 60fps
|
|
@@ -66,14 +66,7 @@ export declare function clientRectsOverlap(clientRectA: ClientRect, clientRectB:
|
|
|
66
66
|
* @param rect
|
|
67
67
|
* @param amount
|
|
68
68
|
*/
|
|
69
|
-
export declare function expandRect(rect: ClientRect, amount: number):
|
|
70
|
-
left: number;
|
|
71
|
-
top: number;
|
|
72
|
-
right: number;
|
|
73
|
-
bottom: number;
|
|
74
|
-
width: number;
|
|
75
|
-
height: number;
|
|
76
|
-
};
|
|
69
|
+
export declare function expandRect(rect: ClientRect, amount: number): ClientRect;
|
|
77
70
|
/**
|
|
78
71
|
* Returns true if and only if innerClientRect is inside outerClientRect.
|
|
79
72
|
*
|
|
@@ -94,7 +87,7 @@ export declare function clientRectInside(innerClientRect: ClientRect, outerClien
|
|
|
94
87
|
* @returns {boolean} True if the supplied coordinates or Ranges intersect or are
|
|
95
88
|
* contained by bbox, false otherwise.
|
|
96
89
|
*/
|
|
97
|
-
export declare function intersectsBBox(xValOrRange: number | Range, yValOrRange: number | Range, bbox: SVGRect, tolerance?: number): boolean;
|
|
90
|
+
export declare function intersectsBBox(xValOrRange: number | Range, yValOrRange: number | Range, bbox: Pick<SVGRect, "x" | "y" | "width" | "height">, tolerance?: number): boolean;
|
|
98
91
|
/**
|
|
99
92
|
* Returns an array containing all ancestor `HTMLElement`s, starting at the
|
|
100
93
|
* provided element and usually ending with the `<body>` element.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.getElementTransform = exports.getHtmlElementAncestors = exports.intersectsBBox = exports.clientRectInside = exports.expandRect = exports.clientRectsOverlap = exports.getScaleValues = exports.getRotate = exports.getTranslateValues = exports.elementHeight = exports.elementWidth = exports.requestAnimationFramePolyfill = exports.SCREEN_REFRESH_RATE_MILLISECONDS = exports.entityBounds = exports.elementBBox = exports.contains = void 0;
|
|
7
8
|
var d3 = require("d3");
|
|
8
9
|
var nativeMath = window.Math;
|
|
9
10
|
/**
|
|
@@ -9,7 +9,7 @@ import * as Math from "./mathUtils";
|
|
|
9
9
|
import * as RTree from "./rTree";
|
|
10
10
|
import * as Stacking from "./stackingUtils";
|
|
11
11
|
import * as Window from "./windowUtils";
|
|
12
|
-
export { Array, Color, DOM, Math, RTree, Stacking, Window };
|
|
12
|
+
export { Array, Color, DOM, Math, RTree, Stacking, Window, };
|
|
13
13
|
export * from "./bucket";
|
|
14
14
|
export * from "./callbackSet";
|
|
15
15
|
export * from "./coerceD3";
|
package/build/src/utils/index.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Window = exports.Stacking = exports.RTree = exports.Math = exports.DOM = exports.Color = exports.Array = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var Array = require("./arrayUtils");
|
|
9
10
|
exports.Array = Array;
|
|
@@ -19,11 +20,11 @@ var Stacking = require("./stackingUtils");
|
|
|
19
20
|
exports.Stacking = Stacking;
|
|
20
21
|
var Window = require("./windowUtils");
|
|
21
22
|
exports.Window = Window;
|
|
22
|
-
tslib_1.__exportStar(require("./bucket"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("./callbackSet"), exports);
|
|
24
|
-
tslib_1.__exportStar(require("./coerceD3"), exports);
|
|
25
|
-
tslib_1.__exportStar(require("./entityStore"), exports);
|
|
26
|
-
tslib_1.__exportStar(require("./map"), exports);
|
|
27
|
-
tslib_1.__exportStar(require("./objectUtils"), exports);
|
|
28
|
-
tslib_1.__exportStar(require("./set"), exports);
|
|
29
|
-
tslib_1.__exportStar(require("./transformAwareTranslator"), exports);
|
|
23
|
+
(0, tslib_1.__exportStar)(require("./bucket"), exports);
|
|
24
|
+
(0, tslib_1.__exportStar)(require("./callbackSet"), exports);
|
|
25
|
+
(0, tslib_1.__exportStar)(require("./coerceD3"), exports);
|
|
26
|
+
(0, tslib_1.__exportStar)(require("./entityStore"), exports);
|
|
27
|
+
(0, tslib_1.__exportStar)(require("./map"), exports);
|
|
28
|
+
(0, tslib_1.__exportStar)(require("./objectUtils"), exports);
|
|
29
|
+
(0, tslib_1.__exportStar)(require("./set"), exports);
|
|
30
|
+
(0, tslib_1.__exportStar)(require("./transformAwareTranslator"), exports);
|
package/build/src/utils/map.d.ts
CHANGED
package/build/src/utils/map.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.applyTransform = exports.invertMatrix = exports.multiplyTranslate = exports.premultiplyTranslate = exports.multiplyMatrix = exports.getCumulativeTransform = exports.boundsIntersects = exports.within = exports.degreesToRadians = exports.distanceSquared = exports.range = exports.isValidNumber = exports.isNaN = exports.min = exports.max = exports.clamp = exports.inRange = void 0;
|
|
7
8
|
var d3 = require("d3");
|
|
8
9
|
var domUtils_1 = require("./domUtils");
|
|
9
10
|
var nativeMath = window.Math;
|
|
@@ -132,13 +133,13 @@ exports.boundsIntersects = boundsIntersects;
|
|
|
132
133
|
* `transform-origin` values other than default ("50% 50%").
|
|
133
134
|
*/
|
|
134
135
|
function getCumulativeTransform(element) {
|
|
135
|
-
var elems = domUtils_1.getHtmlElementAncestors(element);
|
|
136
|
+
var elems = (0, domUtils_1.getHtmlElementAncestors)(element);
|
|
136
137
|
var transform = _IDENTITY_TRANSFORM;
|
|
137
138
|
var offsetParent = null;
|
|
138
139
|
for (var _i = 0, elems_1 = elems; _i < elems_1.length; _i++) {
|
|
139
140
|
var elem = elems_1[_i];
|
|
140
141
|
// apply css transform from any ancestor element
|
|
141
|
-
var elementTransform = domUtils_1.getElementTransform(elem);
|
|
142
|
+
var elementTransform = (0, domUtils_1.getElementTransform)(elem);
|
|
142
143
|
if (elementTransform != null) {
|
|
143
144
|
var midX = elem.clientWidth / 2;
|
|
144
145
|
var midY = elem.clientHeight / 2;
|
|
@@ -13,7 +13,7 @@ import { IRTreeSplitStrategy } from "./rTreeSplitStrategies";
|
|
|
13
13
|
export declare enum QueryPredicateResult {
|
|
14
14
|
PASS = 0,
|
|
15
15
|
FAIL = 1,
|
|
16
|
-
PASS_AND_OVERWRITE = 2
|
|
16
|
+
PASS_AND_OVERWRITE = 2
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Returns the absolute distance to the nearest point on the edge of bounds or 0
|
package/build/src/utils/rTree.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.RTreeBounds = exports.RTreeNode = exports.RTree = exports.createNodeSort = exports.createMinimizingNodePredicate = exports.QueryPredicateResult = void 0;
|
|
7
8
|
var rTreeSplitStrategies_1 = require("./rTreeSplitStrategies");
|
|
8
9
|
/**
|
|
9
10
|
* The maximum number of children in an r-tree node before we attempt to split.
|
|
@@ -15,10 +15,10 @@ export declare class SplitStrategyLinear implements IRTreeSplitStrategy {
|
|
|
15
15
|
/**
|
|
16
16
|
* Choose the two farthest-apart entries to begin the split.
|
|
17
17
|
*/
|
|
18
|
-
private chooseFirstSplit
|
|
18
|
+
private chooseFirstSplit;
|
|
19
19
|
/**
|
|
20
20
|
* Split the next entry. Choose the entry that expands its parent node's
|
|
21
21
|
* area the least.
|
|
22
22
|
*/
|
|
23
|
-
private addNext
|
|
23
|
+
private addNext;
|
|
24
24
|
}
|
package/build/src/utils/set.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2014-present Palantir Technologies
|
|
3
|
+
* @license MIT
|
|
4
|
+
*/
|
|
1
5
|
import { Dataset } from "../core/dataset";
|
|
2
6
|
import { IAccessor } from "../core/interfaces";
|
|
3
|
-
import { MemoizedFunction } from "lodash";
|
|
7
|
+
import type { MemoizedFunction } from "lodash";
|
|
4
8
|
import * as Utils from "./";
|
|
5
9
|
export declare type GenericStackedDatum<D> = {
|
|
6
10
|
value: number;
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.normalizeKey = exports.stackedExtent = exports.stackedExtents = exports.stack = exports.IStackingOrder = void 0;
|
|
7
8
|
var d3 = require("d3");
|
|
8
|
-
var
|
|
9
|
+
var lodash_es_1 = require("lodash-es");
|
|
9
10
|
var Utils = require("./");
|
|
10
11
|
var makeEnum_1 = require("./makeEnum");
|
|
11
12
|
/**
|
|
@@ -14,7 +15,7 @@ var makeEnum_1 = require("./makeEnum");
|
|
|
14
15
|
* can be reversed with the "topdown" option, which produces a stacking order
|
|
15
16
|
* that matches the order of series in the legend.
|
|
16
17
|
*/
|
|
17
|
-
exports.IStackingOrder = makeEnum_1.makeEnum(["topdown", "bottomup"]);
|
|
18
|
+
exports.IStackingOrder = (0, makeEnum_1.makeEnum)(["topdown", "bottomup"]);
|
|
18
19
|
var nativeMath = window.Math;
|
|
19
20
|
/**
|
|
20
21
|
* Computes the StackingResult (value and offset) for each data point in each Dataset.
|
|
@@ -42,7 +43,7 @@ function stack(datasets, keyAccessor, valueAccessor, stackingOrder) {
|
|
|
42
43
|
for (var index = 0; index < dataLen; index++) {
|
|
43
44
|
var datum = data[index];
|
|
44
45
|
var accessedKey = keyAccessor(datum, index, dataset);
|
|
45
|
-
var key = exports.normalizeKey(accessedKey);
|
|
46
|
+
var key = (0, exports.normalizeKey)(accessedKey);
|
|
46
47
|
var value = +valueAccessor(datum, index, dataset);
|
|
47
48
|
var offset = void 0;
|
|
48
49
|
var offsetMap = (value >= 0) ? positiveOffsets : negativeOffsets;
|
|
@@ -120,7 +121,7 @@ function stackedExtent(stackingResult, keyAccessor, filter) {
|
|
|
120
121
|
if (filter != null && !filter(datum, index, dataset)) {
|
|
121
122
|
continue;
|
|
122
123
|
}
|
|
123
|
-
var stackedDatum = stackedDatumMap.get(exports.normalizeKey(keyAccessor(datum, index, dataset)));
|
|
124
|
+
var stackedDatum = stackedDatumMap.get((0, exports.normalizeKey)(keyAccessor(datum, index, dataset)));
|
|
124
125
|
extents.push(stackedDatum.value + stackedDatum.offset);
|
|
125
126
|
}
|
|
126
127
|
});
|
|
@@ -135,6 +136,6 @@ exports.stackedExtent = stackedExtent;
|
|
|
135
136
|
* @param {any} key The key to be normalized
|
|
136
137
|
* @return {string} The stringified key
|
|
137
138
|
*/
|
|
138
|
-
exports.normalizeKey =
|
|
139
|
+
exports.normalizeKey = (0, lodash_es_1.memoize)(function (key) {
|
|
139
140
|
return String(key);
|
|
140
141
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.deprecated = exports.debounce = exports.setTimeout = exports.warn = void 0;
|
|
7
8
|
var Configs = require("../core/config");
|
|
8
9
|
/**
|
|
9
10
|
* Print a warning message to the console, if it is available.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plottable",
|
|
3
3
|
"description": "A modular charting library built on D3",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.12.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/chai": "^3.4.34",
|
|
34
34
|
"@types/d3-selection-multi": "1.0.4",
|
|
35
|
+
"@types/lodash": "^4.14.109",
|
|
36
|
+
"@types/lodash-es": "^4.17.3",
|
|
35
37
|
"@types/mocha": "^2.2.27",
|
|
36
38
|
"@types/sinon": "^1.16.36",
|
|
37
39
|
"awesome-typescript-loader": "^3.4.1",
|
|
@@ -54,7 +56,7 @@
|
|
|
54
56
|
"requirejs": "2.1.18",
|
|
55
57
|
"sinon": "^2.1.0",
|
|
56
58
|
"tslint": "5.18.0",
|
|
57
|
-
"typescript": "~
|
|
59
|
+
"typescript": "~4.4",
|
|
58
60
|
"webpack": "2.6.1",
|
|
59
61
|
"webpack-dev-server": "2.11.1",
|
|
60
62
|
"webpack-merge": "^4.1.0"
|
|
@@ -63,13 +65,12 @@
|
|
|
63
65
|
"@types/d3": "^4.13.0",
|
|
64
66
|
"@types/d3-shape": "^1.2.5",
|
|
65
67
|
"@types/is-plain-object": "^0.0.2",
|
|
66
|
-
"@types/lodash": "^4.14.109",
|
|
67
68
|
"d3": "^4.13.0",
|
|
68
69
|
"d3-ease": "^1.0.0",
|
|
69
70
|
"d3-shape": "^1.0.0",
|
|
70
71
|
"is-plain-object": "^2.0.4",
|
|
71
|
-
"lodash": "^4.17.
|
|
72
|
-
"tslib": "~
|
|
72
|
+
"lodash-es": "^4.17.15",
|
|
73
|
+
"tslib": "~2.3.1",
|
|
73
74
|
"typesettable": "4.1.0"
|
|
74
75
|
}
|
|
75
76
|
}
|