Skip to content

Commit

Permalink
misleading but not dangerous selectAlls
Browse files Browse the repository at this point in the history
there's only one or zero being selected
select should be paired with append
for #1239
  • Loading branch information
gordonwoodhull committed Dec 19, 2016
1 parent f486bcd commit 0260b13
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 @@ -213,7 +213,7 @@ dc.heatMap = function (parent, chartGroup) {

boxes.exit().remove();

var gCols = _chartBody.selectAll('g.cols');
var gCols = _chartBody.select('g.cols');
if (gCols.empty()) {
gCols = _chartBody.append('g').attr('class', 'cols axis');
}
Expand All @@ -230,7 +230,7 @@ dc.heatMap = function (parent, chartGroup) {
.attr('x', function (d) { return cols(d) + boxWidth / 2; })
.attr('y', _chart.effectiveHeight());
gColsText.exit().remove();
var gRows = _chartBody.selectAll('g.rows');
var gRows = _chartBody.select('g.rows');
if (gRows.empty()) {
gRows = _chartBody.append('g').attr('class', 'rows axis');
}
Expand Down

0 comments on commit 0260b13

Please sign in to comment.