react-wordcloud icon indicating copy to clipboard operation
react-wordcloud copied to clipboard

Words overlap

Open antunespedro80 opened this issue 4 years ago • 0 comments

Hello guys ! I'm facing an issue on react-wordcloud about word overlaping... Can someone tell me why this is happening ?

VERSIONS react: "^17.0.1" react-dom: "^17.0.1" react-scripts: "^4.0.3",

CODE SAMPLE

const options = useMemo(() => {
        return {
            enableTooltip: true,
            fontSizes: [12, 100],
            padding: 1,
            rotations: 0,
            rotationAngles: [0, 0],
            scale: 'sqrt',
            spiral: 'archimedean',
            transitionDuration: 0,
        };
    }, []);

<div style={{ width: '100%', height: '100%' }}>
 <ReactWordcloud
      words={calc.normalize(words).map((keyword, index) => {
          let text = keyword.key;
          if (prefix) {
              text = prefix + text;
          }
  
          return {
              text,
              value: words[index].value,
              normalizedValue: keyword.value,
          };
      })}
      options={options}
  />
</div>

ISSUE image

antunespedro80 avatar Jan 04 '22 12:01 antunespedro80