Skip to content

Commit

Permalink
excise Rickshaw.Graph.Unstacker and allow for consumers to pre-stack …
Browse files Browse the repository at this point in the history
…if they like; fixes #333
  • Loading branch information
dchester committed Oct 30, 2013
1 parent 470b6f8 commit 27d32fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 27 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ JS_FILES=\
src/js/Rickshaw.Graph.Renderer.LinePlot.js\
src/js/Rickshaw.Graph.Smoother.js\
src/js/Rickshaw.Graph.Socketio.js\
src/js/Rickshaw.Graph.Unstacker.js\
src/js/Rickshaw.Series.js\
src/js/Rickshaw.Series.FixedDuration.js\

Expand Down
1 change: 0 additions & 1 deletion src/js/Rickshaw.Graph.Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Rickshaw.Graph.Renderer = Rickshaw.Class.create( {
initialize: function(args) {
this.graph = args.graph;
this.tension = args.tension || this.tension;
this.graph.unstacker = this.graph.unstacker || new Rickshaw.Graph.Unstacker( { graph: this.graph } );
this.configure(args);
},

Expand Down
24 changes: 0 additions & 24 deletions src/js/Rickshaw.Graph.Unstacker.js

This file was deleted.

9 changes: 8 additions & 1 deletion src/js/Rickshaw.Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,18 @@ Rickshaw.Graph = function(args) {

stackedData = stackedData || data;

if (this.renderer.unstack) {
stackedData.forEach( function(seriesData) {
seriesData.forEach( function(d) {
d.y0 = d.y0 === undefined ? 0 : d.y0;
} );
} );
}

this.stackData.hooks.after.forEach( function(entry) {
stackedData = entry.f.apply(self, [data]);
} );


var i = 0;
this.series.forEach( function(series) {
if (series.disabled) return;
Expand Down

0 comments on commit 27d32fe

Please sign in to comment.