From be10c6320bc9ae6d79c818a7ac95995e1705a488 Mon Sep 17 00:00:00 2001 From: Steffen Dienst Date: Thu, 29 Oct 2015 11:24:30 +0100 Subject: [PATCH] [fix] Allow data inheritance in heatmaps `selectAll` does not inherit data from its parent. This means that if the underlying crossfilter gets new data the selection of `g.box-group` will see the new data, the children `title` and `rect` will not. The optical result of that is a seemingly emtpy heatmap although the data has changed. --- src/heatmap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/heatmap.js b/src/heatmap.js index 1f31a0b65..09fafc9d8 100644 --- a/src/heatmap.js +++ b/src/heatmap.js @@ -228,10 +228,10 @@ dc.heatMap = function (parent, chartGroup) { if (_chart.renderTitle()) { gEnter.append('title'); - boxes.selectAll('title').text(_chart.title()); + boxes.select('title').text(_chart.title()); } - dc.transition(boxes.selectAll('rect'), _chart.transitionDuration()) + dc.transition(boxes.select('rect'), _chart.transitionDuration()) .attr('x', function (d, i) { return cols(_chart.keyAccessor()(d, i)); }) .attr('y', function (d, i) { return rows(_chart.valueAccessor()(d, i)); }) .attr('rx', _xBorderRadius)