Skip to content

[V1.12.0] Set SelectionBox Extents in Data Space

Choose a tag to compare

@crmorford crmorford released this 18 Sep 18:21
· 1003 commits to develop since this release

This week Plottable is releasing a new API endpoint for setting the bounds of SelectionBoxLayers in data space; this was previously only possible in pixel space.

We've also made bugfixes for clipPaths caused by URL changes. The center orientation on Axes.Time in the bottom orientation will now show all labels. The callbacks on DragBoxLayers are properly removed when the DragBoxLayer is destroy()ed.

Features

Extent setters on SelectionBoxLayer

Users can now set the position of a SelectionBoxLayer in data-space, by passing in data values instead of pixel positions:

API Changes:

/**
 * Sets the data values backing the left and right edges of the box.
 */
xExtent(xExtent: (number | { valueOf(): number; })[]): SelectionBoxLayer;
/**
 * Sets the data values backing the top and bottom edges of the box.
 */
yExtent(yExtent: (number | { valueOf(): number; })[]): SelectionBoxLayer;

Try it out: http://jsfiddle.net/bluong63/ewga1des/

Bug Fixes

  • DragBoxLayer properly disconnects from its callbacks when destroy()ed or detach()ed. Previously, the callbacks associated with the DragBoxLayer would be called while it was detach()ed or had been destroy()ed (#2553).
  • We were made aware of a bug where URL changes would cause a clipPath to stop working, and Components could extend out of their cell on a Table. Components with clipPaths update their reference when re-rendering after the URL changes. (#2733).
  • In bottom orientation TimeAxis, TickLabels are now visible when tickLabelPosition is set to center. Previously they were hidden.
    (#2725)