title: idiomatic way of drawing a triangle in d3
body: <p>I have the following code that draws a triangle in d3:</p>
  
  <pre><code>var trianglePoints = xScale(3) + ' ' + yScale(18) + ', ' + xScale(1) + ' ' + yScale(0) + ', ' + xScale(12) + ' ' + yScale(3) + ' ' + xScale(12) + ', ' + yScale(3) + ' ' + xScale(3) + ' ' + yScale(18);
  
  console.log(trianglePoints);
  
  svg.append('polyline')
      .attr('points', trianglePoints)
      .style('stroke', 'blue');
  </code></pre>
  
  <p>Here is a <a href="http://jsbin.com/coyepa/1/edit?js,output" rel="noreferrer">jsbin</a> which shows it in action.</p>
  
  <p>I am curious to know if this is the best way of doing in this d3 or is there a better way?</p>