Skip to content

Instantly share code, notes, and snippets.

@yani-
Last active July 5, 2018 10:19
Show Gist options
  • Save yani-/36787903dd02e800f9f4903b3bcddcb7 to your computer and use it in GitHub Desktop.
Save yani-/36787903dd02e800f9f4903b3bcddcb7 to your computer and use it in GitHub Desktop.
const metric = chartContainer
.selectAll('.metric')
.data(metrics)
.enter()
.append('g')
.attr('class', 'metric');
metric
.append('path')
.attr('class', 'line')
.attr('d', d => d.values)
.style('stroke', d => color(d.name));
@allyraza
Copy link

allyraza commented Jul 5, 2018

line #11 should use the line shape you defined to generate the d attribute like so .attr('d', d => line(d.values))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment