susielu/d3-annotation

Multiple colors and text justification within annotation label

Opened this issue · 1 comments

Hi Susie, thank you for this awesome d3 module! I was wondering if there's a way to style the annotation text so certain words have different colors?

screen shot 2018-05-07 at 3 04 17 pm

I'd like to color the words "Democrat" and "Republican" blue and red respectively. Also, is it possible to justify the text within the annotation?

Right now there is not way for the text styling of colors you're asking about, but you can change the text justification just by styling the note with the text-anchor css attribute.