Skip to content

Commit

Permalink
initialize cell & tick positions on enter
Browse files Browse the repository at this point in the history
because d3v4 doesn't default to the transition position anymore
for #1400
  • Loading branch information
gordonwoodhull committed Apr 12, 2018
1 parent f30a27b commit 00855bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ dc.heatMap = function (parent, chartGroup) {
gEnter.append('rect')
.attr('class', 'heat-box')
.attr('fill', 'white')
.attr('x', function (d, i) { return cols(_chart.keyAccessor()(d, i)); })
.attr('y', function (d, i) { return rows(_chart.valueAccessor()(d, i)); })
.on('click', _chart.boxOnClick());

if (_chart.renderTitle()) {
Expand Down Expand Up @@ -278,10 +280,11 @@ dc.heatMap = function (parent, chartGroup) {
gRowsText = gRowsText
.enter()
.append('text')
.attr('dy', 6)
.style('text-anchor', 'end')
.attr('x', 0)
.attr('dx', -2)
.attr('y', function (d) { return rows(d) + boxHeight / 2; })
.attr('dy', 6)
.on('click', _chart.yAxisOnClick())
.text(_chart.rowsLabel())
.merge(gRowsText);
Expand Down

0 comments on commit 00855bb

Please sign in to comment.