Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
Include the font-family to compute word size in the word cloud algorith.
  • Loading branch information
rogrosso committed Jul 20, 2023
1 parent 503eea1 commit 4650948
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions infovis/text/wordcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function draw(text) {
.attr('x', 100)
.attr('y',110)
.attr('font-size', d => d.height )
.attr('font-family', d => d.fontFalimily)
.text(d => d.word)
.each( function(d) { d.width = this.getComputedTextLength() })
.remove()
Expand Down

0 comments on commit 4650948

Please sign in to comment.