1.画虚线
pool
.append('path')
.attr('id', 'airline1')
.attr('fill', 'none')
.attr('stroke', 'steelblue')
.attr('stroke-width', 3)
.attr('stroke-dasharray', '10,10') //设置虚线的样式
.attr('d', airline1)
2. 设置定时器,定时改变stroke-dashoffset
var tmr = 0;
setInterval(function () {
tmr++;
d3.select('#airline1')
.attr('stroke-dashoffset', tmr)
}, 100)