init-countertext.js 338 B

123456789101112
  1. export default (selection, options) => {
  2. // counter text
  3. selection.append('text')
  4. .attr('x', options.width * 0.65)
  5. .attr('y', options.height / 2.3)
  6. .attr('class', 'counter')
  7. .text('0')
  8. .attr('fill', options.baseColor)
  9. .attr('fill-opacity', 1)
  10. .style('font-size', 64)
  11. .style('visibility', 'hidden');
  12. };