I have multiple variables declared in .scss file i want to read same variables in to my d3 charts ex:
$body-color: #424656;
d3.select(…)
.append("path")
.attr("d", line(data))
.attr("stroke", "black")
for example in above code i want to change stroke color as per my .sccs variable
CodePudding user response:
Try this .attr("fill", var(--body-color)