0

I'd made all that Duopixes said in this question but it didn't help. The icon shows as text still. Here my HTML:

<g class="info-container" transform="translate(240,283)">
    <text class="svg-icon" x="-60" y="0">&#xf040</text>
</g>

and

.svg-icon{
    font-family: FontAwesome;
  }

The style is applied to the text element and FontAwesome.css is attached to the page. What I've done wrong?

UPDATE: I'm creating svg-elements via D3.js library. And that was the point.

sedovav
  • 1,986
  • 1
  • 17
  • 28

1 Answers1

3

The answer is here. In a D3-chart we need to use \ufXXX format for an icon text.

infoGroup.append("text").attr("class", "svg-icon").text("\uf005");
Community
  • 1
  • 1
sedovav
  • 1,986
  • 1
  • 17
  • 28