Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

D3.js text element does not display unicode character correctly

I'm trying to append ➤ into SVG using unicode as seen below.

g.append("text")
        .attr("x", 10)
        .attr("y", 10)
        .text("➤");

➤ is displayed, but not ➤

like image 800
CuriousSuperhero Avatar asked Nov 28 '22 23:11

CuriousSuperhero


1 Answers

Instead of using .text() use .html()

like image 123
potatopeelings Avatar answered Dec 01 '22 13:12

potatopeelings