Skip to content

Commit

Permalink
Updates to non filtered brushing
Browse files Browse the repository at this point in the history
  • Loading branch information
mtraynham committed Mar 25, 2015
1 parent 92ddb48 commit facae4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/base-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,10 @@ dc.baseMixin = function (_chart) {
_chart.filter(_);
};

_chart.setFilter = function (_) {
_filters = _ ? [_] : [];
};

/**
#### .filter([filterValue])
Filter the chart by the given value or return the current filter if the input parameter is missing.
Expand Down
8 changes: 6 additions & 2 deletions src/coordinate-grid-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,12 @@ dc.coordinateGridMixin = function (_chart) {
};

_chart._nonFilteredBrushing = function () {
_chart.extendBrush();
_chart.redrawBrush(_g);
var extent = _chart.extendBrush();
if (_chart.brushIsEmpty(extent)) {
_chart.setFilter(null);
_chart.brush().clear();
}
_chart.fadeDeselectedArea();
};

_chart.redrawBrush = function (g) {
Expand Down

0 comments on commit facae4a

Please sign in to comment.