Skip to content

Stacked Area, Horizontal stacked/clustered Bar

Pre-release
Pre-release

Choose a tag to compare

@jtlan jtlan released this 02 Sep 21:58
· 6916 commits to master since this release

screen shot 2014-09-02 at 2 07 10 pm

Good afternoon,

This release adds Plot.StackedArea, as shown above. It's used the same way as Plot.StackedBar:

var stackedAreaPlot = new Plottable.Plot.StackedArea(xScale, yScale);
stackedAreaPlot.addDataset("d1", data1)
              .addDataset("d2", data2)
              .addDataset("d3", data3); // add many datasets
stackedAreaPlot.project("x", "year", xScale)
              .project("y", "y", yScale); // projection works as usual

In addition, Plot.StackedBar and Plot.ClusteredBar can now be set to be horizontal in the constructor:

var horizontalStackedBar = new Plottable.Plot.StackedBar(xScale, yScale, false);
var horizontalClusteredBar = new Plottable.Plot.ClusteredBar(xScale, yScale, false);

Plot.StackedBar and Plot.ClusteredBar default to vertical.


.width() and .height() can now be used to query the current width/height of a Component in pixels.


A new typings definitions file, plottable-dev.d.ts, has been added to make development easier. This file exposes underscore-protected methods that are not part of the public-facing API.


Breaking Changes (Typescript)

Animator.Default and its subclasses now return the primitive number type when calling .duration() and .delay(), instead of returning Number.