plottable 3.9.0-dev-56-geb1f7fd → 3.9.0-dev-60-g2ae4d07

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 (182) 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 +23 -4
  6. package/build/src/axes/axis.js +35 -6
  7. package/build/src/axes/categoryAxis.d.ts +12 -5
  8. package/build/src/axes/categoryAxis.js +22 -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 +21 -14
  13. package/build/src/axes/timeAxis.js +30 -7
  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.d.ts +4 -0
  29. package/build/src/components/label.js +7 -3
  30. package/build/src/components/legend.d.ts +5 -1
  31. package/build/src/components/legend.js +2 -1
  32. package/build/src/components/plotGroup.js +2 -1
  33. package/build/src/components/selectionBoxLayer.d.ts +4 -4
  34. package/build/src/components/selectionBoxLayer.js +2 -1
  35. package/build/src/components/table.d.ts +10 -6
  36. package/build/src/components/table.js +4 -3
  37. package/build/src/components/wrappedLabel.js +2 -1
  38. package/build/src/components/xDragBoxLayer.js +2 -1
  39. package/build/src/components/yDragBoxLayer.js +2 -1
  40. package/build/src/core/config.js +1 -0
  41. package/build/src/core/dataset.d.ts +5 -1
  42. package/build/src/core/dataset.js +1 -0
  43. package/build/src/core/formatters.d.ts +4 -0
  44. package/build/src/core/formatters.js +1 -0
  45. package/build/src/core/renderController.d.ts +1 -1
  46. package/build/src/core/renderController.js +2 -1
  47. package/build/src/core/renderPolicy.d.ts +4 -0
  48. package/build/src/core/renderPolicy.js +1 -0
  49. package/build/src/core/symbolFactories.d.ts +4 -0
  50. package/build/src/core/symbolFactories.js +1 -0
  51. package/build/src/core/version.d.ts +4 -0
  52. package/build/src/core/version.js +2 -1
  53. package/build/src/core/version.js.bak +1 -0
  54. package/build/src/dispatchers/dispatcher.d.ts +7 -3
  55. package/build/src/dispatchers/dispatcher.js +2 -1
  56. package/build/src/dispatchers/index.js +3 -3
  57. package/build/src/dispatchers/keyDispatcher.d.ts +2 -2
  58. package/build/src/dispatchers/keyDispatcher.js +2 -1
  59. package/build/src/dispatchers/mouseDispatcher.d.ts +1 -1
  60. package/build/src/dispatchers/mouseDispatcher.js +2 -1
  61. package/build/src/dispatchers/touchDispatcher.d.ts +1 -1
  62. package/build/src/dispatchers/touchDispatcher.js +2 -1
  63. package/build/src/drawers/arcDrawer.js +2 -1
  64. package/build/src/drawers/arcOutlineDrawer.js +2 -1
  65. package/build/src/drawers/areaDrawer.js +6 -5
  66. package/build/src/drawers/canvasBuffer.js +1 -0
  67. package/build/src/drawers/canvasDrawer.js +1 -0
  68. package/build/src/drawers/drawer.js +1 -0
  69. package/build/src/drawers/index.js +11 -10
  70. package/build/src/drawers/lineDrawer.js +4 -3
  71. package/build/src/drawers/rectangleDrawer.js +7 -5
  72. package/build/src/drawers/segmentDrawer.js +2 -1
  73. package/build/src/drawers/svgDrawer.d.ts +2 -2
  74. package/build/src/drawers/svgDrawer.js +1 -0
  75. package/build/src/drawers/symbolDrawer.js +6 -6
  76. package/build/src/index.d.ts +1 -1
  77. package/build/src/index.js +17 -14
  78. package/build/src/interactions/clickInteraction.d.ts +4 -4
  79. package/build/src/interactions/clickInteraction.js +2 -1
  80. package/build/src/interactions/dragInteraction.d.ts +4 -4
  81. package/build/src/interactions/dragInteraction.js +2 -1
  82. package/build/src/interactions/index.js +7 -6
  83. package/build/src/interactions/interaction.d.ts +2 -2
  84. package/build/src/interactions/interaction.js +1 -0
  85. package/build/src/interactions/keyInteraction.d.ts +2 -2
  86. package/build/src/interactions/keyInteraction.js +2 -1
  87. package/build/src/interactions/panZoomConstraints.js +1 -0
  88. package/build/src/interactions/panZoomInteraction.d.ts +13 -9
  89. package/build/src/interactions/panZoomInteraction.js +4 -3
  90. package/build/src/interactions/pointerInteraction.d.ts +3 -3
  91. package/build/src/interactions/pointerInteraction.js +2 -1
  92. package/build/src/memoize/index.js +5 -4
  93. package/build/src/memoize/memThunk.js +2 -1
  94. package/build/src/memoize/memoize.d.ts +5 -0
  95. package/build/src/memoize/memoize.js +2 -1
  96. package/build/src/memoize/memoizeProjectors.js +3 -2
  97. package/build/src/memoize/signature.d.ts +14 -0
  98. package/build/src/memoize/signature.js +4 -3
  99. package/build/src/plots/areaPlot.d.ts +9 -5
  100. package/build/src/plots/areaPlot.js +4 -3
  101. package/build/src/plots/barPlot.d.ts +26 -22
  102. package/build/src/plots/barPlot.js +35 -7
  103. package/build/src/plots/clusteredBarPlot.d.ts +3 -5
  104. package/build/src/plots/clusteredBarPlot.js +2 -1
  105. package/build/src/plots/commons.js +1 -0
  106. package/build/src/plots/deferredRenderer.d.ts +1 -1
  107. package/build/src/plots/deferredRenderer.js +1 -0
  108. package/build/src/plots/index.js +12 -12
  109. package/build/src/plots/linePlot.d.ts +6 -6
  110. package/build/src/plots/linePlot.js +5 -4
  111. package/build/src/plots/piePlot.d.ts +9 -5
  112. package/build/src/plots/piePlot.js +3 -2
  113. package/build/src/plots/plot.d.ts +5 -5
  114. package/build/src/plots/plot.js +7 -6
  115. package/build/src/plots/rectanglePlot.d.ts +10 -6
  116. package/build/src/plots/rectanglePlot.js +2 -1
  117. package/build/src/plots/scatterPlot.d.ts +19 -9
  118. package/build/src/plots/scatterPlot.js +35 -3
  119. package/build/src/plots/segmentPlot.d.ts +7 -3
  120. package/build/src/plots/segmentPlot.js +3 -2
  121. package/build/src/plots/stackedAreaPlot.d.ts +6 -2
  122. package/build/src/plots/stackedAreaPlot.js +4 -3
  123. package/build/src/plots/stackedBarPlot.d.ts +8 -4
  124. package/build/src/plots/stackedBarPlot.js +27 -6
  125. package/build/src/plots/waterfallPlot.d.ts +4 -6
  126. package/build/src/plots/waterfallPlot.js +2 -1
  127. package/build/src/plots/xyPlot.d.ts +5 -5
  128. package/build/src/plots/xyPlot.js +2 -1
  129. package/build/src/scales/categoryScale.d.ts +7 -3
  130. package/build/src/scales/categoryScale.js +3 -2
  131. package/build/src/scales/colorScale.d.ts +5 -1
  132. package/build/src/scales/colorScale.js +2 -1
  133. package/build/src/scales/index.d.ts +1 -1
  134. package/build/src/scales/index.js +8 -7
  135. package/build/src/scales/interpolatedColorScale.d.ts +7 -3
  136. package/build/src/scales/interpolatedColorScale.js +5 -4
  137. package/build/src/scales/linearScale.d.ts +4 -0
  138. package/build/src/scales/linearScale.js +2 -1
  139. package/build/src/scales/logScale.d.ts +4 -0
  140. package/build/src/scales/logScale.js +2 -1
  141. package/build/src/scales/modifiedLogScale.d.ts +8 -4
  142. package/build/src/scales/modifiedLogScale.js +2 -1
  143. package/build/src/scales/quantitativeScale.d.ts +5 -1
  144. package/build/src/scales/quantitativeScale.js +3 -2
  145. package/build/src/scales/scale.d.ts +4 -0
  146. package/build/src/scales/scale.js +1 -0
  147. package/build/src/scales/tickGenerators.js +1 -0
  148. package/build/src/scales/timeScale.js +2 -1
  149. package/build/src/utils/addD3SelectionMulti.d.ts +8 -0
  150. package/build/src/utils/arrayUtils.d.ts +4 -0
  151. package/build/src/utils/arrayUtils.js +1 -0
  152. package/build/src/utils/bucket.js +1 -0
  153. package/build/src/utils/callbackSet.js +2 -1
  154. package/build/src/utils/coerceD3.js +1 -0
  155. package/build/src/utils/colorUtils.d.ts +4 -0
  156. package/build/src/utils/colorUtils.js +1 -0
  157. package/build/src/utils/domUtils.d.ts +3 -10
  158. package/build/src/utils/domUtils.js +1 -0
  159. package/build/src/utils/entityStore.js +1 -0
  160. package/build/src/utils/index.d.ts +1 -1
  161. package/build/src/utils/index.js +9 -8
  162. package/build/src/utils/makeEnum.js +1 -0
  163. package/build/src/utils/map.d.ts +4 -0
  164. package/build/src/utils/map.js +1 -0
  165. package/build/src/utils/mathUtils.d.ts +4 -0
  166. package/build/src/utils/mathUtils.js +3 -2
  167. package/build/src/utils/objectUtils.js +1 -0
  168. package/build/src/utils/rTree.d.ts +1 -1
  169. package/build/src/utils/rTree.js +1 -0
  170. package/build/src/utils/rTreeSplitStrategies.d.ts +2 -2
  171. package/build/src/utils/rTreeSplitStrategies.js +1 -0
  172. package/build/src/utils/set.js +1 -0
  173. package/build/src/utils/stackingUtils.d.ts +5 -1
  174. package/build/src/utils/stackingUtils.js +6 -5
  175. package/build/src/utils/transformAwareTranslator.d.ts +4 -0
  176. package/build/src/utils/transformAwareTranslator.js +1 -0
  177. package/build/src/utils/windowUtils.d.ts +4 -0
  178. package/build/src/utils/windowUtils.js +1 -0
  179. package/package.json +6 -5
  180. package/plottable.css +75 -2
  181. package/plottable.js +38050 -26170
  182. package/plottable.js.map +1 -1
