Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Words overlap #89

Open
antunespedro80 opened this issue Jan 4, 2022 · 0 comments
Open

Words overlap #89

antunespedro80 opened this issue Jan 4, 2022 · 0 comments

Comments

@antunespedro80
Copy link

antunespedro80 commented Jan 4, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant