d3.js word missing from word cloud

筅森魡賤 提交于 2019-12-06 09:08:48

Scale the size preferably between 10 to 95 range. 95 because 100 was causing the biggest font to disappear and fonts smaller then 10 were too tiny

 var sizeScale = d3.scale.linear()
                   .domain([0, d3.max(frequency_list, function(d) { return d.freq} )])
                                    .range([10, 95]); // 95 because 100 was causing stuff to be missing

...

    .fontSize(function(d) { return sizeScale(d.freq); })

Updated code at http://plnkr.co/edit/gNtHZ0lMRTP98mptm3W8?p=preview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!