Skip to content

Commit f30a27b

Browse files
initialize dot positions on enter
because d3v4 doesn't default to the transition position anymore for #1400
1 parent 471566a commit f30a27b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/line-chart.js

+6
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,12 @@ dc.lineChart = function (parent, chartGroup) {
381381
.enter()
382382
.append('circle')
383383
.attr('class', DOT_CIRCLE_CLASS)
384+
.attr('cx', function (d) {
385+
return dc.utils.safeNumber(_chart.x()(d.x));
386+
})
387+
.attr('cy', function (d) {
388+
return dc.utils.safeNumber(_chart.y()(d.y + d.y0));
389+
})
384390
.attr('r', getDotRadius())
385391
.style('fill-opacity', _dataPointFillOpacity)
386392
.style('stroke-opacity', _dataPointStrokeOpacity)

0 commit comments

Comments
 (0)