Skip to content

Releases: palantir/plottable

v2.4.0

01 Dec 22:54
Compare
Choose a tag to compare

Features

tickLabelMaxWidth

Adds a new property tickLabelMaxWidth on Categorical axes. When set, tick labels will be truncated with ellipsis to be at most tickLabelMaxWidth() pixels wide, and will also never span more than one line. This ensures the axis doesn't grow to an undesirable width (or, through wrapping, grow to an undesirable height).

Typescript API Breaks

  • Typescript 1.8 and above is now required since we are now using string literals in our codebase.
  • Axis orientations previously were any "string" type, but now we've defined a string literal type AxisOrientation = "left" | "top" | "right" | "bottom" that Axis.orientation() sets/gets.

Upgrade Notes

  • Existing users who pass a "string" type into orientation may get an "Argument of type 'string' is not assignable to parameter of type 'AxisOrientation'." error. Ensure the string you're passing in really is only one of the four orientations ("left" | "top" | "right" | "bottom"), and then type your variable/parameter as an AxisOrientation appropriately.

v2.3.1

22 Nov 22:30
Compare
Choose a tag to compare

Bug fixes

  • Fix build so NPM distribution works #3114

v2.3.0

21 Nov 18:23
Compare
Choose a tag to compare

Interaction Features

  • Constrain pan/zoom to min/max domain values
    Adds minDomainValue/maxDomainValue properties to the PanZoomInteraction class that constrain the pan/zoom interaction to those domain values.
  • Making selection easier
    Adds entitiesAt method to ALL plot types, deferring the best method for selecting entites based on a mouse click to each plot type. Also adds the index of the dataset to the PlotEntity object to determine which series was selected.
  • Add onPanEnd and onZoomEnd to the PanZoom interaction

Infrastructure Updates

  • Upgrade to Typescript 2
  • Use @types where supported
  • Move bower dependencies to npm
  • Upgrade TSLint to 3.15

v2.2.0

06 May 19:44
Compare
Choose a tag to compare

Changed the behavior of entityNearest for LinePlot. It now uses the default euclidean distance algorithm to determine nearest entities. The old X-then-Y algorithm is still available as a separate method called entityNearestByXThenY. See #3070 for more info.

v2.1.0

15 Apr 19:29
Compare
Choose a tag to compare

NPM Compatibility

Plottable is now available as an NPM package. Typings are bundled inside the package and referenced via the "typings" field in package.json. You will need d3's ambient typings available as an external module (this should be the case if you download from DefinitelyTyped).

Bug Fixes

  • Bar charts with modified log axis now render correctly #3045
  • Scale changes are now reflected upon data set change in PiePlot #3020

Features

  • New Components.PlotGroup exposes entityNearest for multiple plots #3068

v2.0.0

11 Dec 22:49
Compare
Choose a tag to compare

Good afternoon,

The Plottable team is proud to announce the 2.0.0 release of Plottable. A full list of changes between v2.0.0 and v1.16.2 can be found below.

Why 2.0.0?

We are fixing a bug on Interaction.Pointer in a way that changes the way it behaves when Plottable charts are blocked by other DOM elements. We had previously fixed the behavior in v1.14.0, but wound up up rolling back the change in v1.16.1 to avoid surprising users who were depending on the old behavior. To clearly indicate the change in behavior, we are releasing this change as v2.0.0 instead of v1.17.0.

v2.0.0 is also built with Typescript 1.7 and includes some improvements to the type definitions.

Changes

Change in Behavior for Pointer Interaction

Interactions.Pointer callbacks will no longer trigger under modals or other overlays that overlap Components. Most tooltip libraries draw tooltips as an overlaying element. Add the following CSS to tooltips to avoid having them block pointer events:

.tooltip {
  pointer-events: none;
}

See https://jsfiddle.net/aytdd8ub/ for an example using Bootstrap.

Typescript 1.7 Changes: polymorphic this

Plottable now uses Typescript 1.7. Consequently, methods that return the calling object now return this instead of the class-type:

class Label {
  public text(text: string): Label; // OLD
  public text(text: string): this; // NEW
}

