-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composite ordinal chart doesn't redraw filtered then reseted bars properly #677
Comments
Thanks for the report. Can you create a jsFiddle (or similar) which demonstrates the problem, or at least supply some example data? |
After digging around in dc.js I found the problem was that the filter was being applied to the child bar chart, but when running _chart.filter = function (_) {
var filters = _chart.filters();
if (!arguments.length) return filters.length > 0 ? filters[0] : null;
if (_ instanceof Array && _[0] instanceof Array && !_.isFiltered) {
_[0].forEach(function(d){
if (_chart.hasFilter(d)) {
_filters.splice(_filters.indexOf(d), 1);
} else {
_filters.push(d);
}
});
applyFilters();
_chart._invokeFilteredListener(_);
} else if (_ === null) {
//resetFilters(); don't reset the filters of this chart but of it's child charts
for (var i = 0; i < _children.length; ++i) {
_children[i].filterAll();
}
} else {
if (_chart.hasFilter(_))
removeFilter(_);
else
addFilter(_);
}
if (_chart.root() !== null && _chart.hasFilter()) {
_chart.turnOnControls();
} else {
_chart.turnOffControls();
}
return _chart;
}; |
Hi ! This solved my problem, and should (may?) also answers yours. Have a nice day
|
Fixed by #1435 in 3.0.4 |
Then if i try
it doesn't redraw the bars properly.
The text was updated successfully, but these errors were encountered: