plottable 3.13.0 → 4.1.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/README.md +9 -2
- package/build/src/animators/easingAnimator.d.ts +2 -2
- package/build/src/animators/easingAnimator.js +1 -1
- package/build/src/animators/index.js +2 -2
- package/build/src/axes/axis.d.ts +1 -1
- package/build/src/axes/axis.js +5 -5
- package/build/src/axes/categoryAxis.js +8 -7
- package/build/src/axes/index.js +3 -3
- package/build/src/axes/numericAxis.js +1 -1
- package/build/src/axes/timeAxis.d.ts +5 -5
- package/build/src/axes/timeAxis.js +6 -6
- package/build/src/components/component.d.ts +4 -4
- package/build/src/components/component.js +4 -4
- package/build/src/components/componentContainer.js +1 -1
- package/build/src/components/dragBoxLayer.d.ts +1 -1
- package/build/src/components/dragBoxLayer.js +1 -1
- package/build/src/components/dragLineLayer.js +1 -1
- package/build/src/components/gridlines.js +1 -1
- package/build/src/components/group.js +1 -1
- package/build/src/components/guideLineLayer.js +1 -1
- package/build/src/components/index.js +14 -14
- package/build/src/components/interpolatedColorLegend.js +1 -1
- package/build/src/components/label.d.ts +1 -1
- package/build/src/components/label.js +3 -3
- package/build/src/components/legend.js +17 -9
- package/build/src/components/plotGroup.js +1 -1
- package/build/src/components/selectionBoxLayer.js +2 -2
- package/build/src/components/table.js +1 -1
- package/build/src/components/wrappedLabel.js +1 -1
- package/build/src/components/xDragBoxLayer.js +1 -1
- package/build/src/components/yDragBoxLayer.js +1 -1
- package/build/src/core/dataset.d.ts +1 -1
- package/build/src/core/formatters.d.ts +2 -2
- package/build/src/core/formatters.js +16 -13
- package/build/src/core/interfaces.d.ts +9 -9
- package/build/src/core/renderController.d.ts +1 -1
- package/build/src/core/renderController.js +6 -6
- package/build/src/core/symbolFactories.d.ts +2 -2
- package/build/src/core/symbolFactories.js +15 -15
- package/build/src/core/version.js +1 -1
- package/build/src/dispatchers/dispatcher.js +8 -1
- package/build/src/dispatchers/index.js +3 -3
- package/build/src/dispatchers/keyDispatcher.d.ts +1 -1
- package/build/src/dispatchers/keyDispatcher.js +1 -1
- package/build/src/dispatchers/mouseDispatcher.d.ts +1 -1
- package/build/src/dispatchers/mouseDispatcher.js +1 -1
- package/build/src/dispatchers/touchDispatcher.d.ts +1 -1
- package/build/src/dispatchers/touchDispatcher.js +1 -1
- package/build/src/drawers/arcDrawer.js +1 -1
- package/build/src/drawers/arcOutlineDrawer.js +1 -1
- package/build/src/drawers/areaDrawer.js +3 -3
- package/build/src/drawers/canvasBuffer.js +2 -2
- package/build/src/drawers/canvasDrawer.d.ts +1 -1
- package/build/src/drawers/canvasDrawer.js +8 -8
- package/build/src/drawers/drawStep.d.ts +2 -2
- package/build/src/drawers/index.js +11 -11
- package/build/src/drawers/lineDrawer.js +3 -3
- package/build/src/drawers/rectangleDrawer.js +2 -2
- package/build/src/drawers/segmentDrawer.js +1 -1
- package/build/src/drawers/symbolDrawer.js +3 -3
- package/build/src/index.js +14 -14
- package/build/src/interactions/clickInteraction.d.ts +1 -1
- package/build/src/interactions/clickInteraction.js +8 -1
- package/build/src/interactions/dragInteraction.d.ts +2 -2
- package/build/src/interactions/dragInteraction.js +7 -1
- package/build/src/interactions/index.js +5 -5
- package/build/src/interactions/interaction.d.ts +2 -1
- package/build/src/interactions/interaction.js +11 -1
- package/build/src/interactions/keyInteraction.d.ts +1 -1
- package/build/src/interactions/keyInteraction.js +8 -1
- package/build/src/interactions/panZoomConstraints.js +5 -6
- package/build/src/interactions/panZoomInteraction.d.ts +4 -4
- package/build/src/interactions/panZoomInteraction.js +15 -10
- package/build/src/interactions/pointerInteraction.d.ts +1 -1
- package/build/src/interactions/pointerInteraction.js +8 -1
- package/build/src/memoize/index.js +3 -3
- package/build/src/memoize/memThunk.d.ts +1 -1
- package/build/src/memoize/memThunk.js +1 -2
- package/build/src/memoize/memoize.d.ts +1 -1
- package/build/src/memoize/memoize.js +1 -2
- package/build/src/memoize/memoizeProjectors.js +2 -3
- package/build/src/memoize/signature.d.ts +1 -1
- package/build/src/memoize/signature.js +10 -10
- package/build/src/plots/areaPlot.js +4 -3
- package/build/src/plots/barPlot.d.ts +9 -3
- package/build/src/plots/barPlot.js +18 -6
- package/build/src/plots/clusteredBarPlot.js +1 -1
- package/build/src/plots/commons.js +1 -1
- package/build/src/plots/index.js +12 -12
- package/build/src/plots/linePlot.d.ts +2 -3
- package/build/src/plots/linePlot.js +3 -2
- package/build/src/plots/piePlot.js +4 -2
- package/build/src/plots/plot.d.ts +4 -2
- package/build/src/plots/plot.js +12 -10
- package/build/src/plots/rectanglePlot.d.ts +5 -0
- package/build/src/plots/rectanglePlot.js +14 -4
- package/build/src/plots/scatterPlot.d.ts +11 -0
- package/build/src/plots/scatterPlot.js +31 -4
- package/build/src/plots/segmentPlot.js +1 -1
- package/build/src/plots/stackedAreaPlot.js +5 -6
- package/build/src/plots/stackedBarPlot.js +4 -4
- package/build/src/plots/waterfallPlot.js +1 -1
- package/build/src/plots/xyPlot.js +4 -3
- package/build/src/scales/categoryScale.d.ts +1 -0
- package/build/src/scales/categoryScale.js +9 -6
- package/build/src/scales/colorScale.d.ts +4 -3
- package/build/src/scales/colorScale.js +50 -57
- package/build/src/scales/index.js +9 -9
- package/build/src/scales/interpolatedColorScale.js +11 -10
- package/build/src/scales/linearScale.js +3 -3
- package/build/src/scales/logScale.js +3 -3
- package/build/src/scales/modifiedLogScale.js +2 -2
- package/build/src/scales/quantitativeScale.js +1 -1
- package/build/src/scales/scale.d.ts +1 -1
- package/build/src/scales/tickGenerators.js +2 -3
- package/build/src/scales/timeScale.js +4 -4
- package/build/src/utils/arrayUtils.js +5 -7
- package/build/src/utils/callbackSet.js +1 -1
- package/build/src/utils/coerceD3.js +1 -2
- package/build/src/utils/colorUtils.js +3 -4
- package/build/src/utils/d3ShapeUtils.d.ts +11 -0
- package/build/src/utils/d3ShapeUtils.js +17 -0
- package/build/src/utils/domUtils.js +20 -20
- package/build/src/utils/entityStore.d.ts +6 -3
- package/build/src/utils/index.js +8 -8
- package/build/src/utils/makeEnum.js +1 -2
- package/build/src/utils/mathUtils.d.ts +2 -2
- package/build/src/utils/mathUtils.js +17 -18
- package/build/src/utils/objectUtils.js +1 -2
- package/build/src/utils/rTree.d.ts +12 -3
- package/build/src/utils/rTree.js +19 -7
- package/build/src/utils/rTreeSplitStrategies.d.ts +1 -1
- package/build/src/utils/stackingUtils.d.ts +6 -6
- package/build/src/utils/stackingUtils.js +40 -7
- package/build/src/utils/transformAwareTranslator.js +2 -2
- package/build/src/utils/windowUtils.js +4 -5
- package/package.json +15 -14
- package/plottable.css +4 -3
- package/plottable.js +18083 -18287
- package/plottable.js.map +1 -1
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.normalizeKey = exports.
|
|
8
|
-
|
|
7
|
+
exports.normalizeKey = exports.IStackingOrder = void 0;
|
|
8
|
+
exports.stack = stack;
|
|
9
|
+
exports.stackedExtents = stackedExtents;
|
|
10
|
+
exports.stackedExtent = stackedExtent;
|
|
9
11
|
var memoize_1 = require("lodash-es/memoize");
|
|
10
12
|
var Utils = require("./");
|
|
11
13
|
var makeEnum_1 = require("./makeEnum");
|
|
@@ -28,8 +30,8 @@ var nativeMath = window.Math;
|
|
|
28
30
|
*/
|
|
29
31
|
function stack(datasets, keyAccessor, valueAccessor, stackingOrder) {
|
|
30
32
|
if (stackingOrder === void 0) { stackingOrder = "bottomup"; }
|
|
31
|
-
var positiveOffsets =
|
|
32
|
-
var negativeOffsets =
|
|
33
|
+
var positiveOffsets = new Map();
|
|
34
|
+
var negativeOffsets = new Map();
|
|
33
35
|
var datasetToKeyToStackedDatum = new Utils.Map();
|
|
34
36
|
if (stackingOrder === "topdown") {
|
|
35
37
|
datasets = datasets.slice();
|
|
@@ -68,7 +70,6 @@ function stack(datasets, keyAccessor, valueAccessor, stackingOrder) {
|
|
|
68
70
|
}
|
|
69
71
|
return datasetToKeyToStackedDatum;
|
|
70
72
|
}
|
|
71
|
-
exports.stack = stack;
|
|
72
73
|
/**
|
|
73
74
|
* Computes the maximum and minimum extents of each stack individually.
|
|
74
75
|
*
|
|
@@ -102,7 +103,6 @@ function stackedExtents(stackingResult) {
|
|
|
102
103
|
});
|
|
103
104
|
return { maximumExtents: maximumExtents, minimumExtents: minimumExtents };
|
|
104
105
|
}
|
|
105
|
-
exports.stackedExtents = stackedExtents;
|
|
106
106
|
/**
|
|
107
107
|
* Computes the total extent over all data points in all Datasets, taking stacking into consideration.
|
|
108
108
|
*
|
|
@@ -129,7 +129,39 @@ function stackedExtent(stackingResult, keyAccessor, filter) {
|
|
|
129
129
|
var minStackExtent = Utils.Math.min(extents, 0);
|
|
130
130
|
return [nativeMath.min(minStackExtent, 0), nativeMath.max(0, maxStackExtent)];
|
|
131
131
|
}
|
|
132
|
-
|
|
132
|
+
/**
|
|
133
|
+
* A lodash `MapCache` backed by a `WeakMap`, so each cached string is
|
|
134
|
+
* released once its key object (such as a `Date`) is garbage collected.
|
|
135
|
+
* Primitive keys are never cached: a `WeakMap` cannot hold them, and
|
|
136
|
+
* `String()` on a primitive costs no more than a cache lookup.
|
|
137
|
+
*/
|
|
138
|
+
var WeakKeyCache = /** @class */ (function () {
|
|
139
|
+
function WeakKeyCache() {
|
|
140
|
+
this.map = new WeakMap();
|
|
141
|
+
}
|
|
142
|
+
WeakKeyCache.prototype.get = function (key) {
|
|
143
|
+
return this.isObjectKey(key) ? this.map.get(key) : undefined;
|
|
144
|
+
};
|
|
145
|
+
WeakKeyCache.prototype.has = function (key) {
|
|
146
|
+
return this.isObjectKey(key) && this.map.has(key);
|
|
147
|
+
};
|
|
148
|
+
WeakKeyCache.prototype.set = function (key, value) {
|
|
149
|
+
if (this.isObjectKey(key)) {
|
|
150
|
+
this.map.set(key, value);
|
|
151
|
+
}
|
|
152
|
+
return this;
|
|
153
|
+
};
|
|
154
|
+
WeakKeyCache.prototype.delete = function (key) {
|
|
155
|
+
return this.isObjectKey(key) && this.map.delete(key);
|
|
156
|
+
};
|
|
157
|
+
WeakKeyCache.prototype.clear = function () {
|
|
158
|
+
this.map = new WeakMap();
|
|
159
|
+
};
|
|
160
|
+
WeakKeyCache.prototype.isObjectKey = function (key) {
|
|
161
|
+
return typeof key === "object" && key !== null;
|
|
162
|
+
};
|
|
163
|
+
return WeakKeyCache;
|
|
164
|
+
}());
|
|
133
165
|
/**
|
|
134
166
|
* Normalizes a key used for stacking
|
|
135
167
|
*
|
|
@@ -139,3 +171,4 @@ exports.stackedExtent = stackedExtent;
|
|
|
139
171
|
exports.normalizeKey = (0, memoize_1.default)(function (key) {
|
|
140
172
|
return String(key);
|
|
141
173
|
});
|
|
174
|
+
exports.normalizeKey.cache = new WeakKeyCache();
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.Translator =
|
|
7
|
+
exports.Translator = void 0;
|
|
8
|
+
exports.getTranslator = getTranslator;
|
|
8
9
|
var Utils = require("../utils");
|
|
9
10
|
var _TRANSLATOR_KEY = "__Plottable_ClientTranslator";
|
|
10
11
|
/**
|
|
@@ -19,7 +20,6 @@ function getTranslator(component) {
|
|
|
19
20
|
}
|
|
20
21
|
return translator;
|
|
21
22
|
}
|
|
22
|
-
exports.getTranslator = getTranslator;
|
|
23
23
|
/**
|
|
24
24
|
* The translator implements CSS transform aware position measuring. We manually
|
|
25
25
|
* compute a cumulative CSS3 of the root element ancestors up to `<body>`.
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.warn = warn;
|
|
8
|
+
exports.setTimeout = setTimeout;
|
|
9
|
+
exports.debounce = debounce;
|
|
10
|
+
exports.deprecated = deprecated;
|
|
8
11
|
var Configs = require("../core/config");
|
|
9
12
|
/**
|
|
10
13
|
* Print a warning message to the console, if it is available.
|
|
@@ -18,7 +21,6 @@ function warn(warning) {
|
|
|
18
21
|
// tslint:disable-next-line:no-console
|
|
19
22
|
console.warn(warning);
|
|
20
23
|
}
|
|
21
|
-
exports.warn = warn;
|
|
22
24
|
/**
|
|
23
25
|
* Is like setTimeout, but activates synchronously if time=0
|
|
24
26
|
* We special case 0 because of an observed issue where calling setTimeout causes visible flickering.
|
|
@@ -40,7 +42,6 @@ function setTimeout(f, time) {
|
|
|
40
42
|
return window.setTimeout(f, time, args);
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
|
-
exports.setTimeout = setTimeout;
|
|
44
45
|
/**
|
|
45
46
|
* Debounces the supplied callback and returns a function with the same
|
|
46
47
|
* arguments.
|
|
@@ -68,7 +69,6 @@ function debounce(msec, callback, context) {
|
|
|
68
69
|
timeoutToken = setTimeout(deferredCallback, msec);
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
|
-
exports.debounce = debounce;
|
|
72
72
|
/**
|
|
73
73
|
* Sends a deprecation warning to the console. The warning includes the name of the deprecated method,
|
|
74
74
|
* version number of the deprecation, and an optional message.
|
|
@@ -84,4 +84,3 @@ function deprecated(callingMethod, version, message) {
|
|
|
84
84
|
warn("Method " + callingMethod + " has been deprecated in version " + version +
|
|
85
85
|
". Please refer to the release notes. " + message);
|
|
86
86
|
}
|
|
87
|
-
exports.deprecated = deprecated;
|
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": "
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,13 +21,15 @@
|
|
|
21
21
|
"lint": "npm-run-all lint:tslint lint:eslint",
|
|
22
22
|
"lint:eslint": "grunt eslint",
|
|
23
23
|
"lint:tslint": "tslint --project tsconfig.json",
|
|
24
|
-
"start": "npm-run-all -p start:update-quicktests start:watch-tsc start:watch-quicktests start:webpack
|
|
24
|
+
"start": "npm-run-all -p start:update-quicktests start:watch-tsc start:watch-quicktests start:watch-webpack start:server",
|
|
25
|
+
"start:server": "grunt connect:server:keepalive",
|
|
25
26
|
"start:update-quicktests": "grunt update-quicktests",
|
|
26
27
|
"start:watch-quicktests": "grunt watch-quicktests",
|
|
27
28
|
"start:watch-tsc": "tsc -w -p .",
|
|
28
|
-
"start:webpack
|
|
29
|
+
"start:watch-webpack": "webpack --watch",
|
|
29
30
|
"test": "grunt test-local",
|
|
30
|
-
"test:ci": "grunt test-ci"
|
|
31
|
+
"test:ci": "grunt test-ci",
|
|
32
|
+
"test:browser": "node scripts/test-browser.js"
|
|
31
33
|
},
|
|
32
34
|
"devDependencies": {
|
|
33
35
|
"@types/chai": "^3.4.34",
|
|
@@ -38,9 +40,8 @@
|
|
|
38
40
|
"@types/sinon": "^1.16.36",
|
|
39
41
|
"awesome-typescript-loader": "^3.4.1",
|
|
40
42
|
"chai": "2.0.0",
|
|
41
|
-
"circle-github-bot": "1.0
|
|
43
|
+
"circle-github-bot": "^2.1.0",
|
|
42
44
|
"grunt": "~0.4.5",
|
|
43
|
-
"grunt-blanket-mocha": "^1.0.0",
|
|
44
45
|
"grunt-bump": "0.7.0",
|
|
45
46
|
"grunt-cli": "0.1.13",
|
|
46
47
|
"grunt-contrib-connect": "0.11.2",
|
|
@@ -48,29 +49,29 @@
|
|
|
48
49
|
"grunt-eslint": "17.3.1",
|
|
49
50
|
"grunt-exec": "1.0.1",
|
|
50
51
|
"grunt-jscs": "2.6.0",
|
|
51
|
-
"grunt-saucelabs": "8.6.2",
|
|
52
52
|
"jquery": "^3.3.1",
|
|
53
53
|
"load-grunt-tasks": "3.4.0",
|
|
54
54
|
"mocha": "2.2.5",
|
|
55
55
|
"npm-run-all": "4.0.1",
|
|
56
|
+
"playwright": "^1.58.2",
|
|
56
57
|
"requirejs": "2.1.18",
|
|
57
58
|
"sinon": "^2.1.0",
|
|
58
59
|
"tslint": "5.18.0",
|
|
59
|
-
"typescript": "~
|
|
60
|
+
"typescript": "~5.9.3",
|
|
60
61
|
"webpack": "2.6.1",
|
|
61
|
-
"webpack-dev-server": "2.11.1",
|
|
62
62
|
"webpack-merge": "^4.1.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@types/d3": "^4.
|
|
66
|
-
"@types/d3-shape": "^1.2.5",
|
|
65
|
+
"@types/d3": "^7.4.3",
|
|
67
66
|
"@types/is-plain-object": "^0.0.2",
|
|
68
|
-
"d3": "^
|
|
69
|
-
"d3-
|
|
70
|
-
"d3-shape": "^1.0.0",
|
|
67
|
+
"d3": "^7.9.0",
|
|
68
|
+
"d3-color": "^3.1.0",
|
|
71
69
|
"is-plain-object": "^2.0.4",
|
|
72
70
|
"lodash-es": "^4.17.15",
|
|
73
71
|
"tslib": "~2.3.1",
|
|
74
72
|
"typesettable": "4.1.0"
|
|
73
|
+
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": ">=22.12.0"
|
|
75
76
|
}
|
|
76
77
|
}
|
package/plottable.css
CHANGED
|
@@ -112,9 +112,10 @@
|
|
|
112
112
|
fill: #32313F;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
.plottable .
|
|
117
|
-
.plottable .
|
|
115
|
+
/* No label-12 rule, so consumer CSS can override the default size */
|
|
116
|
+
.plottable .tick-label-container text,
|
|
117
|
+
.plottable .bar-label-text-area text,
|
|
118
|
+
.plottable .scatter-label-text-area text {
|
|
118
119
|
font-size: 12px;
|
|
119
120
|
}
|
|
120
121
|
|