annalexc / space-rocks

1 stars 0 forks source link

Issue with text color in d3 :sob: #2

Closed annalexc closed 8 years ago

annalexc commented 8 years ago
var label = asteroidField.append("text")
      .attr("class", "label")
      .attr("text-anchor", "end")
      .attr("y", h - 24)
      .attr("x", w)
      .style("color", "white")
      .text(2016)

😭

DZGoldman commented 8 years ago

is this helpful and/or relevant? http://stackoverflow.com/questions/22523204/how-to-set-text-color-for-my-d3-chart-title

ajhofferber commented 8 years ago

yeah! If you're working with D3, chances are that text is actually SVG. so you'd need to change the fill style for the path instead of treating it like regular text.

CentroDL commented 8 years ago

you could instead give a class and style that class instead of trying to inline style it

annalexc commented 8 years ago

fill works!! LOVE YOU ALL, thanks. otter