Skip to content

Commit

Permalink
futher regularize heatmap filtering for #1515
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwoodhull committed Mar 22, 2019
1 parent d4282ab commit 19a703c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dc.heatMap = function (parent, chartGroup) {
var _boxOnClick = function (d) {
var filter = d.key;
dc.events.trigger(function () {
_chart.filter(filter);
_chart.filter(dc.filters.TwoDimensionalFilter(filter));
_chart.redrawGroup();
});
};
Expand Down Expand Up @@ -118,8 +118,8 @@ dc.heatMap = function (parent, chartGroup) {
if (!arguments.length) {
return _chart._filter();
}
if (filter.filterType !== 'TwoDimensionalFilter' &&
!(Array.isArray(filter) && filter[0].filterType === 'TwoDimensionalFilter')) {
if (filter !== null && filter.filterType !== 'TwoDimensionalFilter' &&
!(Array.isArray(filter) && Array.isArray(filter[0]) && filter[0][0].filterType === 'TwoDimensionalFilter')) {
return nonstandardFilter(filter);
}
return _chart._filter(filter);
Expand Down

0 comments on commit 19a703c

Please sign in to comment.