From 19a703c423b1e8b7ded8369bd7b1d1caac4561e8 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 22 Mar 2019 10:11:20 -0400 Subject: [PATCH] futher regularize heatmap filtering for #1515 --- src/heatmap.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/heatmap.js b/src/heatmap.js index c6c0cd27a..708d556d2 100644 --- a/src/heatmap.js +++ b/src/heatmap.js @@ -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(); }); }; @@ -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);