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.
Files changed (180) hide show
  1. package/build/src/animators/easingAnimator.d.ts +2 -2
  2. package/build/src/animators/easingAnimator.js +3 -2
  3. package/build/src/animators/index.js +2 -2
  4. package/build/src/animators/nullAnimator.js +2 -1
  5. package/build/src/axes/axis.d.ts +9 -5
  6. package/build/src/axes/axis.js +4 -3
  7. package/build/src/axes/categoryAxis.d.ts +9 -5
  8. package/build/src/axes/categoryAxis.js +13 -11
  9. package/build/src/axes/index.js +3 -3
  10. package/build/src/axes/numericAxis.d.ts +9 -5
  11. package/build/src/axes/numericAxis.js +2 -1
  12. package/build/src/axes/timeAxis.d.ts +18 -14
  13. package/build/src/axes/timeAxis.js +6 -5
  14. package/build/src/components/component.d.ts +2 -2
  15. package/build/src/components/component.js +7 -6
  16. package/build/src/components/componentContainer.js +3 -2
  17. package/build/src/components/dragBoxLayer.d.ts +4 -4
  18. package/build/src/components/dragBoxLayer.js +3 -2
  19. package/build/src/components/dragLineLayer.js +2 -1
  20. package/build/src/components/gridlines.d.ts +2 -2
  21. package/build/src/components/gridlines.js +2 -1
  22. package/build/src/components/group.js +2 -1
  23. package/build/src/components/guideLineLayer.d.ts +1 -1
  24. package/build/src/components/guideLineLayer.js +2 -1
  25. package/build/src/components/index.js +14 -14
  26. package/build/src/components/interpolatedColorLegend.d.ts +7 -3
  27. package/build/src/components/interpolatedColorLegend.js +4 -3
  28. package/build/src/components/label.js +4 -3
  29. package/build/src/components/legend.d.ts +5 -1
  30. package/build/src/components/legend.js +2 -1
  31. package/build/src/components/plotGroup.js +2 -1
  32. package/build/src/components/selectionBoxLayer.d.ts +4 -4
  33. package/build/src/components/selectionBoxLayer.js +2 -1
  34. package/build/src/components/table.d.ts +10 -6
  35. package/build/src/components/table.js +4 -3
  36. package/build/src/components/wrappedLabel.js +2 -1
  37. package/build/src/components/xDragBoxLayer.js +2 -1
  38. package/build/src/components/yDragBoxLayer.js +2 -1
  39. package/build/src/core/config.js +1 -0
  40. package/build/src/core/dataset.d.ts +5 -1
  41. package/build/src/core/dataset.js +1 -0
  42. package/build/src/core/formatters.d.ts +4 -0
  43. package/build/src/core/formatters.js +1 -0
  44. package/build/src/core/renderController.d.ts +1 -1
  45. package/build/src/core/renderController.js +2 -1
  46. package/build/src/core/renderPolicy.d.ts +4 -0
  47. package/build/src/core/renderPolicy.js +1 -0
  48. package/build/src/core/symbolFactories.d.ts +4 -0
  49. package/build/src/core/symbolFactories.js +1 -0
  50. package/build/src/core/version.d.ts +4 -0
  51. package/build/src/core/version.js +2 -1
  52. package/build/src/core/version.js.bak +1 -0
  53. package/build/src/dispatchers/dispatcher.d.ts +7 -3
  54. package/build/src/dispatchers/dispatcher.js +2 -1
  55. package/build/src/dispatchers/index.js +3 -3
  56. package/build/src/dispatchers/keyDispatcher.d.ts +2 -2
  57. package/build/src/dispatchers/keyDispatcher.js +2 -1
  58. package/build/src/dispatchers/mouseDispatcher.d.ts +1 -1
  59. package/build/src/dispatchers/mouseDispatcher.js +2 -1
  60. package/build/src/dispatchers/touchDispatcher.d.ts +1 -1
  61. package/build/src/dispatchers/touchDispatcher.js +2 -1
  62. package/build/src/drawers/arcDrawer.js +2 -1
  63. package/build/src/drawers/arcOutlineDrawer.js +2 -1
  64. package/build/src/drawers/areaDrawer.js +6 -5
  65. package/build/src/drawers/canvasBuffer.js +1 -0
  66. package/build/src/drawers/canvasDrawer.js +1 -0
  67. package/build/src/drawers/drawer.js +1 -0
  68. package/build/src/drawers/index.js +11 -10
  69. package/build/src/drawers/lineDrawer.js +4 -3
  70. package/build/src/drawers/rectangleDrawer.js +7 -5
  71. package/build/src/drawers/segmentDrawer.js +2 -1
  72. package/build/src/drawers/svgDrawer.d.ts +2 -2
  73. package/build/src/drawers/svgDrawer.js +1 -0
  74. package/build/src/drawers/symbolDrawer.js +6 -6
  75. package/build/src/index.d.ts +1 -1
  76. package/build/src/index.js +17 -14
  77. package/build/src/interactions/clickInteraction.d.ts +4 -4
  78. package/build/src/interactions/clickInteraction.js +2 -1
  79. package/build/src/interactions/dragInteraction.d.ts +4 -4
  80. package/build/src/interactions/dragInteraction.js +2 -1
  81. package/build/src/interactions/index.js +7 -6
  82. package/build/src/interactions/interaction.d.ts +2 -2
  83. package/build/src/interactions/interaction.js +1 -0
  84. package/build/src/interactions/keyInteraction.d.ts +2 -2
  85. package/build/src/interactions/keyInteraction.js +2 -1
  86. package/build/src/interactions/panZoomConstraints.js +1 -0
  87. package/build/src/interactions/panZoomInteraction.d.ts +13 -9
  88. package/build/src/interactions/panZoomInteraction.js +4 -3
  89. package/build/src/interactions/pointerInteraction.d.ts +3 -3
  90. package/build/src/interactions/pointerInteraction.js +2 -1
  91. package/build/src/memoize/index.js +5 -4
  92. package/build/src/memoize/memThunk.js +2 -1
  93. package/build/src/memoize/memoize.d.ts +5 -0
  94. package/build/src/memoize/memoize.js +2 -1
  95. package/build/src/memoize/memoizeProjectors.js +3 -2
  96. package/build/src/memoize/signature.d.ts +14 -0
  97. package/build/src/memoize/signature.js +4 -3
  98. package/build/src/plots/areaPlot.d.ts +9 -5
  99. package/build/src/plots/areaPlot.js +4 -3
  100. package/build/src/plots/barPlot.d.ts +16 -22
  101. package/build/src/plots/barPlot.js +6 -5
  102. package/build/src/plots/clusteredBarPlot.d.ts +3 -5
  103. package/build/src/plots/clusteredBarPlot.js +2 -1
  104. package/build/src/plots/commons.js +1 -0
  105. package/build/src/plots/deferredRenderer.d.ts +1 -1
  106. package/build/src/plots/deferredRenderer.js +1 -0
  107. package/build/src/plots/index.js +12 -12
  108. package/build/src/plots/linePlot.d.ts +6 -6
  109. package/build/src/plots/linePlot.js +5 -4
  110. package/build/src/plots/piePlot.d.ts +9 -5
  111. package/build/src/plots/piePlot.js +3 -2
  112. package/build/src/plots/plot.d.ts +5 -5
  113. package/build/src/plots/plot.js +7 -6
  114. package/build/src/plots/rectanglePlot.d.ts +10 -6
  115. package/build/src/plots/rectanglePlot.js +2 -1
  116. package/build/src/plots/scatterPlot.d.ts +8 -9
  117. package/build/src/plots/scatterPlot.js +3 -2
  118. package/build/src/plots/segmentPlot.d.ts +7 -3
  119. package/build/src/plots/segmentPlot.js +3 -2
  120. package/build/src/plots/stackedAreaPlot.d.ts +6 -2
  121. package/build/src/plots/stackedAreaPlot.js +4 -3
  122. package/build/src/plots/stackedBarPlot.d.ts +5 -4
  123. package/build/src/plots/stackedBarPlot.js +5 -4
  124. package/build/src/plots/waterfallPlot.d.ts +4 -6
  125. package/build/src/plots/waterfallPlot.js +2 -1
  126. package/build/src/plots/xyPlot.d.ts +5 -5
  127. package/build/src/plots/xyPlot.js +2 -1
  128. package/build/src/scales/categoryScale.d.ts +7 -3
  129. package/build/src/scales/categoryScale.js +3 -2
  130. package/build/src/scales/colorScale.d.ts +5 -1
  131. package/build/src/scales/colorScale.js +2 -1
  132. package/build/src/scales/index.d.ts +1 -1
  133. package/build/src/scales/index.js +8 -7
  134. package/build/src/scales/interpolatedColorScale.d.ts +7 -3
  135. package/build/src/scales/interpolatedColorScale.js +5 -4
  136. package/build/src/scales/linearScale.d.ts +4 -0
  137. package/build/src/scales/linearScale.js +2 -1
  138. package/build/src/scales/logScale.d.ts +4 -0
  139. package/build/src/scales/logScale.js +2 -1
  140. package/build/src/scales/modifiedLogScale.d.ts +8 -4
  141. package/build/src/scales/modifiedLogScale.js +2 -1
  142. package/build/src/scales/quantitativeScale.d.ts +5 -1
  143. package/build/src/scales/quantitativeScale.js +3 -2
  144. package/build/src/scales/scale.d.ts +4 -0
  145. package/build/src/scales/scale.js +1 -0
  146. package/build/src/scales/tickGenerators.js +1 -0
  147. package/build/src/scales/timeScale.js +2 -1
  148. package/build/src/utils/addD3SelectionMulti.d.ts +8 -0
  149. package/build/src/utils/arrayUtils.d.ts +4 -0
  150. package/build/src/utils/arrayUtils.js +1 -0
  151. package/build/src/utils/bucket.js +1 -0
  152. package/build/src/utils/callbackSet.js +2 -1
  153. package/build/src/utils/coerceD3.js +1 -0
  154. package/build/src/utils/colorUtils.d.ts +4 -0
  155. package/build/src/utils/colorUtils.js +1 -0
  156. package/build/src/utils/domUtils.d.ts +3 -10
  157. package/build/src/utils/domUtils.js +1 -0
  158. package/build/src/utils/entityStore.js +1 -0
  159. package/build/src/utils/index.d.ts +1 -1
  160. package/build/src/utils/index.js +9 -8
  161. package/build/src/utils/makeEnum.js +1 -0
  162. package/build/src/utils/map.d.ts +4 -0
  163. package/build/src/utils/map.js +1 -0
  164. package/build/src/utils/mathUtils.d.ts +4 -0
  165. package/build/src/utils/mathUtils.js +3 -2
  166. package/build/src/utils/objectUtils.js +1 -0
  167. package/build/src/utils/rTree.d.ts +1 -1
  168. package/build/src/utils/rTree.js +1 -0
  169. package/build/src/utils/rTreeSplitStrategies.d.ts +2 -2
  170. package/build/src/utils/rTreeSplitStrategies.js +1 -0
  171. package/build/src/utils/set.js +1 -0
  172. package/build/src/utils/stackingUtils.d.ts +5 -1
  173. package/build/src/utils/stackingUtils.js +6 -5
  174. package/build/src/utils/transformAwareTranslator.d.ts +4 -0
  175. package/build/src/utils/transformAwareTranslator.js +1 -0
  176. package/build/src/utils/windowUtils.d.ts +4 -0
  177. package/build/src/utils/windowUtils.js +1 -0
  178. package/package.json +6 -5
  179. package/plottable.js +40761 -29021
  180. package/plottable.js.map +1 -1