This change fixes problems caused by attempting to chain methods defined on a parent class (#2504). Please upgrade to Typescript 1.7 for development.

croppedRenderingEnabled() on Plots.StackedArea

The "cropped rendering" performance option on Plots.StackedArea has been temporarily disabled as it does not work as intended (see #3032).

Removed Classes and Fields

  • Plots.Wheel has been removed, since it was an incomplete implementation and its use case is better covered by Plots.Rectangle.
  • Removed the following deprecated methods and fields:
    • Axis._computedHeight
    • Axis._computedWidth
    • Axis.tickLength()
    • Formatters.relativeDate()
    • Plot._visibleOnPlot()
    • Plots.Bar._visibleOnPlot()
    • Plots.ScatterPlot._visibleOnPlot()

Dispatcher architecture changes

These changes only affect users who are subclassing Dispatcher:

The internal architecture of Dispatcher has been redone. The main change is that subclasses now register callbacks by event name, rather than having to manage CallbackSets:

// NEW DESIGN
protected _addCallbackForEvent(eventName: string, callback: Function): void;
protected _removeCallbackForEvent(eventName: string, callback: Function): void;
protected _callCallbacksForEvent(eventName: string, ...args: any[]): void;

In addition, some internal fields have been renamed for clarity.

Summary of changes:

  • protected _eventToCallback --> _eventToProcessingFunction
  • _setCallback() and _unsetCallback() replaced by _addCallbackForEvent() and _removeCallbackForEvent().
  • _callCallbacksForEvent() added.
  • protected _callbacks array removed.
  • private CallbackSets removed and replaced with registration-strings.

Bugfixes

  • A QuantitativeScale with padding no longer locks up if both ends of its domain are set to the same value (#3019).

v2.0.0 Release Candidate 2

08 Dec 21:45
Compare
Choose a tag to compare
Pre-release

Good afternoon,

This marks the second release candidate for v2.0.0 of Plottable. The following bugfix has been added:

  • A QuantitativeScale with padding no longer fails to autoDomain() if both ends of its domain are set to the same value (#3019).

v2.0.0 Release Candidate 1

04 Dec 01:30
Compare
Choose a tag to compare
Pre-release

Good evening,

This marks the first release candidate for v2.0.0 of Plottable.

Why 2.0.0?

We are fixing a bug on Interaction.Pointer in a way that changes the way it behaves when Plottable charts are blocked by other DOM elements. We had previously fixed the behavior in v1.14.0, but wound up up rolling back the change in v1.16.1 to avoid surprising users who were depending on the old behavior. To clearly indicate the change in behavior, we are releasing this change as v2.0.0 instead of v1.17.0.

v2.0.0 is also built with Typescript 1.7 and includes some improvements to the type definitions.

Changes

Change in Behavior for Pointer Interaction

Interactions.Pointer callbacks will no longer trigger under modals or other overlays that overlap Components. Most tooltip libraries draw tooltips as an overlaying element. Add the following CSS to tooltips to avoid having them block pointer events:

.tooltip {
  pointer-events: none;
}

See https://jsfiddle.net/aytdd8ub/ for an example using Bootstrap.

Typescript 1.7 Changes: polymorphic this

Plottable now uses Typescript 1.7. Consequently, methods that return the calling object now return this instead of the class-type:

class Label {
  public text(text: string): Label; // OLD
  public text(text: string): this; // NEW
}

This change fixes problems caused by attempting to chain methods defined on a parent class (#2504).

Removed Classes and Fields

  • Plots.Wheel has been removed, since it was an incomplete implementation and its use case is better covered by Plots.Rectangle.
  • Removed the following deprecated methods and fields:
    • Axis._computedHeight
    • Axis._computedWidth
    • Axis.tickLength()
    • Formatters.relativeDate()
    • Plot._visibleOnPlot()
    • Plots.Bar._visibleOnPlot()
    • Plots.Scatter._visibleOnPlot()

Dispatcher architecture changes

These changes only affect users who are subclassing Dispatcher:

The internal architecture of Dispatcher has been redone. The main change is that subclasses now register callbacks by event name, rather than having to manage CallbackSets:

// NEW DESIGN
protected _addCallbackForEvent(eventName: string, callback: Function): void;
protected _removeCallbackForEvent(eventName: string, callback: Function): void;
protected _callCallbacksForEvent(eventName: string, ...args: any[]): void;

In addition, some internal fields have been renamed for clarity.

Summary of changes:

  • protected _eventToCallback --> _eventToProcessingFunction
  • _setCallback() and _unsetCallback() replaced by _addCallbackForEvent() and _removeCallbackForEvent().
  • _callCallbacksForEvent() added.
  • protected _callbacks array removed.
  • private CallbackSets removed and replaced with registration-strings.

[v1.16.2] Small fix to entityNearest()

06 Nov 23:29
Compare
Choose a tag to compare

entityNearest() now returns undefined if no points are in view on Scatter, Pie, Rectangle, and Segment Plots. Previously, it would crash (#2945).

[v1.16.1] InterpolatedColorLegend Enhancements

23 Oct 21:51
Compare
Choose a tag to compare

This week, Plottable made several functional and visual improvements to InterpolatedColorLegends. We also reverted a change to Interactions.Pointer in order to restore the pre-v1.14.0 behavior of tooltips.

Features

Visual Improvements to InterpolatedColorLegend

InterpolatedColorLegends were previously drawn with swatches of color. Now they instead have a gradient fill.

screen shot 2015-10-20 at 1 48 17 pm

Try it out: http://jsfiddle.net/j5b9f60c/57/

Show Tooltip for InterpolatedColorLegend on Hover

Hovering over InterpolatedColorLegend now displays a tooltip with the corresponding value for the hovered color.

screen shot 2015-10-22 at 5 55 44 pm

Try it out: http://jsfiddle.net/j5b9f60c/57/

Bug Fixes

  • Reverted changes introduced in v1.14.0 where points under an overlay are considered outside of the Component in pointerMove, pointerExit, and pointerEnter. We chose to revert this change due to undesired behavior with tooltips and are going to re-implement this correctly in the near future. (#2910)