Skip to content

Commit

Permalink
simplify crap logic
Browse files Browse the repository at this point in the history
make the crap easier to understand
  • Loading branch information
gordonwoodhull committed Jun 10, 2016
1 parent 85dbc99 commit 60f30db
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/stack-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,11 @@ dc.stackMixin = function (_chart) {
var _hidableStacks = false;

function domainFilter () {
if (!_chart.x()) {
if (!_chart.x() || _chart.isOrdinal() || _chart.elasticX()) {
return d3.functor(true);
}
var xDomain = _chart.x().domain();
if (_chart.isOrdinal()) {
// TODO #416
//var domainSet = d3.set(xDomain);
return function () {
return true; //domainSet.has(p.x);
};
}
if (_chart.elasticX()) {
return function () { return true; };
}
return function (p) {
//return true;
return p.x >= xDomain[0] && p.x <= xDomain[xDomain.length - 1];
};
}
Expand Down

0 comments on commit 60f30db

Please sign in to comment.