Skip to content

v3.0.0-beta.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@hellochar hellochar released this 06 Mar 22:11
· 189 commits to develop since this release

This is the second in a series of beta releases for the next major revision of Plottable, v3.0.0. Please read on for a list of changes in beta.2, or track the v3.0.0 milestone at https://github.com/palantir/plottable/milestone/64.

d3 v4

We now use d3 v4.5.0, which opens the door to many bugfixes and general improvements. You will need to upgrade your d3 dependency to point to 4.5.0 accordingly:

Script tag:

<!-- old -->
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.js"></script>
<!-- new -->
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/4.5.0/d3.js"></script>

requireJS:

require.config({
    paths: {
        // old
        d3: "https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3",
        // new
        d3: "https://cdnjs.cloudflare.com/ajax/libs/d3/4.5.0/d3",
    },
});

If you use d3 elsewhere, that code will need to be upgraded to v4 semantics. See Changes in D3 4.0.

Typescript users

If you depend on @types/d3, you will need to upgrade your codebase to use @types/[email protected].

API Changes

The upgrade to d3v4 has also cause some API changes:

LinePlot/AreaPlot

.interpolator() has been renamed to .curve(). .interpolator() used to take strings of the form "linear-closed", coinciding with d3v3 easing names. These are now camelCased ("linear-closed" -> "linearClosed"). Here's the full list of accepted curve names. It also now accepts a d3.curveFactory:

linePlot.curve(d3.curveCatmullRom.alpha(0.5))

See d3-shape#curves for more info.

EasingAnimator

EasingAnimator.easingMode() used to take strings of the form "exp-in-out", coinciding with d3v3 easing names. These are now camelCased ("exp-in-out" -> "expInOut"). Here's the full list of accepted easing names. It also now accepts an arbitrary mapping function:

animator.easingMode((t) => Math.sin(t * Math.PI))

See d3-ease for more info.

SymbolFactory

  • triangleUp() renamed to triangle().
  • triangleDown() removed.
  • Added wye() and star().

Dropping IE9 support

We are bumping our minimum supported version of Internet Explorer from 9 to 11. IE9 is no longer supported by Microsoft and users are recommended to upgrade to a newer browser. Future releases should not be expected to have IE9 compatibility. Please let us know your thoughts about this on #3243.