[guide] Fix chaining example to be consistent with string interpolation

This commit is contained in:
Pedro Pablo Aste Kompen
2016-12-21 16:06:56 -03:00
committed by Jordan Harband
parent 019a6edaaa
commit 6eacbc2aad

View File

@@ -2174,7 +2174,7 @@ Other Style Guides
// bad
const leds = stage.selectAll('.led').data(data).enter().append('svg:svg').classed('led', true)
.attr('width', (radius + margin) * 2).append('svg:g')
.attr('transform', 'translate(' + (radius + margin) + ',' + (radius + margin) + ')')
.attr('transform', `translate(${radius + margin},${radius + margin})`)
.call(tron.led);
// good
@@ -2184,7 +2184,7 @@ Other Style Guides
.classed('led', true)
.attr('width', (radius + margin) * 2)
.append('svg:g')
.attr('transform', 'translate(' + (radius + margin) + ',' + (radius + margin) + ')')
.attr('transform', `translate(${radius + margin},${radius + margin})`)
.call(tron.led);
// good