Skip to content

[v1.14.0] Localization and More Performance Improvements

Compare
Choose a tag to compare
@crmorford crmorford released this 02 Oct 23:23
· 551 commits to master since this release

Plottable is now multi-lingual! Axes.Time has easy localization options through the Plottable-moment library. This release also includes performance improvements on the rendering speed of Plots.Lineand Plots.Area.

The end ticks on Axes.Time are now matched in size on the left and right sides. pixelPoint() now returns the correct location on Plots.Bar and all derived classes. Interactions.Pointer callbacks will no longer trigger through an overlay.

Features

Cropped Rendering on Plots.Line

Plots.Line will only render portions of a line that are contained in the viewport. This option is enabled by default.

This will result in new behavior while deferredRendering() is enabled, since lines will not be drawn until they are on-screen and deferredRendering() is complete.

Try it out: http://jsfiddle.net/yxpq4uuv/7/

/**
 * Gets if croppedRendering is enabled
 *
 * When croppedRendering is enabled, lines that will not be visible in the viewport will not be drawn.
 */
public croppedRenderingEnabled(): boolean;

/**
 * Sets if croppedRendering is enabled
 */
public croppedRenderingEnabled(croppedRendering: boolean): Plots.Line<X>;

Time Axis Localization

screen shot 2015-10-02 at 2 34 00 pm

A new library utilizing MomentJS has been created to provide localization on Axes.Time. Plottable-moment is hosted at https://github.com/palantir/plottable-moment

When the library loads, it will override the default configuration list of Axes.Time in order to match the locale set in MomentJS.

Try it out: https://jsfiddle.net/zsfkg32b/20/

Bug Fixes

  • The logic in pointerMove, pointerExit, and pointerEnter has changed so that points under an overlay are considered outside of the Component. Interactions.Pointer callbacks will no longer trigger under modals or other overlays that overlap Plots (2416)
  • Several situations used to result in incorrect pixelPoint()s on 'Plots.Bar'. Now,pixelPoint() returns the correct data point, which is used when finding the correct nearest bar (2793)
  • The end tick marks in Axes.Time used to be uneven when tierlabelPosition was set to "center", but now always have the same length (2800)