Open okravchuk opened 7 years ago
It looks like the relative sizes of the fonts could still match. Would this be caused by #6, in the sence that a different random seed / order of picking words and laying them out results in a different total size, which results in different font sizes when scaled back to the desired size?
I fixed this for myself with replacing
scaling = bounds ? Math.min(
w / Math.abs(bounds[1].x - w / 2),
w / Math.abs(bounds[0].x - w / 2),
h / Math.abs(bounds[1].y - h / 2),
h / Math.abs(bounds[0].y - h / 2)) / 2 : 1;
with scaling = 1;
because scaling used in vis.transition() .attr("transform", "translate(" + [w >> 1, h >> 1] + ")scale(" + scaling + ")");
in d3.wordcloud.js
Thanks, this could be an improvement, to make the scaling optional.
But drawback is that too much space left from actual chart drawing to borders of whole chart placeholder.
As you mentioned - this case can be fixed due to fix of case #6.
It's very noticable for "service" word. Scale is different in <g> tag, "transform" attribute Text used for chart: "Great service. Kept ringing. Good data plan for my business needs. Great service. I can't complain. I would like the latest and greatest and it doesn't offer that. Slow service as well. They do a wonderful job. OK. Excellent service! Settle claims quickly. Every single problem has always been solved promptly. Accessibility, responsiveness, professionalism, and knowledge. Not so sure I liked the service."
Thanks, Oleksiy