Skip to content

Commit

Permalink
[fix] Allow data inheritance in heatmaps
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
smee committed Oct 29, 2015
1 parent 518a143 commit be10c63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit be10c63

Please sign in to comment.