@@ -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, Bounds, IAccessor, Point } from "../core/interfaces";
3
7
  import { SymbolFactory } from "../core/symbolFactories";
@@ -64,12 +68,7 @@ export declare class Scatter<X, Y> extends XYPlot<X, Y> {
64
68
  protected _generateDrawSteps(): Drawers.DrawStep[];
65
69
  protected _propertyProjectors(): AttributeToProjector;
66
70
  protected _constructSymbolGenerator(): (datum: any, index: number, dataset: Dataset) => any;
67
- protected _entityBounds(entity: ILightweightScatterPlotEntity): {
68
- x: number;
69
- y: number;
70
- width: number;
71
- height: number;
72
- };
71
+ protected _entityBounds(entity: ILightweightScatterPlotEntity): Pick<DOMRect, "x" | "y" | "width" | "height">;
73
72
  protected _entityVisibleOnPlot(entity: ILightweightScatterPlotEntity, bounds: Bounds): boolean;
74
73
  /**
75
74
  * Gets the Entities at a particular Point.
@@ -104,7 +103,7 @@ export declare class Scatter<X, Y> extends XYPlot<X, Y> {
104
103
  protected _removeDatasetNodes(dataset: Dataset): void;
105
104
  protected _additionalPaint(time: number): void;
106
105
  protected _drawLabels(): void;
107
- private _drawLabel(datum, index, dataset, attrToProjector);
108
- private _calculateLabelProperties(pointCoordinates, diameter, measurement);
109
- private _createLabelContainer(labelArea, labelContainerOrigin, labelOrigin, measurement);
106
+ private _drawLabel;
107
+ private _calculateLabelProperties;
108
+ private _createLabelContainer;
110
109
  }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Scatter = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Typesettable = require("typesettable");
9
10
  var Formatters = require("../core/formatters");
@@ -19,7 +20,7 @@ var Plots = require("./");
19
20
  var plot_1 = require("./plot");
20
21
  var xyPlot_1 = require("./xyPlot");
21
22
  var Scatter = /** @class */ (function (_super) {
22
- tslib_1.__extends(Scatter, _super);
23
+ (0, tslib_1.__extends)(Scatter, _super);
23
24
  /**
24
25
  * A Scatter Plot draws a symbol at each data point.
25
26
  *
@@ -56,7 +57,7 @@ var Scatter = /** @class */ (function (_super) {
56
57
  Scatter.prototype._createDrawer = function (dataset) {
57
58
  var _this = this;
58
59
  return new drawer_1.ProxyDrawer(function () { return new symbolDrawer_1.SymbolSVGDrawer(); }, function (ctx) {
59
- return new Drawers.CanvasDrawer(ctx, symbolDrawer_1.makeSymbolCanvasDrawStep(dataset, function () { return plot_1.Plot._scaledAccessor(_this.symbol()); }, function () { return plot_1.Plot._scaledAccessor(_this.size()); }));
60
+ return new Drawers.CanvasDrawer(ctx, (0, symbolDrawer_1.makeSymbolCanvasDrawStep)(dataset, function () { return plot_1.Plot._scaledAccessor(_this.symbol()); }, function () { return plot_1.Plot._scaledAccessor(_this.size()); }));
60
61
  });
61
62
  };
62
63
  Scatter.prototype.size = function (size, scale) {
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { AttributeToProjector, Bounds, IAccessor, Point, Range } from "../core/interfaces";
2
6
  import * as Drawers from "../drawers";
3
7
  import { Scale } from "../scales/scale";
@@ -96,7 +100,7 @@ export declare class Segment<X, Y> extends XYPlot<X, Y> {
96
100
  * @returns {PlotEntity[]}
97
101
  */
98
102
  entitiesIn(xRange: Range, yRange: Range): IPlotEntity[];
99
- private _entitiesIntersecting(xRange, yRange);
100
- private _lineIntersectsBox(entity, xRange, yRange, attrToProjector);
101
- private _lineIntersectsSegment(point1, point2, point3, point4);
103
+ private _entitiesIntersecting;
104
+ private _lineIntersectsBox;
105
+ private _lineIntersectsSegment;
102
106
  }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Segment = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Animators = require("../animators");
9
10
  var drawer_1 = require("../drawers/drawer");
@@ -13,7 +14,7 @@ var windowUtils_1 = require("../utils/windowUtils");
13
14
  var plot_1 = require("./plot");
14
15
  var xyPlot_1 = require("./xyPlot");
15
16
  var Segment = /** @class */ (function (_super) {
16
- tslib_1.__extends(Segment, _super);
17
+ (0, tslib_1.__extends)(Segment, _super);
17
18
  /**
18
19
  * A Segment Plot displays line segments based on the data.
19
20
  *
@@ -28,7 +29,7 @@ var Segment = /** @class */ (function (_super) {
28
29
  }
29
30
  Segment.prototype._createDrawer = function () {
30
31
  return new drawer_1.ProxyDrawer(function () { return new segmentDrawer_1.SegmentSVGDrawer(); }, function () {
31
- windowUtils_1.warn("canvas renderer is not supported on Segment Plot!");
32
+ (0, windowUtils_1.warn)("canvas renderer is not supported on Segment Plot!");
32
33
  return null;
33
34
  });
34
35
  };
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { IAnimator } from "../animators/animator";
2
6
  import { Dataset } from "../core/dataset";
3
7
  import { AttributeToProjector, IAccessor, Point, Projector } from "../core/interfaces";
@@ -66,7 +70,7 @@ export declare class StackedArea<X> extends Area<X> {
66
70
  protected _updateYScale(): void;
67
71
  protected _onDatasetUpdate(): this;
68
72
  protected getExtentsForProperty(attr: string): any[][];
69
- private _checkSameDomain();
73
+ private _checkSameDomain;
70
74
  /**
71
75
  * Given an array of Datasets and the accessor function for the key, computes the
72
76
  * set reunion (no duplicates) of the domain of each Dataset. The keys are stringified
@@ -76,7 +80,7 @@ export declare class StackedArea<X> extends Area<X> {
76
80
  * @param {Accessor<any>} keyAccessor The accessor for the key of the data
77
81
  * @return {string[]} An array of stringified keys
78
82
  */
79
- private static _domainKeys(datasets, keyAccessor);
83
+ private static _domainKeys;
80
84
  protected _coordinateProjectors(): [Projector, Projector, Projector];
81
85
  protected _propertyProjectors(): AttributeToProjector;
82
86
  protected _pixelPoint(datum: any, index: number, dataset: Dataset): Point;
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.StackedArea = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var Animators = require("../animators");
@@ -12,16 +13,16 @@ var Utils = require("../utils");
12
13
  var areaPlot_1 = require("./areaPlot");
13
14
  var plot_1 = require("./plot");
14
15
  var StackedArea = /** @class */ (function (_super) {
15
- tslib_1.__extends(StackedArea, _super);
16
+ (0, tslib_1.__extends)(StackedArea, _super);
16
17
  /**
17
18
  * @constructor
18
19
  */
19
20
  function StackedArea() {
20
21
  var _this = _super.call(this) || this;
21
- _this._stackingResult = index_1.memThunk(function () { return _this.datasets(); }, function () { return _this.x().accessor; }, function () { return _this.y().accessor; }, function () { return _this._stackingOrder; }, function (datasets, keyAccessor, valueAccessor, stackingOrder) {
22
+ _this._stackingResult = (0, index_1.memThunk)(function () { return _this.datasets(); }, function () { return _this.x().accessor; }, function () { return _this.y().accessor; }, function () { return _this._stackingOrder; }, function (datasets, keyAccessor, valueAccessor, stackingOrder) {
22
23
  return Utils.Stacking.stack(datasets, keyAccessor, valueAccessor, stackingOrder);
23
24
  });
24
- _this._stackedExtent = index_1.memThunk(_this._stackingResult, function () { return _this.x().accessor; }, function () { return _this._filterForProperty("y"); }, function (stackingResult, keyAccessor, filter) {
25
+ _this._stackedExtent = (0, index_1.memThunk)(_this._stackingResult, function () { return _this.x().accessor; }, function () { return _this._filterForProperty("y"); }, function (stackingResult, keyAccessor, filter) {
25
26
  return Utils.Stacking.stackedExtent(stackingResult, keyAccessor, filter);
26
27
  });
27
28
  _this._baselineValue = 0;
@@ -1,4 +1,7 @@
1
- import { Dataset } from "../core/dataset";
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
2
5
  import { Formatter } from "../core/formatters";
3
6
  import * as Utils from "../utils";
4
7
  import { LabelFontSizePx } from "../components/label";
@@ -56,9 +59,7 @@ export declare class StackedBar<X, Y> extends Bar<X, Y> {
56
59
  labelFontSize(fontSize: LabelFontSizePx): this;
57
60
  protected _setup(): void;
58
61
  protected _drawLabels(): void;
59
- protected _generateAttrToProjector(): {
60
- [attr: string]: (datum: any, index: number, dataset: Dataset) => any;
61
- };
62
+ protected _generateAttrToProjector(): import("../core/interfaces").AttributeToProjector;
62
63
  protected getExtentsForProperty(attr: string): any[][];
63
64
  invalidateCache(): void;
64
65
  }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.StackedBar = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Typesettable = require("typesettable");
9
10
  var formatters_1 = require("../core/formatters");
@@ -12,7 +13,7 @@ var Utils = require("../utils");
12
13
  var barPlot_1 = require("./barPlot");
13
14
  var plot_1 = require("./plot");
14
15
  var StackedBar = /** @class */ (function (_super) {
15
- tslib_1.__extends(StackedBar, _super);
16
+ (0, tslib_1.__extends)(StackedBar, _super);
16
17
  /**
17
18
  * A StackedBar Plot stacks bars across Datasets based on the primary value of the bars.
18
19
  * On a vertical StackedBar Plot, the bars with the same X value are stacked.
@@ -26,11 +27,11 @@ var StackedBar = /** @class */ (function (_super) {
26
27
  function StackedBar(orientation) {
27
28
  if (orientation === void 0) { orientation = "vertical"; }
28
29
  var _this = _super.call(this, orientation) || this;
29
- _this._extremaFormatter = formatters_1.identity();
30
- _this._stackingResult = memoize_1.memThunk(function () { return _this.datasets(); }, function () { return _this.position().accessor; }, function () { return _this.length().accessor; }, function () { return _this._stackingOrder; }, function (datasets, positionAccessor, lengthAccessor, stackingOrder) {
30
+ _this._extremaFormatter = (0, formatters_1.identity)();
31
+ _this._stackingResult = (0, memoize_1.memThunk)(function () { return _this.datasets(); }, function () { return _this.position().accessor; }, function () { return _this.length().accessor; }, function () { return _this._stackingOrder; }, function (datasets, positionAccessor, lengthAccessor, stackingOrder) {
31
32
  return Utils.Stacking.stack(datasets, positionAccessor, lengthAccessor, stackingOrder);
32
33
  });
33
- _this._stackedExtent = memoize_1.memThunk(_this._stackingResult, function () { return _this.position().accessor; }, function () { return _this._filterForProperty(_this._isVertical ? "y" : "x"); }, function (stackingResult, positionAccessor, filter) {
34
+ _this._stackedExtent = (0, memoize_1.memThunk)(_this._stackingResult, function () { return _this.position().accessor; }, function () { return _this._filterForProperty(_this._isVertical ? "y" : "x"); }, function (stackingResult, positionAccessor, filter) {
34
35
  return Utils.Stacking.stackedExtent(stackingResult, positionAccessor, filter);
35
36
  });
36
37
  _this.addClass("stacked-bar-plot");
@@ -46,11 +46,9 @@ export declare class Waterfall<X, Y> extends Bar<X, number> {
46
46
  protected _additionalPaint(time: number): void;
47
47
  protected _createNodesForDataset(dataset: Dataset): ProxyDrawer;
48
48
  protected getExtentsForProperty(attr: string): any[][];
49
- protected _generateAttrToProjector(): {
50
- [attr: string]: (datum: any, index: number, dataset: Dataset) => any;
51
- };
49
+ protected _generateAttrToProjector(): import("../core/interfaces").AttributeToProjector;
52
50
  protected _onDatasetUpdate(): this;
53
- private _calculateSubtotalsAndExtent(dataset);
54
- private _drawConnectors();
55
- private _updateSubtotals();
51
+ private _calculateSubtotalsAndExtent;
52
+ private _drawConnectors;
53
+ private _updateSubtotals;
56
54
  }
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Waterfall = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Utils = require("../utils");
9
10
  var barPlot_1 = require("./barPlot");
10
11
  var plot_1 = require("./plot");
11
12
  var Waterfall = /** @class */ (function (_super) {
12
- tslib_1.__extends(Waterfall, _super);
13
+ (0, tslib_1.__extends)(Waterfall, _super);
13
14
  function Waterfall() {
14
15
  var _this = _super.call(this) || this;
15
16
  _this._connectorsEnabled = false;
@@ -83,7 +83,7 @@ export declare class XYPlot<X, Y> extends Plot {
83
83
  */
84
84
  y(y: Y | IAccessor<Y>, yScale: Scale<Y, number>, postScale?: IRangeProjector<number>): this;
85
85
  protected _filterForProperty(property: string): IAccessor<boolean>;
86
- private _makeFilterByProperty(property);
86
+ private _makeFilterByProperty;
87
87
  private _applyDeferredRenderingTransform;
88
88
  protected _uninstallScaleForKey(scale: Scale<any, any>, key: string): void;
89
89
  protected _installScaleForKey(scale: Scale<any, any>, key: string): void;
@@ -104,8 +104,8 @@ export declare class XYPlot<X, Y> extends Plot {
104
104
  */
105
105
  autorangeMode(autorangeMode: string): this;
106
106
  computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): this;
107
- private _updateXExtentsAndAutodomain();
108
- private _updateYExtentsAndAutodomain();
107
+ private _updateXExtentsAndAutodomain;
108
+ private _updateYExtentsAndAutodomain;
109
109
  /**
110
110
  * Adjusts the domains of both X and Y scales to show all data.
111
111
  * This call does not override the autorange() behavior.
@@ -113,8 +113,8 @@ export declare class XYPlot<X, Y> extends Plot {
113
113
  * @returns {XYPlot} The calling XYPlot.
114
114
  */
115
115
  showAllData(): this;
116
- private _adjustYDomainOnChangeFromX();
117
- private _adjustXDomainOnChangeFromY();
116
+ private _adjustYDomainOnChangeFromX;
117
+ private _adjustXDomainOnChangeFromY;
118
118
  protected _projectorsReady(): boolean;
119
119
  protected _pixelPoint(datum: any, index: number, dataset: Dataset): Point;
120
120
  protected _getDataToDraw(): Utils.Map<Dataset, any[]>;
@@ -4,13 +4,14 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.XYPlot = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Scales = require("../scales");
9
10
  var Utils = require("../utils");
10
11
  var deferredRenderer_1 = require("./deferredRenderer");
11
12
  var plot_1 = require("./plot");
12
13
  var XYPlot = /** @class */ (function (_super) {
13
- tslib_1.__extends(XYPlot, _super);
14
+ (0, tslib_1.__extends)(XYPlot, _super);
14
15
  /**
15
16
  * An XYPlot is a Plot that displays data along two primary directions, X and Y.
16
17
  *
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { ITransformableScale } from "./";
2
6
  import { Scale } from "./scale";
3
7
  export declare class Category extends Scale<string, number> implements ITransformableScale {
@@ -44,9 +48,9 @@ export declare class Category extends Scale<string, number> implements ITransfor
44
48
  invertRange(range?: [number, number]): string[];
45
49
  range(): [number, number];
46
50
  range(values: [number, number]): this;
47
- private static _convertToPlottableInnerPadding(d3InnerPadding);
48
- private static _convertToPlottableOuterPadding(d3OuterPadding, d3InnerPadding);
49
- private _setBands();
51
+ private static _convertToPlottableInnerPadding;
52
+ private static _convertToPlottableOuterPadding;
53
+ private _setBands;
50
54
  /**
51
55
  * Returns the width of the range band.
52
56
  *
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Category = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var panZoomConstraints_1 = require("../interactions/panZoomConstraints");
@@ -11,7 +12,7 @@ var Utils = require("../utils");
11
12
  var scale_1 = require("./scale");
12
13
  var TRANSFORMATION_SPACE = [0, 1];
13
14
  var Category = /** @class */ (function (_super) {
14
- tslib_1.__extends(Category, _super);
15
+ (0, tslib_1.__extends)(Category, _super);
15
16
  /**
16
17
  * A Category Scale maps strings to numbers.
17
18
  *
@@ -134,7 +135,7 @@ var Category = /** @class */ (function (_super) {
134
135
  Category.prototype.zoom = function (magnifyAmount, centerValue) {
135
136
  var _this = this;
136
137
  var magnifyTransform = function (rangeValue) {
137
- return _this._d3TransformationScale.invert(panZoomConstraints_1.zoomOut(rangeValue, magnifyAmount, centerValue));
138
+ return _this._d3TransformationScale.invert((0, panZoomConstraints_1.zoomOut)(rangeValue, magnifyAmount, centerValue));
138
139
  };
139
140
  this._d3TransformationScale.domain(this._d3TransformationScale.range().map(magnifyTransform));
140
141
  this._dispatchUpdate();
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { Scale } from "./scale";
2
6
  export declare class Color extends Scale<string, string> {
3
7
  private static _LOOP_LIGHTEN_FACTOR;
@@ -18,7 +22,7 @@ export declare class Color extends Scale<string, string> {
18
22
  extentOfValues(values: string[]): string[];
19
23
  protected _getExtent(): string[];
20
24
  static invalidateColorCache(): void;
21
- private static _getPlottableColors();
25
+ private static _getPlottableColors;
22
26
  /**
23
27
  * Returns the color-string corresponding to a given string.
24
28
  *
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Color = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var Utils = require("../utils");
@@ -44,7 +45,7 @@ var ImplicitSeriesTracker = /** @class */ (function () {
44
45
  return ImplicitSeriesTracker;
45
46
  }());
46
47
  var Color = /** @class */ (function (_super) {
47
- tslib_1.__extends(Color, _super);
48
+ (0, tslib_1.__extends)(Color, _super);
48
49
  /**
49
50
  * A Color Scale maps string values to color hex values expressed as a string.
50
51
  *
@@ -3,7 +3,7 @@
3
3
  * @license MIT
4
4
  */
5
5
  import * as TickGenerators from "./tickGenerators";
6
- export { TickGenerators };
6
+ export { TickGenerators, };
7
7
  export * from "./categoryScale";
8
8
  export * from "./colorScale";
9
9
  export * from "./interpolatedColorScale";
@@ -4,16 +4,17 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.isTransformable = exports.TickGenerators = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var TickGenerators = require("./tickGenerators");
9
10
  exports.TickGenerators = TickGenerators;
10
- tslib_1.__exportStar(require("./categoryScale"), exports);
11
- tslib_1.__exportStar(require("./colorScale"), exports);
12
- tslib_1.__exportStar(require("./interpolatedColorScale"), exports);
13
- tslib_1.__exportStar(require("./linearScale"), exports);
14
- tslib_1.__exportStar(require("./logScale"), exports);
15
- tslib_1.__exportStar(require("./modifiedLogScale"), exports);
16
- tslib_1.__exportStar(require("./timeScale"), exports);
11
+ (0, tslib_1.__exportStar)(require("./categoryScale"), exports);
12
+ (0, tslib_1.__exportStar)(require("./colorScale"), exports);
13
+ (0, tslib_1.__exportStar)(require("./interpolatedColorScale"), exports);
14
+ (0, tslib_1.__exportStar)(require("./linearScale"), exports);
15
+ (0, tslib_1.__exportStar)(require("./logScale"), exports);
16
+ (0, tslib_1.__exportStar)(require("./modifiedLogScale"), exports);
17
+ (0, tslib_1.__exportStar)(require("./timeScale"), exports);
17
18
  // ---------------------------------------------------------
18
19
  var categoryScale_1 = require("./categoryScale");
19
20
  var quantitativeScale_1 = require("./quantitativeScale");
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { Scale } from "./scale";
2
6
  export declare class InterpolatedColor extends Scale<number, string> {
3
7
  static REDS: string[];
@@ -16,12 +20,12 @@ export declare class InterpolatedColor extends Scale<number, string> {
16
20
  /**
17
21
  * Generates the converted QuantitativeScale.
18
22
  */
19
- private _d3InterpolatedScale();
23
+ private _d3InterpolatedScale;
20
24
  /**
21
25
  * Generates the d3 interpolator for colors.
22
26
  */
23
- private _interpolateColors();
24
- private _resetScale();
27
+ private _interpolateColors;
28
+ private _resetScale;
25
29
  autoDomain(): this;
26
30
  scale(value: number): string;
27
31
  protected _getDomain(): number[];
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.InterpolatedColor = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var Utils = require("../utils");
10
11
  var scale_1 = require("./scale");
11
12
  var InterpolatedColor = /** @class */ (function (_super) {
12
- tslib_1.__extends(InterpolatedColor, _super);
13
+ (0, tslib_1.__extends)(InterpolatedColor, _super);
13
14
  /**
14
15
  * An InterpolatedColor Scale maps numbers to color hex values, expressed as strings.
15
16
  *
@@ -119,7 +120,7 @@ var InterpolatedColor = /** @class */ (function (_super) {
119
120
  "#FD8D3C",
120
121
  "#FC4E2A",
121
122
  "#E31A1C",
122
- "#B10026",
123
+ "#B10026", // red
123
124
  ];
124
125
  InterpolatedColor.BLUES = [
125
126
  "#FFFFFF",
@@ -130,7 +131,7 @@ var InterpolatedColor = /** @class */ (function (_super) {
130
131
  "#55A7E0",
131
132
  "#417FD0",
132
133
  "#2545D3",
133
- "#0B02E1",
134
+ "#0B02E1", // blue
134
135
  ];
135
136
  InterpolatedColor.POSNEG = [
136
137
  "#0B02E1",
@@ -149,7 +150,7 @@ var InterpolatedColor = /** @class */ (function (_super) {
149
150
  "#FD8D3C",
150
151
  "#FC4E2A",
151
152
  "#E31A1C",
152
- "#B10026",
153
+ "#B10026", // red
153
154
  ];
154
155
  return InterpolatedColor;
155
156
  }(scale_1.Scale));
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { QuantitativeScale } from "./quantitativeScale";
2
6
  export declare class Linear extends QuantitativeScale<number> {
3
7
  private _d3Scale;
@@ -4,11 +4,12 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Linear = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var quantitativeScale_1 = require("./quantitativeScale");
10
11
  var Linear = /** @class */ (function (_super) {
11
- tslib_1.__extends(Linear, _super);
12
+ (0, tslib_1.__extends)(Linear, _super);
12
13
  /**
13
14
  * @constructor
14
15
  */
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { QuantitativeScale } from "./quantitativeScale";
2
6
  export declare class Log extends QuantitativeScale<number> {
3
7
  private _d3Scale;
@@ -4,11 +4,12 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Log = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var quantitativeScale_1 = require("./quantitativeScale");
10
11
  var Log = /** @class */ (function (_super) {
11
- tslib_1.__extends(Log, _super);
12
+ (0, tslib_1.__extends)(Log, _super);
12
13
  /**
13
14
  * @constructor
14
15
  */
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { QuantitativeScale } from "./quantitativeScale";
2
6
  export declare class ModifiedLog extends QuantitativeScale<number> {
3
7
  private _base;
@@ -41,8 +45,8 @@ export declare class ModifiedLog extends QuantitativeScale<number> {
41
45
  * (0 to 1) scaling factor is added such that at 0 the value is
42
46
  * adjusted to 1, resulting in a returned result of 0.
43
47
  */
44
- private _adjustedLog(x);
45
- private _invertedAdjustedLog(x);
48
+ private _adjustedLog;
49
+ private _invertedAdjustedLog;
46
50
  scale(x: number): number;
47
51
  invert(x: number): number;
48
52
  scaleTransformation(value: number): number;
@@ -68,7 +72,7 @@ export declare class ModifiedLog extends QuantitativeScale<number> {
68
72
  * This function will generate clusters as large as it can while not
69
73
  * drastically exceeding its number of ticks.
70
74
  */
71
- private _logTicks(lower, upper);
75
+ private _logTicks;
72
76
  /**
73
77
  * How many ticks does the range [lower, upper] deserve?
74
78
  *
@@ -76,7 +80,7 @@ export declare class ModifiedLog extends QuantitativeScale<number> {
76
80
  * I would get 1/2 of the ticks. The range 10, 100 takes up 1/2 of the
77
81
  * distance when plotted.
78
82
  */
79
- private _howManyTicks(lower, upper);
83
+ private _howManyTicks;
80
84
  protected _niceDomain(domain: number[], count?: number): number[];
81
85
  protected _defaultExtent(): number[];
82
86
  protected _expandSingleValueDomain(singleValueDomain: number[]): number[];
@@ -4,13 +4,14 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ModifiedLog = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var Utils = require("../utils");
10
11
  var Scales = require("./");
11
12
  var quantitativeScale_1 = require("./quantitativeScale");
12
13
  var ModifiedLog = /** @class */ (function (_super) {
13
- tslib_1.__extends(ModifiedLog, _super);
14
+ (0, tslib_1.__extends)(ModifiedLog, _super);
14
15
  /**
15
16
  * A ModifiedLog Scale acts as a regular log scale for large numbers.
16
17
  * As it approaches 0, it gradually becomes linear.
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import * as Scales from "./";
2
6
  import { ITransformableScale } from "./";
3
7
  import { Scale } from "./scale";
@@ -49,7 +53,7 @@ export declare class QuantitativeScale<D> extends Scale<D, number> implements IT
49
53
  * @returns {QuantitativeScale} The calling QuantitativeScale.
50
54
  */
51
55
  padProportion(padProportion: number): this;
52
- private _padDomain(domain);
56
+ private _padDomain;
53
57
  /**
54
58
  * Gets whether or not the scale snaps its domain to nice values.
55
59
  */
@@ -4,13 +4,14 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.QuantitativeScale = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var panZoomConstraints_1 = require("../interactions/panZoomConstraints");
10
11
  var Utils = require("../utils");
11
12
  var scale_1 = require("./scale");
12
13
  var QuantitativeScale = /** @class */ (function (_super) {
13
- tslib_1.__extends(QuantitativeScale, _super);
14
+ (0, tslib_1.__extends)(QuantitativeScale, _super);
14
15
  /**
15
16
  * A QuantitativeScale is a Scale that maps number-like values to numbers.
16
17
  * It is invertible and continuous.
@@ -202,7 +203,7 @@ var QuantitativeScale = /** @class */ (function (_super) {
202
203
  };
203
204
  QuantitativeScale.prototype.zoom = function (magnifyAmount, centerValue) {
204
205
  var _this = this;
205
- var magnifyTransform = function (rangeValue) { return _this.invert(panZoomConstraints_1.zoomOut(rangeValue, magnifyAmount, centerValue)); };
206
+ var magnifyTransform = function (rangeValue) { return _this.invert((0, panZoomConstraints_1.zoomOut)(rangeValue, magnifyAmount, centerValue)); };
206
207
  this.domain(this.range().map(magnifyTransform));
207
208
  };
208
209
  QuantitativeScale.prototype.pan = function (translateAmount) {
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import * as Scales from "./";
2
6
  export declare type TransformableScale<D, R> = Scale<D, R> & Scales.ITransformableScale;
3
7
  export interface IScaleCallback<S extends Scale<any, any>> {
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Scale = void 0;
7
8
  var Utils = require("../utils");
8
9
  var Scale = /** @class */ (function () {
9
10
  /**