@@ -4,14 +4,15 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Component = exports.YAlignment = exports.XAlignment = void 0;
7
8
  var d3 = require("d3");
8
9
  var RenderController = require("../core/renderController");
9
10
  var Utils = require("../utils");
10
- var lodash_1 = require("lodash");
11
+ var lodash_es_1 = require("lodash-es");
11
12
  var coerceD3_1 = require("../utils/coerceD3");
12
13
  var makeEnum_1 = require("../utils/makeEnum");
13
- exports.XAlignment = makeEnum_1.makeEnum(["left", "center", "right"]);
14
- exports.YAlignment = makeEnum_1.makeEnum(["top", "center", "bottom"]);
14
+ exports.XAlignment = (0, makeEnum_1.makeEnum)(["left", "center", "right"]);
15
+ exports.YAlignment = (0, makeEnum_1.makeEnum)(["top", "center", "bottom"]);
15
16
  /**
16
17
  * Components are the core logical units that build Plottable visualizations.
17
18
  *
@@ -48,7 +49,7 @@ var Component = /** @class */ (function () {
48
49
  * @returns {Component} The calling Component.
49
50
  */
50
51
  Component.prototype.anchor = function (selection) {
51
- selection = coerceD3_1.coerceExternalD3(selection);
52
+ selection = (0, coerceD3_1.coerceExternalD3)(selection);
52
53
  if (this._destroyed) {
53
54
  throw new Error("Can't reuse destroy()-ed Components!");
54
55
  }
@@ -287,11 +288,11 @@ var Component = /** @class */ (function () {
287
288
  if (typeof (element) === "string") {
288
289
  selection = d3.select(element);
289
290
  }
290
- else if (lodash_1.isElement(element)) {
291
+ else if ((0, lodash_es_1.isElement)(element)) {
291
292
  selection = d3.select(element);
292
293
  }
293
294
  else {
294
- selection = coerceD3_1.coerceExternalD3(element);
295
+ selection = (0, coerceD3_1.coerceExternalD3)(element);
295
296
  }
296
297
  if (!selection.node() || selection.node().nodeName == null) {
297
298
  throw new Error("Plottable requires a valid Element to renderTo");
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ComponentContainer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var coerceD3_1 = require("../utils/coerceD3");
9
10
  var component_1 = require("./component");
@@ -12,7 +13,7 @@ var component_1 = require("./component");
12
13
  * It will not do anything if instantiated directly.
13
14
  */
14
15
  var ComponentContainer = /** @class */ (function (_super) {
15
- tslib_1.__extends(ComponentContainer, _super);
16
+ (0, tslib_1.__extends)(ComponentContainer, _super);
16
17
  function ComponentContainer() {
17
18
  var _this = _super.call(this) || this;
18
19
  _this._detachCallback = function (component) { return _this.remove(component); };
@@ -20,7 +21,7 @@ var ComponentContainer = /** @class */ (function (_super) {
20
21
  }
21
22
  ComponentContainer.prototype.anchor = function (selection) {
22
23
  var _this = this;
23
- selection = coerceD3_1.coerceExternalD3(selection);
24
+ selection = (0, coerceD3_1.coerceExternalD3)(selection);
24
25
  _super.prototype.anchor.call(this, selection);
25
26
  this._forEach(function (c) { return c.anchor(_this.element()); });
26
27
  return this;
@@ -35,9 +35,9 @@ export declare class DragBoxLayer extends SelectionBoxLayer {
35
35
  * @constructor
36
36
  */
37
37
  constructor();
38
- private _setUpCallbacks();
38
+ private _setUpCallbacks;
39
39
  protected _setup(): void;
40
- private _getResizingEdges(p);
40
+ private _getResizingEdges;
41
41
  renderImmediately(): this;
42
42
  /**
43
43
  * Gets the detection radius of the drag box in pixels.
@@ -73,7 +73,7 @@ export declare class DragBoxLayer extends SelectionBoxLayer {
73
73
  * @return {DragBoxLayer} The calling DragBoxLayer.
74
74
  */
75
75
  movable(movable: boolean): this;
76
- private _setMovableClass();
76
+ private _setMovableClass;
77
77
  /**
78
78
  * Sets the callback to be called when dragging starts.
79
79
  *
@@ -131,5 +131,5 @@ export declare class DragBoxLayer extends SelectionBoxLayer {
131
131
  destroy(): void;
132
132
  detach(): this;
133
133
  anchor(selection: d3.Selection<HTMLElement, any, any, any>): this;
134
- private _resetState();
134
+ private _resetState;
135
135
  }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.DragBoxLayer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Interactions = require("../interactions");
9
10
  var Utils = require("../utils");
@@ -11,7 +12,7 @@ var coerceD3_1 = require("../utils/coerceD3");
11
12
  var _1 = require("./");
12
13
  var selectionBoxLayer_1 = require("./selectionBoxLayer");
13
14
  var DragBoxLayer = /** @class */ (function (_super) {
14
- tslib_1.__extends(DragBoxLayer, _super);
15
+ (0, tslib_1.__extends)(DragBoxLayer, _super);
15
16
  /**
16
17
  * Constructs a DragBoxLayer.
17
18
  *
@@ -360,7 +361,7 @@ var DragBoxLayer = /** @class */ (function (_super) {
360
361
  return this;
361
362
  };
362
363
  DragBoxLayer.prototype.anchor = function (selection) {
363
- selection = coerceD3_1.coerceExternalD3(selection);
364
+ selection = (0, coerceD3_1.coerceExternalD3)(selection);
364
365
  this._dragInteraction.attachTo(this);
365
366
  _super.prototype.anchor.call(this, selection);
366
367
  return this;
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.DragLineLayer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var guideLineLayer_1 = require("../components/guideLineLayer");
9
10
  var Interactions = require("../interactions");
10
11
  var Utils = require("../utils");
11
12
  var DragLineLayer = /** @class */ (function (_super) {
12
- tslib_1.__extends(DragLineLayer, _super);
13
+ (0, tslib_1.__extends)(DragLineLayer, _super);
13
14
  function DragLineLayer(orientation) {
14
15
  var _this = _super.call(this, orientation) || this;
15
16
  _this._detectionRadius = 3;
@@ -53,6 +53,6 @@ export declare class Gridlines extends Component {
53
53
  protected _setup(): void;
54
54
  renderImmediately(): this;
55
55
  computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): this;
56
- private _redrawXLines();
57
- private _redrawYLines();
56
+ private _redrawXLines;
57
+ private _redrawYLines;
58
58
  }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Gridlines = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var component_1 = require("./component");
9
10
  /**
@@ -38,7 +39,7 @@ function gridPositionFactory(scale, between, orderedTicks) {
38
39
  };
39
40
  }
40
41
  var Gridlines = /** @class */ (function (_super) {
41
- tslib_1.__extends(Gridlines, _super);
42
+ (0, tslib_1.__extends)(Gridlines, _super);
42
43
  /**
43
44
  * @constructor
44
45
  * @param {Scale} xScale The scale to base the x gridlines on. Pass null if no gridlines are desired.
@@ -4,11 +4,12 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Group = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Utils = require("../utils");
9
10
  var componentContainer_1 = require("./componentContainer");
10
11
  var Group = /** @class */ (function (_super) {
11
- tslib_1.__extends(Group, _super);
12
+ (0, tslib_1.__extends)(Group, _super);
12
13
  /**
13
14
  * Constructs a Group.
14
15
  *
@@ -26,7 +26,7 @@ export declare class GuideLineLayer<D> extends Component {
26
26
  fixedHeight(): boolean;
27
27
  computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): this;
28
28
  renderImmediately(): this;
29
- private _syncPixelPositionAndValue();
29
+ private _syncPixelPositionAndValue;
30
30
  protected _setPixelPositionWithoutChangingMode(pixelPosition: number): void;
31
31
  /**
32
32
  * Gets the QuantitativeScale on the GuideLineLayer.
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.GuideLineLayer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Utils = require("../utils");
9
10
  var component_1 = require("./component");
@@ -13,7 +14,7 @@ var PropertyMode;
13
14
  PropertyMode[PropertyMode["PIXEL"] = 1] = "PIXEL";
14
15
  })(PropertyMode || (PropertyMode = {}));
15
16
  var GuideLineLayer = /** @class */ (function (_super) {
16
- tslib_1.__extends(GuideLineLayer, _super);
17
+ (0, tslib_1.__extends)(GuideLineLayer, _super);
17
18
  function GuideLineLayer(orientation) {
18
19
  var _this = _super.call(this) || this;
19
20
  _this._mode = PropertyMode.VALUE;
@@ -5,17 +5,17 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  var tslib_1 = require("tslib");
8
- tslib_1.__exportStar(require("./dragBoxLayer"), exports);
9
- tslib_1.__exportStar(require("./dragLineLayer"), exports);
10
- tslib_1.__exportStar(require("./gridlines"), exports);
11
- tslib_1.__exportStar(require("./group"), exports);
12
- tslib_1.__exportStar(require("./guideLineLayer"), exports);
13
- tslib_1.__exportStar(require("./interpolatedColorLegend"), exports);
14
- tslib_1.__exportStar(require("./label"), exports);
15
- tslib_1.__exportStar(require("./legend"), exports);
16
- tslib_1.__exportStar(require("./plotGroup"), exports);
17
- tslib_1.__exportStar(require("./selectionBoxLayer"), exports);
18
- tslib_1.__exportStar(require("./table"), exports);
19
- tslib_1.__exportStar(require("./wrappedLabel"), exports);
20
- tslib_1.__exportStar(require("./xDragBoxLayer"), exports);
21
- tslib_1.__exportStar(require("./yDragBoxLayer"), exports);
8
+ (0, tslib_1.__exportStar)(require("./dragBoxLayer"), exports);
9
+ (0, tslib_1.__exportStar)(require("./dragLineLayer"), exports);
10
+ (0, tslib_1.__exportStar)(require("./gridlines"), exports);
11
+ (0, tslib_1.__exportStar)(require("./group"), exports);
12
+ (0, tslib_1.__exportStar)(require("./guideLineLayer"), exports);
13
+ (0, tslib_1.__exportStar)(require("./interpolatedColorLegend"), exports);
14
+ (0, tslib_1.__exportStar)(require("./label"), exports);
15
+ (0, tslib_1.__exportStar)(require("./legend"), exports);
16
+ (0, tslib_1.__exportStar)(require("./plotGroup"), exports);
17
+ (0, tslib_1.__exportStar)(require("./selectionBoxLayer"), exports);
18
+ (0, tslib_1.__exportStar)(require("./table"), exports);
19
+ (0, tslib_1.__exportStar)(require("./wrappedLabel"), exports);
20
+ (0, tslib_1.__exportStar)(require("./xDragBoxLayer"), exports);
21
+ (0, tslib_1.__exportStar)(require("./yDragBoxLayer"), exports);
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { Formatter } from "../core/formatters";
2
6
  import { SpaceRequest } from "../core/interfaces";
3
7
  import * as Scales from "../scales";
@@ -57,7 +61,7 @@ export declare class InterpolatedColorLegend extends Component {
57
61
  * @returns {InterpolatedColorLegend} The calling InterpolatedColorLegend.
58
62
  */
59
63
  expands(expands: boolean): this;
60
- private static _ensureOrientation(orientation);
64
+ private static _ensureOrientation;
61
65
  /**
62
66
  * Gets the orientation.
63
67
  */
@@ -71,9 +75,9 @@ export declare class InterpolatedColorLegend extends Component {
71
75
  orientation(orientation: string): this;
72
76
  fixedWidth(): boolean;
73
77
  fixedHeight(): boolean;
74
- private _generateTicks(numSwatches?);
78
+ private _generateTicks;
75
79
  protected _setup(): void;
76
80
  requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest;
77
- private _isVertical();
81
+ private _isVertical;
78
82
  renderImmediately(): this;
79
83
  }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.InterpolatedColorLegend = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Typesettable = require("typesettable");
9
10
  var Configs = require("../core/config");
@@ -11,7 +12,7 @@ var Formatters = require("../core/formatters");
11
12
  var Utils = require("../utils");
12
13
  var component_1 = require("./component");
13
14
  var InterpolatedColorLegend = /** @class */ (function (_super) {
14
- tslib_1.__extends(InterpolatedColorLegend, _super);
15
+ (0, tslib_1.__extends)(InterpolatedColorLegend, _super);
15
16
  /**
16
17
  * Creates an InterpolatedColorLegend.
17
18
  *
@@ -186,7 +187,7 @@ var InterpolatedColorLegend = /** @class */ (function (_super) {
186
187
  lowerWriteOptions.xAlign = "right";
187
188
  lowerLabelShift.x = -(padding + swatchWidth + textPadding);
188
189
  }
189
- else {
190
+ else { // right
190
191
  swatchX = function (d, i) { return padding; };
191
192
  upperWriteOptions.xAlign = "left";
192
193
  upperLabelShift.x = padding + swatchWidth + textPadding;
@@ -196,7 +197,7 @@ var InterpolatedColorLegend = /** @class */ (function (_super) {
196
197
  boundingBoxAttr["width"] = swatchWidth;
197
198
  boundingBoxAttr["height"] = numSwatches * swatchHeight;
198
199
  }
199
- else {
200
+ else { // horizontal
200
201
  padding = Math.max(textPadding, (this.height() - textHeight) / 2);
201
202
  numSwatches = Math.max(Math.floor(this.width() - textPadding * 4 - text0Width - text1Width), 0);
202
203
  swatchWidth = 1;
@@ -5,7 +5,11 @@
5
5
  import * as Typesettable from "typesettable";
6
6
  import { SimpleSelection, SpaceRequest } from "../core/interfaces";
7
7
  import { Component } from "./component";
8
+ export declare type LabelFontSizePx = 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
8
9
  export declare class Label extends Component {
10
+ static _MIN_FONT_SIZE_PX: LabelFontSizePx;
11
+ static _MAX_FONT_SIZE_PX: LabelFontSizePx;
12
+ static _DEFAULT_FONT_SIZE_PX: LabelFontSizePx;
9
13
  protected _textContainer: SimpleSelection<void>;
10
14
  protected _text: string;
11
15
  protected _angle: number;
@@ -4,11 +4,12 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.AxisLabel = exports.TitleLabel = exports.Label = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Typesettable = require("typesettable");
9
10
  var component_1 = require("./component");
10
11
  var Label = /** @class */ (function (_super) {
11
- tslib_1.__extends(Label, _super);
12
+ (0, tslib_1.__extends)(Label, _super);
12
13
  /**
13
14
  * A Label is a Component that displays a single line of text.
14
15
  *
@@ -122,11 +123,14 @@ var Label = /** @class */ (function (_super) {
122
123
  _super.prototype.invalidateCache.call(this);
123
124
  this._measurer.reset();
124
125
  };
126
+ Label._MIN_FONT_SIZE_PX = 12;
127
+ Label._MAX_FONT_SIZE_PX = 24;
128
+ Label._DEFAULT_FONT_SIZE_PX = 12;
125
129
  return Label;
126
130
  }(component_1.Component));
127
131
  exports.Label = Label;
128
132
  var TitleLabel = /** @class */ (function (_super) {
129
- tslib_1.__extends(TitleLabel, _super);
133
+ (0, tslib_1.__extends)(TitleLabel, _super);
130
134
  /**
131
135
  * @constructor
132
136
  * @param {string} [text]
@@ -142,7 +146,7 @@ var TitleLabel = /** @class */ (function (_super) {
142
146
  }(Label));
143
147
  exports.TitleLabel = TitleLabel;
144
148
  var AxisLabel = /** @class */ (function (_super) {
145
- tslib_1.__extends(AxisLabel, _super);
149
+ (0, tslib_1.__extends)(AxisLabel, _super);
146
150
  /**
147
151
  * @constructor
148
152
  * @param {string} [text]
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { Formatter } from "../core/formatters";
2
6
  import { IEntity, Point, SpaceRequest } from "../core/interfaces";
3
7
  import { SymbolFactory } from "../core/symbolFactories";
@@ -119,7 +123,7 @@ export declare class Legend extends Component {
119
123
  */
120
124
  colorScale(colorScale: Scales.Color): this;
121
125
  destroy(): void;
122
- private _buildLegendTable(width, height);
126
+ private _buildLegendTable;
123
127
  requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest;
124
128
  /**
125
129
  * Gets the Entities (representing Legend entries) at a particular point.
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Legend = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var Typesettable = require("typesettable");
@@ -179,7 +180,7 @@ var LegendTable = /** @class */ (function () {
179
180
  return LegendTable;
180
181
  }());
181
182
  var Legend = /** @class */ (function (_super) {
182
- tslib_1.__extends(Legend, _super);
183
+ (0, tslib_1.__extends)(Legend, _super);
183
184
  /**
184
185
  * The Legend consists of a series of entries, each with a color and label taken from the Color Scale.
185
186
  *
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.PlotGroup = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var plot_1 = require("../plots/plot");
9
10
  var Utils = require("../utils");
10
11
  var group_1 = require("./group");
11
12
  var PlotGroup = /** @class */ (function (_super) {
12
- tslib_1.__extends(PlotGroup, _super);
13
+ (0, tslib_1.__extends)(PlotGroup, _super);
13
14
  function PlotGroup() {
14
15
  return _super !== null && _super.apply(this, arguments) || this;
15
16
  }
@@ -7,7 +7,7 @@ import { QuantitativeScale } from "../scales/quantitativeScale";
7
7
  import { Component } from "./component";
8
8
  export declare enum PropertyMode {
9
9
  VALUE = 0,
10
- PIXEL = 1,
10
+ PIXEL = 1
11
11
  }
12
12
  export declare class SelectionBoxLayer extends Component {
13
13
  protected _box: SimpleSelection<void>;
@@ -39,7 +39,7 @@ export declare class SelectionBoxLayer extends Component {
39
39
  */
40
40
  bounds(newBounds: Bounds): this;
41
41
  protected _setBounds(newBounds: Bounds): void;
42
- private _getBounds();
42
+ private _getBounds;
43
43
  renderImmediately(): this;
44
44
  /**
45
45
  * Gets whether the box is being shown.
@@ -96,7 +96,7 @@ export declare class SelectionBoxLayer extends Component {
96
96
  xExtent(xExtent: (number | {
97
97
  valueOf(): number;
98
98
  })[]): this;
99
- private _getXExtent();
99
+ private _getXExtent;
100
100
  protected _setXExtent(xExtent: (number | {
101
101
  valueOf(): number;
102
102
  })[]): void;
@@ -114,7 +114,7 @@ export declare class SelectionBoxLayer extends Component {
114
114
  yExtent(yExtent: (number | {
115
115
  valueOf(): number;
116
116
  })[]): this;
117
- private _getYExtent();
117
+ private _getYExtent;
118
118
  protected _setYExtent(yExtent: (number | {
119
119
  valueOf(): number;
120
120
  })[]): void;
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.SelectionBoxLayer = exports.PropertyMode = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Utils = require("../utils");
9
10
  var component_1 = require("./component");
@@ -13,7 +14,7 @@ var PropertyMode;
13
14
  PropertyMode[PropertyMode["PIXEL"] = 1] = "PIXEL";
14
15
  })(PropertyMode = exports.PropertyMode || (exports.PropertyMode = {}));
15
16
  var SelectionBoxLayer = /** @class */ (function (_super) {
16
- tslib_1.__extends(SelectionBoxLayer, _super);
17
+ (0, tslib_1.__extends)(SelectionBoxLayer, _super);
17
18
  function SelectionBoxLayer() {
18
19
  var _this = _super.call(this) || this;
19
20
  _this._boxVisible = false;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { Point, SpaceRequest } from "../core/interfaces";
2
6
  import { Component } from "./component";
3
7
  import { ComponentContainer } from "./componentContainer";
@@ -53,8 +57,8 @@ export declare class Table extends ComponentContainer {
53
57
  */
54
58
  add(component: Component, row: number, col: number): this;
55
59
  protected _remove(component: Component): boolean;
56
- private _iterateLayout(availableWidth, availableHeight, isFinalOffer?);
57
- private _determineGuarantees(offeredWidths, offeredHeights, isFinalOffer?);
60
+ private _iterateLayout;
61
+ private _determineGuarantees;
58
62
  requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest;
59
63
  computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): this;
60
64
  /**
@@ -130,8 +134,8 @@ export declare class Table extends ComponentContainer {
130
134
  columnWeight(index: number, weight: number): this;
131
135
  fixedWidth(): boolean;
132
136
  fixedHeight(): boolean;
133
- private _padTableToSize(nRows, nCols);
134
- private static _calcComponentWeights(setWeights, componentGroups, fixityAccessor);
135
- private static _calcProportionalSpace(weights, freeSpace);
136
- private static _fixedSpace(componentGroup, fixityAccessor);
137
+ private _padTableToSize;
138
+ private static _calcComponentWeights;
139
+ private static _calcProportionalSpace;
140
+ private static _fixedSpace;
137
141
  }
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Table = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var Utils = require("../utils");
10
11
  var componentContainer_1 = require("./componentContainer");
11
12
  var Table = /** @class */ (function (_super) {
12
- tslib_1.__extends(Table, _super);
13
+ (0, tslib_1.__extends)(Table, _super);
13
14
  /**
14
15
  * A Table combines Components in the form of a grid. A
15
16
  * common case is combining a y-axis, x-axis, and the plotted data via
@@ -179,11 +180,11 @@ var Table = /** @class */ (function (_super) {
179
180
  freeWidth = availableWidthAfterPadding - d3.sum(guarantees.guaranteedWidths);
180
181
  freeHeight = availableHeightAfterPadding - d3.sum(guarantees.guaranteedHeights);
181
182
  var xWeights = void 0;
182
- if (wantsWidth) {
183
+ if (wantsWidth) { // If something wants width, divide free space between components that want more width
183
184
  xWeights = guarantees.wantsWidthArr.map(function (x) { return x ? 0.1 : 0; });
184
185
  xWeights = Utils.Array.add(xWeights, colWeights);
185
186
  }
186
- else {
187
+ else { // Otherwise, divide free space according to the weights
187
188
  xWeights = colWeights;
188
189
  }
189
190
  var yWeights = void 0;
@@ -4,11 +4,12 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.WrappedLabel = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var label_1 = require("./label");
9
10
  var DEFAULT_MAX_LINES = 2;
10
11
  var WrappedLabel = /** @class */ (function (_super) {
11
- tslib_1.__extends(WrappedLabel, _super);
12
+ (0, tslib_1.__extends)(WrappedLabel, _super);
12
13
  function WrappedLabel() {
13
14
  var _this = _super !== null && _super.apply(this, arguments) || this;
14
15
  _this._maxLines = DEFAULT_MAX_LINES;
@@ -4,10 +4,11 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.XDragBoxLayer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var dragBoxLayer_1 = require("./dragBoxLayer");
9
10
  var XDragBoxLayer = /** @class */ (function (_super) {
10
- tslib_1.__extends(XDragBoxLayer, _super);
11
+ (0, tslib_1.__extends)(XDragBoxLayer, _super);
11
12
  /**
12
13
  * An XDragBoxLayer is a DragBoxLayer whose size can only be set in the X-direction.
13
14
  * The y-values of the bounds() are always set to 0 and the height() of the XDragBoxLayer.
@@ -4,10 +4,11 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.YDragBoxLayer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var dragBoxLayer_1 = require("./dragBoxLayer");
9
10
  var YDragBoxLayer = /** @class */ (function (_super) {
10
- tslib_1.__extends(YDragBoxLayer, _super);
11
+ (0, tslib_1.__extends)(YDragBoxLayer, _super);
11
12
  /**
12
13
  * A YDragBoxLayer is a DragBoxLayer whose size can only be set in the Y-direction.
13
14
  * The x-values of the bounds() are always set to 0 and the width() of the YDragBoxLayer.
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ADD_TITLE_ELEMENTS = exports.SHOW_WARNINGS = void 0;
7
8
  /**
8
9
  * Specifies if Plottable should show warnings.
9
10
  */
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  export declare type DatasetCallback = (dataset: Dataset) => void;
2
6
  export declare class Dataset {
3
7
  private _data;
@@ -59,5 +63,5 @@ export declare class Dataset {
59
63
  */
60
64
  metadata(metadata: any): this;
61
65
  updateId(): number;
62
- private _dispatchUpdate();
66
+ private _dispatchUpdate;
63
67
  }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Dataset = void 0;
7
8
  var Utils = require("../utils");
8
9
  var UPDATE_MONOTONIC = 0;
9
10
  var Dataset = /** @class */ (function () {
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { Dataset } from "./dataset";
2
6
  /**
3
7
  * A basic formatter function that will be passed a value to format (e.g. the tick value for axes).
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.time = exports.multiTime = exports.shortScale = exports.siSuffix = exports.percentage = exports.identity = exports.general = exports.fixed = exports.currency = void 0;
7
8
  var d3 = require("d3");
8
9
  // Do not use utc by default
9
10
  var DEFAULT_USE_UTC = false;
@@ -5,9 +5,9 @@
5
5
  import { Component } from "../components/component";
6
6
  import * as RenderPolicies from "./renderPolicy";
7
7
  export declare const Policy: {
8
+ timeout: "timeout";
8
9
  immediate: "immediate";
9
10
  animationFrame: "animationFrame";
10
- timeout: "timeout";
11
11
  };
12
12
  export declare type Policy = keyof typeof Policy;
13
13
  export declare function renderPolicy(): RenderPolicies.IRenderPolicy;
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.flush = exports.registerToComputeLayout = exports.registerToComputeLayoutAndRender = exports.registerToRender = exports.renderPolicy = exports.Policy = void 0;
7
8
  var Utils = require("../utils");
8
9
  var makeEnum_1 = require("../utils/makeEnum");
9
10
  var RenderPolicies = require("./renderPolicy");
@@ -27,7 +28,7 @@ var _componentsNeedingRender = new Utils.Set();
27
28
  var _componentsNeedingComputeLayout = new Utils.Set();
28
29
  var _animationRequested = false;
29
30
  var _isCurrentlyFlushing = false;
30
- exports.Policy = makeEnum_1.makeEnum(["immediate", "animationFrame", "timeout"]);
31
+ exports.Policy = (0, makeEnum_1.makeEnum)(["immediate", "animationFrame", "timeout"]);
31
32
  var _renderPolicy = new RenderPolicies.AnimationFrame();
32
33
  function renderPolicy(renderPolicy) {
33
34
  if (renderPolicy == null) {