Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add   using d3.js selection.text() method

selection.text(' ') appears to convert the special characters so it renders the actual text, rather than a space like I want. Is there a way to prevent the text() method on selections from doing this escaping for me? For context, this is a table cell that is empty for some elements in the selection, and I need the space in there so that the cells render properly.

like image 977
Ryan Avatar asked Oct 14 '12 13:10

Ryan


People also ask

What is the trick of addition?

First add the hundreds place digit in second number with the first number: 953 + 800 = 1753. Then add the then place digit in second number with the result obtained in previous step: 1753 + 60 = 1813. Next add the units place digit in the second number with the result obtained in Step 2: 1813 + 7 = 1820.


1 Answers

Use a JavaScript Unicode escape rather than an HTML entity.   in HTML denotes the Unicode character U+00A0 so

selection.text('\u00A0')

should do what you want.

like image 135
Ian Roberts Avatar answered Oct 24 '22 14:10

Ian Roberts