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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.memoizeProjectors = exports.memoizeProjector = void 0;
|
|
4
|
+
var lodash_es_1 = require("lodash-es");
|
|
4
5
|
/**
|
|
5
6
|
* An index that stores values by numeric key.
|
|
6
7
|
*
|
|
@@ -63,7 +64,7 @@ var DatasetIndexCache = /** @class */ (function () {
|
|
|
63
64
|
return DatasetIndexCache;
|
|
64
65
|
}());
|
|
65
66
|
function memoizeProjector(projector) {
|
|
66
|
-
var memo =
|
|
67
|
+
var memo = (0, lodash_es_1.memoize)(projector, DatasetIndexCache.resolver);
|
|
67
68
|
memo.cache = new DatasetIndexCache();
|
|
68
69
|
return memo;
|
|
69
70
|
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2014-present Palantir Technologies
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @fileoverview Implements the Signature API to help in comparing when two
|
|
5
|
+
* Plottable objects have "changed".
|
|
6
|
+
*
|
|
7
|
+
* Memoization in Plottable is complicated by mutable scales and datasets. We cannot simply
|
|
8
|
+
* reference compare two e.g. scales since it may have internally mutated. To resolve this,
|
|
9
|
+
* we write a recursive Signature interface that holds an immutable snapshot of whatever
|
|
10
|
+
* state the scale/data was in at the time. Then on memoized function invocation we sign the
|
|
11
|
+
* new inputs and compare the signatures to decide if we should recompute.
|
|
12
|
+
*
|
|
13
|
+
* We must hand-write a signature for each custom class we wish to support.
|
|
14
|
+
*/
|
|
1
15
|
import { Dataset } from "../core/dataset";
|
|
2
16
|
import { Scale } from "../scales/scale";
|
|
3
17
|
/**
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* We must hand-write a signature for each custom class we wish to support.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ObjectSignature = exports.ReferenceSignature = exports.ArraySignature = exports.Signature = exports.signObj = exports.signArray = exports.signRef = exports.signDataset = exports.signScale = exports.sign = void 0;
|
|
17
18
|
var tslib_1 = require("tslib");
|
|
18
19
|
var isPlainObject = require("is-plain-object");
|
|
19
20
|
var dataset_1 = require("../core/dataset");
|
|
@@ -119,7 +120,7 @@ exports.Signature = Signature;
|
|
|
119
120
|
* A signature for an array.
|
|
120
121
|
*/
|
|
121
122
|
var ArraySignature = /** @class */ (function (_super) {
|
|
122
|
-
tslib_1.__extends(ArraySignature, _super);
|
|
123
|
+
(0, tslib_1.__extends)(ArraySignature, _super);
|
|
123
124
|
function ArraySignature(array) {
|
|
124
125
|
var _this = _super.call(this) || this;
|
|
125
126
|
_this.array = array;
|
|
@@ -145,7 +146,7 @@ var ArraySignature = /** @class */ (function (_super) {
|
|
|
145
146
|
}(Signature));
|
|
146
147
|
exports.ArraySignature = ArraySignature;
|
|
147
148
|
var ReferenceSignature = /** @class */ (function (_super) {
|
|
148
|
-
tslib_1.__extends(ReferenceSignature, _super);
|
|
149
|
+
(0, tslib_1.__extends)(ReferenceSignature, _super);
|
|
149
150
|
function ReferenceSignature(ref) {
|
|
150
151
|
var _this = _super.call(this) || this;
|
|
151
152
|
_this.ref = ref;
|
|
@@ -161,7 +162,7 @@ exports.ReferenceSignature = ReferenceSignature;
|
|
|
161
162
|
* A signature for a plain js object.
|
|
162
163
|
*/
|
|
163
164
|
var ObjectSignature = /** @class */ (function (_super) {
|
|
164
|
-
tslib_1.__extends(ObjectSignature, _super);
|
|
165
|
+
(0, tslib_1.__extends)(ObjectSignature, _super);
|
|
165
166
|
function ObjectSignature(obj) {
|
|
166
167
|
var _this = _super.call(this) || this;
|
|
167
168
|
_this.obj = obj;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2014-present Palantir Technologies
|
|
3
|
+
* @license MIT
|
|
4
|
+
*/
|
|
1
5
|
import { Dataset } from "../core/dataset";
|
|
2
6
|
import { AttributeToProjector, IAccessor, Projector, SimpleSelection } from "../core/interfaces";
|
|
3
7
|
import { QuantitativeScale } from "../scales/quantitativeScale";
|
|
@@ -34,8 +38,8 @@ export declare class Area<X> extends Line<X> {
|
|
|
34
38
|
protected _createNodesForDataset(dataset: Dataset): Drawers.ProxyDrawer;
|
|
35
39
|
protected _removeDatasetNodes(dataset: Dataset): void;
|
|
36
40
|
protected _additionalPaint(): void;
|
|
37
|
-
private _generateLineDrawSteps
|
|
38
|
-
private _generateLineAttrToProjector
|
|
41
|
+
private _generateLineDrawSteps;
|
|
42
|
+
private _generateLineAttrToProjector;
|
|
39
43
|
protected _createDrawer(dataset: Dataset): Drawers.ProxyDrawer;
|
|
40
44
|
protected _generateDrawSteps(): Drawers.DrawStep[];
|
|
41
45
|
protected _updateYScale(): void;
|
|
@@ -44,7 +48,7 @@ export declare class Area<X> extends Line<X> {
|
|
|
44
48
|
protected _propertyProjectors(): AttributeToProjector;
|
|
45
49
|
selections(datasets?: Dataset[]): SimpleSelection<any>;
|
|
46
50
|
protected _constructAreaProjector(xProjector: Projector, yProjector: Projector, y0Projector: Projector): (datum: any[], index: number, dataset: Dataset) => string;
|
|
47
|
-
private _createDefinedProjector
|
|
48
|
-
private _createAreaGenerator
|
|
49
|
-
private _createTopLineGenerator
|
|
51
|
+
private _createDefinedProjector;
|
|
52
|
+
private _createAreaGenerator;
|
|
53
|
+
private _createTopLineGenerator;
|
|
50
54
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Area = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var d3 = require("d3");
|
|
9
10
|
var Scales = require("../scales");
|
|
@@ -16,7 +17,7 @@ var Plots = require("./");
|
|
|
16
17
|
var linePlot_1 = require("./linePlot");
|
|
17
18
|
var plot_1 = require("./plot");
|
|
18
19
|
var Area = /** @class */ (function (_super) {
|
|
19
|
-
tslib_1.__extends(Area, _super);
|
|
20
|
+
(0, tslib_1.__extends)(Area, _super);
|
|
20
21
|
/**
|
|
21
22
|
* An Area Plot draws a filled region (area) between Y and Y0.
|
|
22
23
|
*
|
|
@@ -67,7 +68,7 @@ var Area = /** @class */ (function (_super) {
|
|
|
67
68
|
};
|
|
68
69
|
Area.prototype._addDataset = function (dataset) {
|
|
69
70
|
var _this = this;
|
|
70
|
-
this._lineDrawers.set(dataset, new Drawers.ProxyDrawer(function () { return new lineDrawer_1.LineSVGDrawer(); }, function (ctx) { return new Drawers.CanvasDrawer(ctx, lineDrawer_1.makeLineCanvasDrawStep(function () {
|
|
71
|
+
this._lineDrawers.set(dataset, new Drawers.ProxyDrawer(function () { return new lineDrawer_1.LineSVGDrawer(); }, function (ctx) { return new Drawers.CanvasDrawer(ctx, (0, lineDrawer_1.makeLineCanvasDrawStep)(function () {
|
|
71
72
|
var xProjector = plot_1.Plot._scaledAccessor(_this.x());
|
|
72
73
|
var yProjector = plot_1.Plot._scaledAccessor(_this.y());
|
|
73
74
|
return _this._d3LineFactory(dataset, xProjector, yProjector);
|
|
@@ -120,7 +121,7 @@ var Area = /** @class */ (function (_super) {
|
|
|
120
121
|
Area.prototype._createDrawer = function (dataset) {
|
|
121
122
|
var _this = this;
|
|
122
123
|
return new drawer_1.ProxyDrawer(function () { return new areaDrawer_1.AreaSVGDrawer(); }, function (ctx) {
|
|
123
|
-
return new Drawers.CanvasDrawer(ctx, areaDrawer_1.makeAreaCanvasDrawStep(function () {
|
|
124
|
+
return new Drawers.CanvasDrawer(ctx, (0, areaDrawer_1.makeAreaCanvasDrawStep)(function () {
|
|
124
125
|
var _a = _this._coordinateProjectors(), xProjector = _a[0], yProjector = _a[1], y0Projector = _a[2];
|
|
125
126
|
var definedProjector = _this._createDefinedProjector(xProjector, yProjector);
|
|
126
127
|
return _this._createAreaGenerator(xProjector, yProjector, y0Projector, definedProjector, dataset);
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2014-present Palantir Technologies
|
|
3
|
+
* @license MIT
|
|
4
|
+
*/
|
|
1
5
|
import { LabelFontSizePx } from "../components/label";
|
|
2
6
|
import { Dataset } from "../core/dataset";
|
|
3
7
|
import { DatumFormatter } from "../core/formatters";
|
|
@@ -15,15 +19,15 @@ export declare const BarOrientation: {
|
|
|
15
19
|
};
|
|
16
20
|
export declare type BarOrientation = keyof typeof BarOrientation;
|
|
17
21
|
export declare const LabelsPosition: {
|
|
18
|
-
start: "start";
|
|
19
22
|
end: "end";
|
|
23
|
+
start: "start";
|
|
20
24
|
middle: "middle";
|
|
21
25
|
outside: "outside";
|
|
22
26
|
};
|
|
23
27
|
export declare type LabelsPosition = keyof typeof LabelsPosition;
|
|
24
28
|
export declare const BarAlignment: {
|
|
25
|
-
start: "start";
|
|
26
29
|
end: "end";
|
|
30
|
+
start: "start";
|
|
27
31
|
middle: "middle";
|
|
28
32
|
};
|
|
29
33
|
export declare type BarAlignment = keyof typeof BarAlignment;
|
|
@@ -211,8 +215,8 @@ export declare class Bar<X, Y> extends XYPlot<X, Y> {
|
|
|
211
215
|
entitiesInBounds(queryBounds: IEntityBounds): Plots.IPlotEntity[];
|
|
212
216
|
entitiesInXBounds(queryBounds: IEntityBounds): Plots.IPlotEntity[];
|
|
213
217
|
entitiesInYBounds(queryBounds: IEntityBounds): Plots.IPlotEntity[];
|
|
214
|
-
private _entitiesIntersecting
|
|
215
|
-
private _updateLengthScale
|
|
218
|
+
private _entitiesIntersecting;
|
|
219
|
+
private _updateLengthScale;
|
|
216
220
|
renderImmediately(): this;
|
|
217
221
|
protected _additionalPaint(time: number): void;
|
|
218
222
|
/**
|
|
@@ -225,37 +229,27 @@ export declare class Bar<X, Y> extends XYPlot<X, Y> {
|
|
|
225
229
|
*/
|
|
226
230
|
protected _getPositionAttr(position: number, thickness: number): number;
|
|
227
231
|
protected _drawLabels(): void;
|
|
228
|
-
private _drawLabel
|
|
232
|
+
private _drawLabel;
|
|
229
233
|
/**
|
|
230
234
|
* Labels are "on-bar" by default, but if the bar is not long enough to fit the text,
|
|
231
235
|
* we can try putting the label "off-bar", if there's enough space outside of the bar
|
|
232
236
|
* to fit it.
|
|
233
237
|
*/
|
|
234
|
-
private _shouldShowLabelOnBar
|
|
235
|
-
private _calculateLabelProperties
|
|
236
|
-
private _createLabelContainer
|
|
238
|
+
private _shouldShowLabelOnBar;
|
|
239
|
+
private _calculateLabelProperties;
|
|
240
|
+
private _createLabelContainer;
|
|
237
241
|
protected _generateDrawSteps(): Drawers.DrawStep[];
|
|
238
242
|
protected _generateAttrToProjector(): AttributeToProjector;
|
|
239
243
|
protected _updateThicknessAttr(): void;
|
|
240
|
-
private _barPixelThickness
|
|
244
|
+
private _barPixelThickness;
|
|
241
245
|
entities(datasets?: Dataset[]): IPlotEntity[];
|
|
242
|
-
protected _entityBounds(entity: Plots.IPlotEntity | Plots.ILightweightPlotEntity):
|
|
243
|
-
x: any;
|
|
244
|
-
y: any;
|
|
245
|
-
width: any;
|
|
246
|
-
height: any;
|
|
247
|
-
};
|
|
246
|
+
protected _entityBounds(entity: Plots.IPlotEntity | Plots.ILightweightPlotEntity): Pick<DOMRect, "height" | "width" | "x" | "y">;
|
|
248
247
|
/**
|
|
249
248
|
* The rectangular bounds of a bar. Note that the x/y coordinates are not the
|
|
250
249
|
* same as the "pixel point" because they are always at the top/left of the
|
|
251
250
|
* bar.
|
|
252
251
|
*/
|
|
253
|
-
protected _pixelBounds(datum: any, index: number, dataset: Dataset):
|
|
254
|
-
x: any;
|
|
255
|
-
y: any;
|
|
256
|
-
width: any;
|
|
257
|
-
height: any;
|
|
258
|
-
};
|
|
252
|
+
protected _pixelBounds(datum: any, index: number, dataset: Dataset): Pick<DOMRect, "x" | "y" | "width" | "height">;
|
|
259
253
|
/**
|
|
260
254
|
* The "pixel point" of a bar is the farthest point from the baseline.
|
|
261
255
|
*
|
|
@@ -264,7 +258,7 @@ export declare class Bar<X, Y> extends XYPlot<X, Y> {
|
|
|
264
258
|
* point will be at the bottom of the bar.
|
|
265
259
|
*/
|
|
266
260
|
protected _pixelPoint(datum: any, index: number, dataset: Dataset): Point;
|
|
267
|
-
private _pixelPointBar
|
|
261
|
+
private _pixelPointBar;
|
|
268
262
|
protected _uninstallScaleForKey(scale: Scale<any, number>, key: string): void;
|
|
269
263
|
protected _getDataToDraw(): Utils.Map<Dataset, any[]>;
|
|
270
264
|
protected _isDatumOnScreen(attrToProjector: AttributeToProjector, plotWidth: number, plotHeight: number, d: any, i: number, dataset: Dataset): boolean;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Bar = exports.BarAlignment = exports.LabelsPosition = exports.BarOrientation = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var d3 = require("d3");
|
|
9
10
|
var Typesettable = require("typesettable");
|
|
@@ -21,11 +22,11 @@ var makeEnum_1 = require("../utils/makeEnum");
|
|
|
21
22
|
var Plots = require("./");
|
|
22
23
|
var plot_1 = require("./plot");
|
|
23
24
|
var xyPlot_1 = require("./xyPlot");
|
|
24
|
-
exports.BarOrientation = makeEnum_1.makeEnum(["vertical", "horizontal"]);
|
|
25
|
-
exports.LabelsPosition = makeEnum_1.makeEnum(["start", "middle", "end", "outside"]);
|
|
26
|
-
exports.BarAlignment = makeEnum_1.makeEnum(["start", "middle", "end"]);
|
|
25
|
+
exports.BarOrientation = (0, makeEnum_1.makeEnum)(["vertical", "horizontal"]);
|
|
26
|
+
exports.LabelsPosition = (0, makeEnum_1.makeEnum)(["start", "middle", "end", "outside"]);
|
|
27
|
+
exports.BarAlignment = (0, makeEnum_1.makeEnum)(["start", "middle", "end"]);
|
|
27
28
|
var Bar = /** @class */ (function (_super) {
|
|
28
|
-
tslib_1.__extends(Bar, _super);
|
|
29
|
+
(0, tslib_1.__extends)(Bar, _super);
|
|
29
30
|
/**
|
|
30
31
|
* A Bar Plot draws bars growing out from a baseline to some value
|
|
31
32
|
*
|
|
@@ -41,7 +42,7 @@ var Bar = /** @class */ (function (_super) {
|
|
|
41
42
|
_this._labelFontSize = label_1.Label._DEFAULT_FONT_SIZE_PX;
|
|
42
43
|
_this._hideBarsIfAnyAreTooWide = true;
|
|
43
44
|
_this._barAlignment = "middle";
|
|
44
|
-
_this._computeBarPixelThickness = memoize_1.memoize(computeBarPixelThickness);
|
|
45
|
+
_this._computeBarPixelThickness = (0, memoize_1.memoize)(computeBarPixelThickness);
|
|
45
46
|
/**
|
|
46
47
|
* Whether all the bars in this barPlot have the same pixel thickness.
|
|
47
48
|
* If so, use the _barPixelThickness property to access the thickness.
|
|
@@ -16,10 +16,8 @@ export declare class ClusteredBar<X, Y> extends Bar<X, Y> {
|
|
|
16
16
|
* @param {string} [orientation="vertical"] One of "vertical"/"horizontal".
|
|
17
17
|
*/
|
|
18
18
|
constructor(orientation?: BarOrientation);
|
|
19
|
-
protected _generateAttrToProjector():
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
private _updateClusterPosition();
|
|
23
|
-
private _makeInnerScale();
|
|
19
|
+
protected _generateAttrToProjector(): import("..").AttributeToProjector;
|
|
20
|
+
private _updateClusterPosition;
|
|
21
|
+
private _makeInnerScale;
|
|
24
22
|
protected _getDataToDraw(): Utils.Map<Dataset, any[]>;
|
|
25
23
|
}
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ClusteredBar = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var Scales = require("../scales");
|
|
9
10
|
var Utils = require("../utils");
|
|
10
11
|
var barPlot_1 = require("./barPlot");
|
|
11
12
|
var plot_1 = require("./plot");
|
|
12
13
|
var ClusteredBar = /** @class */ (function (_super) {
|
|
13
|
-
tslib_1.__extends(ClusteredBar, _super);
|
|
14
|
+
(0, tslib_1.__extends)(ClusteredBar, _super);
|
|
14
15
|
/**
|
|
15
16
|
* A ClusteredBar Plot groups bars across Datasets based on the primary value of the bars.
|
|
16
17
|
* On a vertical ClusteredBar Plot, the bars with the same X value are grouped.
|
package/build/src/plots/index.js
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
|
-
tslib_1.__exportStar(require("./areaPlot"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./barPlot"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./commons"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./clusteredBarPlot"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./linePlot"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./piePlot"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./rectanglePlot"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./scatterPlot"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./segmentPlot"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./stackedAreaPlot"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./stackedBarPlot"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./waterfallPlot"), exports);
|
|
8
|
+
(0, tslib_1.__exportStar)(require("./areaPlot"), exports);
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./barPlot"), exports);
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./commons"), exports);
|
|
11
|
+
(0, tslib_1.__exportStar)(require("./clusteredBarPlot"), exports);
|
|
12
|
+
(0, tslib_1.__exportStar)(require("./linePlot"), exports);
|
|
13
|
+
(0, tslib_1.__exportStar)(require("./piePlot"), exports);
|
|
14
|
+
(0, tslib_1.__exportStar)(require("./rectanglePlot"), exports);
|
|
15
|
+
(0, tslib_1.__exportStar)(require("./scatterPlot"), exports);
|
|
16
|
+
(0, tslib_1.__exportStar)(require("./segmentPlot"), exports);
|
|
17
|
+
(0, tslib_1.__exportStar)(require("./stackedAreaPlot"), exports);
|
|
18
|
+
(0, tslib_1.__exportStar)(require("./stackedBarPlot"), exports);
|
|
19
|
+
(0, tslib_1.__exportStar)(require("./waterfallPlot"), exports);
|
|
@@ -62,7 +62,7 @@ export declare class Line<X> extends XYPlot<X, number> {
|
|
|
62
62
|
* and deactivating the nice domain feature on the scales
|
|
63
63
|
*/
|
|
64
64
|
autorangeSmooth(autorangeSmooth: boolean): this;
|
|
65
|
-
private _setScaleSnapping
|
|
65
|
+
private _setScaleSnapping;
|
|
66
66
|
/**
|
|
67
67
|
* Gets the curve function associated with the plot.
|
|
68
68
|
*
|
|
@@ -118,7 +118,7 @@ export declare class Line<X> extends XYPlot<X, number> {
|
|
|
118
118
|
collapseDenseLinesEnabled(collapseDenseLines: boolean): this;
|
|
119
119
|
protected _createDrawer(dataset: Dataset): Drawers.ProxyDrawer;
|
|
120
120
|
protected getExtentsForProperty(property: string): any[][];
|
|
121
|
-
private _getEdgeIntersectionPoints
|
|
121
|
+
private _getEdgeIntersectionPoints;
|
|
122
122
|
protected _getResetYFunction(): (d: any, i: number, dataset: Dataset) => number;
|
|
123
123
|
protected _generateDrawSteps(): Drawers.DrawStep[];
|
|
124
124
|
protected _generateAttrToProjector(): AttributeToProjector;
|
|
@@ -149,8 +149,8 @@ export declare class Line<X> extends XYPlot<X, number> {
|
|
|
149
149
|
* @private
|
|
150
150
|
*/
|
|
151
151
|
protected _getDataToDraw(): Utils.Map<Dataset, any[]>;
|
|
152
|
-
private _filterCroppedRendering
|
|
153
|
-
private _filterDownsampling
|
|
152
|
+
private _filterCroppedRendering;
|
|
153
|
+
private _filterDownsampling;
|
|
154
154
|
/**
|
|
155
155
|
* Collapse line geometry
|
|
156
156
|
*
|
|
@@ -158,7 +158,7 @@ export declare class Line<X> extends XYPlot<X, number> {
|
|
|
158
158
|
* we can save a lot of render time by just drawing one line from the min to
|
|
159
159
|
* max y-coordinate of all those points.
|
|
160
160
|
*/
|
|
161
|
-
private _filterDenseLines
|
|
161
|
+
private _filterDenseLines;
|
|
162
162
|
/**
|
|
163
163
|
* Iterates over the line points collapsing points that fall on the same
|
|
164
164
|
* floored x coordinate.
|
|
@@ -170,5 +170,5 @@ export declare class Line<X> extends XYPlot<X, number> {
|
|
|
170
170
|
* also drawn. This allows lines with no collapsed segments to render
|
|
171
171
|
* correctly.
|
|
172
172
|
*/
|
|
173
|
-
private _bucketByX
|
|
173
|
+
private _bucketByX;
|
|
174
174
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Line = exports.CurveName = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var d3 = require("d3");
|
|
9
10
|
var Animators = require("../animators");
|
|
@@ -35,7 +36,7 @@ var CURVE_NAME_MAPPING = {
|
|
|
35
36
|
/**
|
|
36
37
|
* Known curve types that line and area plot's .curve() methods understand
|
|
37
38
|
*/
|
|
38
|
-
exports.CurveName = makeEnum_1.makeEnum([
|
|
39
|
+
exports.CurveName = (0, makeEnum_1.makeEnum)([
|
|
39
40
|
"linear",
|
|
40
41
|
"linearClosed",
|
|
41
42
|
"step",
|
|
@@ -51,7 +52,7 @@ exports.CurveName = makeEnum_1.makeEnum([
|
|
|
51
52
|
"monotone",
|
|
52
53
|
]);
|
|
53
54
|
var Line = /** @class */ (function (_super) {
|
|
54
|
-
tslib_1.__extends(Line, _super);
|
|
55
|
+
(0, tslib_1.__extends)(Line, _super);
|
|
55
56
|
/**
|
|
56
57
|
* A Line Plot draws line segments starting from the first data point to the next.
|
|
57
58
|
*
|
|
@@ -151,7 +152,7 @@ var Line = /** @class */ (function (_super) {
|
|
|
151
152
|
};
|
|
152
153
|
Line.prototype._createDrawer = function (dataset) {
|
|
153
154
|
var _this = this;
|
|
154
|
-
return new drawer_1.ProxyDrawer(function () { return new lineDrawer_1.LineSVGDrawer(); }, function (ctx) { return new Drawers.CanvasDrawer(ctx, lineDrawer_1.makeLineCanvasDrawStep(function () { return _this._d3LineFactory(dataset); })); });
|
|
155
|
+
return new drawer_1.ProxyDrawer(function () { return new lineDrawer_1.LineSVGDrawer(); }, function (ctx) { return new Drawers.CanvasDrawer(ctx, (0, lineDrawer_1.makeLineCanvasDrawStep)(function () { return _this._d3LineFactory(dataset); })); });
|
|
155
156
|
};
|
|
156
157
|
Line.prototype.getExtentsForProperty = function (property) {
|
|
157
158
|
var extents = _super.prototype.getExtentsForProperty.call(this, property);
|
|
@@ -169,7 +170,7 @@ var Line = /** @class */ (function (_super) {
|
|
|
169
170
|
if (this.autorangeMode() === "y") {
|
|
170
171
|
includedValues = edgeIntersectionPoints.left.concat(edgeIntersectionPoints.right).map(function (point) { return point.y; });
|
|
171
172
|
}
|
|
172
|
-
else {
|
|
173
|
+
else { // === "x"
|
|
173
174
|
includedValues = edgeIntersectionPoints.top.concat(edgeIntersectionPoints.bottom).map(function (point) { return point.x; });
|
|
174
175
|
}
|
|
175
176
|
return extents.map(function (extent) { return d3.extent(d3.merge([extent, includedValues])); });
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2014-present Palantir Technologies
|
|
3
|
+
* @license MIT
|
|
4
|
+
*/
|
|
1
5
|
import { Dataset } from "../core/dataset";
|
|
2
6
|
import { DatumFormatter } from "../core/formatters";
|
|
3
7
|
import { AttributeToProjector, IAccessor, Point, SimpleSelection } from "../core/interfaces";
|
|
@@ -149,8 +153,8 @@ export declare class Pie extends Plot {
|
|
|
149
153
|
labelFormatter(formatter: DatumFormatter): this;
|
|
150
154
|
entitiesAt(queryPoint: Point): IPiePlotEntity[];
|
|
151
155
|
protected _propertyProjectors(): AttributeToProjector;
|
|
152
|
-
private _updatePieAngles
|
|
153
|
-
private _pieCenter
|
|
156
|
+
private _updatePieAngles;
|
|
157
|
+
private _pieCenter;
|
|
154
158
|
protected _getDataToDraw(): Utils.Map<Dataset, any[]>;
|
|
155
159
|
protected static _isValidData(value: any): boolean;
|
|
156
160
|
protected _pixelPoint(datum: any, index: number, dataset: Dataset): {
|
|
@@ -158,7 +162,7 @@ export declare class Pie extends Plot {
|
|
|
158
162
|
y: number;
|
|
159
163
|
};
|
|
160
164
|
protected _additionalPaint(time: number): void;
|
|
161
|
-
private _generateStrokeDrawSteps
|
|
162
|
-
private _sliceIndexForPoint
|
|
163
|
-
private _drawLabels
|
|
165
|
+
private _generateStrokeDrawSteps;
|
|
166
|
+
private _sliceIndexForPoint;
|
|
167
|
+
private _drawLabels;
|
|
164
168
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Pie = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var d3 = require("d3");
|
|
9
10
|
var Typesettable = require("typesettable");
|
|
@@ -17,7 +18,7 @@ var drawer_1 = require("../drawers/drawer");
|
|
|
17
18
|
var windowUtils_1 = require("../utils/windowUtils");
|
|
18
19
|
var plot_1 = require("./plot");
|
|
19
20
|
var Pie = /** @class */ (function (_super) {
|
|
20
|
-
tslib_1.__extends(Pie, _super);
|
|
21
|
+
(0, tslib_1.__extends)(Pie, _super);
|
|
21
22
|
/**
|
|
22
23
|
* @constructor
|
|
23
24
|
*/
|
|
@@ -108,7 +109,7 @@ var Pie = /** @class */ (function (_super) {
|
|
|
108
109
|
};
|
|
109
110
|
Pie.prototype._createDrawer = function () {
|
|
110
111
|
return new drawer_1.ProxyDrawer(function () { return new arcDrawer_1.ArcSVGDrawer(); }, function () {
|
|
111
|
-
windowUtils_1.warn("canvas renderer is not supported on Pie Plot!");
|
|
112
|
+
(0, windowUtils_1.warn)("canvas renderer is not supported on Pie Plot!");
|
|
112
113
|
return null;
|
|
113
114
|
});
|
|
114
115
|
};
|
|
@@ -14,8 +14,8 @@ import { Component } from "../components/component";
|
|
|
14
14
|
import { ProxyDrawer } from "../drawers/drawer";
|
|
15
15
|
import { Scale } from "../scales/scale";
|
|
16
16
|
export declare const Renderer: {
|
|
17
|
-
svg: "svg";
|
|
18
17
|
canvas: "canvas";
|
|
18
|
+
svg: "svg";
|
|
19
19
|
};
|
|
20
20
|
export declare type Renderer = keyof typeof Renderer;
|
|
21
21
|
export declare class Plot extends Component {
|
|
@@ -116,7 +116,7 @@ export declare class Plot extends Component {
|
|
|
116
116
|
constructor();
|
|
117
117
|
anchor(selection: d3.Selection<HTMLElement, any, any, any>): this;
|
|
118
118
|
protected _setup(): void;
|
|
119
|
-
private _appendCanvasNode
|
|
119
|
+
private _appendCanvasNode;
|
|
120
120
|
setBounds(width: number, height: number, originX?: number, originY?: number): this;
|
|
121
121
|
destroy(): void;
|
|
122
122
|
/**
|
|
@@ -178,7 +178,7 @@ export declare class Plot extends Component {
|
|
|
178
178
|
/**
|
|
179
179
|
* @returns {Scale[]} A unique array of all scales currently used by the Plot.
|
|
180
180
|
*/
|
|
181
|
-
private _scales
|
|
181
|
+
private _scales;
|
|
182
182
|
/**
|
|
183
183
|
* Updates the extents associated with each attribute, then autodomains all scales the Plot uses.
|
|
184
184
|
*/
|
|
@@ -189,7 +189,7 @@ export declare class Plot extends Component {
|
|
|
189
189
|
* Override in subclass to add special extents, such as included values
|
|
190
190
|
*/
|
|
191
191
|
protected getExtentsForProperty(property: string): any[][];
|
|
192
|
-
private _includedValuesForScale
|
|
192
|
+
private _includedValuesForScale;
|
|
193
193
|
/**
|
|
194
194
|
* Get the Animator associated with the specified Animator key.
|
|
195
195
|
*
|
|
@@ -241,7 +241,7 @@ export declare class Plot extends Component {
|
|
|
241
241
|
*/
|
|
242
242
|
protected _buildLightweightPlotEntities(datasets: Dataset[]): Plots.ILightweightPlotEntity[];
|
|
243
243
|
protected _getDataToDraw(): Utils.Map<Dataset, any[]>;
|
|
244
|
-
private _paint
|
|
244
|
+
private _paint;
|
|
245
245
|
/**
|
|
246
246
|
* Retrieves the drawn visual elements for the specified Datasets as a d3 Selection.
|
|
247
247
|
* Not supported on canvas renderer.
|
package/build/src/plots/plot.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Plot = exports.Renderer = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var d3 = require("d3");
|
|
9
10
|
var Animators = require("../animators");
|
|
@@ -17,9 +18,9 @@ var svgDrawer_1 = require("../drawers/svgDrawer");
|
|
|
17
18
|
var coerceD3_1 = require("../utils/coerceD3");
|
|
18
19
|
var makeEnum_1 = require("../utils/makeEnum");
|
|
19
20
|
var deferredRenderer_1 = require("./deferredRenderer");
|
|
20
|
-
exports.Renderer = makeEnum_1.makeEnum(["svg", "canvas"]);
|
|
21
|
+
exports.Renderer = (0, makeEnum_1.makeEnum)(["svg", "canvas"]);
|
|
21
22
|
var Plot = /** @class */ (function (_super) {
|
|
22
|
-
tslib_1.__extends(Plot, _super);
|
|
23
|
+
(0, tslib_1.__extends)(Plot, _super);
|
|
23
24
|
/**
|
|
24
25
|
* A Plot draws some visualization of the inputted Datasets.
|
|
25
26
|
*
|
|
@@ -91,7 +92,7 @@ var Plot = /** @class */ (function (_super) {
|
|
|
91
92
|
return appliedDrawSteps;
|
|
92
93
|
};
|
|
93
94
|
Plot.prototype.anchor = function (selection) {
|
|
94
|
-
selection = coerceD3_1.coerceExternalD3(selection);
|
|
95
|
+
selection = (0, coerceD3_1.coerceExternalD3)(selection);
|
|
95
96
|
_super.prototype.anchor.call(this, selection);
|
|
96
97
|
this._dataChanged = true;
|
|
97
98
|
this._resetEntityStore();
|
|
@@ -264,7 +265,7 @@ var Plot = /** @class */ (function (_super) {
|
|
|
264
265
|
if (this._cachedAttrToProjector == null) {
|
|
265
266
|
var projectors = this._generateAttrToProjector();
|
|
266
267
|
if (Plot.OPTIMIZE_MEMOIZE_PROJECTORS) {
|
|
267
|
-
projectors = memoize_1.memoizeProjectors(projectors);
|
|
268
|
+
projectors = (0, memoize_1.memoizeProjectors)(projectors);
|
|
268
269
|
}
|
|
269
270
|
this._cachedAttrToProjector = projectors;
|
|
270
271
|
}
|
|
@@ -342,7 +343,7 @@ var Plot = /** @class */ (function (_super) {
|
|
|
342
343
|
Plot.prototype.getExtentsForAttr = function (attr) {
|
|
343
344
|
var _this = this;
|
|
344
345
|
if (this._attrExtents[attr] == null) {
|
|
345
|
-
var thunk = memoize_1.memThunk(function () { return _this.datasets(); }, function () { return _this._attrBindings.get(attr); }, function (datasets, accScaleBinding) {
|
|
346
|
+
var thunk = (0, memoize_1.memThunk)(function () { return _this.datasets(); }, function () { return _this._attrBindings.get(attr); }, function (datasets, accScaleBinding) {
|
|
346
347
|
if (accScaleBinding == null || accScaleBinding.accessor == null) {
|
|
347
348
|
return null;
|
|
348
349
|
}
|
|
@@ -358,7 +359,7 @@ var Plot = /** @class */ (function (_super) {
|
|
|
358
359
|
Plot.prototype.getExtentsForProperty = function (property) {
|
|
359
360
|
var _this = this;
|
|
360
361
|
if (this._propertyExtents[property] == null) {
|
|
361
|
-
var thunk = memoize_1.memThunk(function () { return _this.datasets(); }, function () { return _this._propertyBindings.get(property); }, function () { return _this._filterForProperty(property); }, function (datasets, accScaleBinding, filter) {
|
|
362
|
+
var thunk = (0, memoize_1.memThunk)(function () { return _this.datasets(); }, function () { return _this._propertyBindings.get(property); }, function () { return _this._filterForProperty(property); }, function (datasets, accScaleBinding, filter) {
|
|
362
363
|
if (accScaleBinding == null || accScaleBinding.accessor == null) {
|
|
363
364
|
return null;
|
|
364
365
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2014-present Palantir Technologies
|
|
3
|
+
* @license MIT
|
|
4
|
+
*/
|
|
1
5
|
import { Dataset } from "../core/dataset";
|
|
2
6
|
import { AttributeToProjector, IAccessor, IRangeProjector, Point } from "../core/interfaces";
|
|
3
7
|
import * as Drawers from "../drawers";
|
|
@@ -97,8 +101,8 @@ export declare class Rectangle<X, Y> extends XYPlot<X, Y> {
|
|
|
97
101
|
* @returns {PlotEntity[]} The PlotEntities at the particular point
|
|
98
102
|
*/
|
|
99
103
|
entitiesAt(point: Point): Plots.IPlotEntity[];
|
|
100
|
-
protected _entityBounds(entity: Plots.IPlotEntity | Plots.ILightweightPlotEntity):
|
|
101
|
-
private _entityBBox
|
|
104
|
+
protected _entityBounds(entity: Plots.IPlotEntity | Plots.ILightweightPlotEntity): Pick<DOMRect, "height" | "width" | "x" | "y">;
|
|
105
|
+
private _entityBBox;
|
|
102
106
|
/**
|
|
103
107
|
* Gets the accessor for labels.
|
|
104
108
|
*
|
|
@@ -131,10 +135,10 @@ export declare class Rectangle<X, Y> extends XYPlot<X, Y> {
|
|
|
131
135
|
x: any;
|
|
132
136
|
y: any;
|
|
133
137
|
};
|
|
134
|
-
private _rectangleWidth
|
|
138
|
+
private _rectangleWidth;
|
|
135
139
|
protected _getDataToDraw(): Utils.Map<Dataset, any[]>;
|
|
136
140
|
protected _additionalPaint(time: number): void;
|
|
137
|
-
private _drawLabels
|
|
138
|
-
private _drawLabel
|
|
139
|
-
private _overlayLabel
|
|
141
|
+
private _drawLabels;
|
|
142
|
+
private _drawLabel;
|
|
143
|
+
private _overlayLabel;
|
|
140
144
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Rectangle = void 0;
|
|
7
8
|
var tslib_1 = require("tslib");
|
|
8
9
|
var d3 = require("d3");
|
|
9
10
|
var Typesettable = require("typesettable");
|
|
@@ -16,7 +17,7 @@ var Utils = require("../utils");
|
|
|
16
17
|
var plot_1 = require("./plot");
|
|
17
18
|
var xyPlot_1 = require("./xyPlot");
|
|
18
19
|
var Rectangle = /** @class */ (function (_super) {
|
|
19
|
-
tslib_1.__extends(Rectangle, _super);
|
|
20
|
+
(0, tslib_1.__extends)(Rectangle, _super);
|
|
20
21
|
/**
|
|
21
22
|
* A Rectangle Plot displays rectangles based on the data.
|
|
22
23
|
* The left and right edges of each rectangle can be set with x() and x2().
|