Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
word-cloud-react
Advanced tools
Readme
A library of to show Word Cloud in ReactJs
To install the package run command.
npm i word-cloud-react --save
or using yarn
yarn add word-cloud-react
import the packages to your react Component,
import { WordCloud } from "word-cloud-react";
Use the component as:
<WordCloud
width={"auto"}
maxFont={40}
minFont={10}
logFunc={(x)=> Math.log2(x) * 5}
data={[{"word":"gt feature recipe","value":275},{"word":"searchknorrproduct service feature","value":275},.......]}
clickEvent={(x)=>console.log(x.word)}
color={['#71803F', '#F8AC1D','#598EC0','#E2543E','#1A3051','#F46F73','#8A87BB','#56CFCD','#297373','#FF8552','#F2E863','#C2F8CB','#3A6EA5','#FF6700','#C0C0C0','#4E4381','#523CBD',]}/>
There are different conditional Props available in this component, they are,
Name | Type | Sample | Required | Description |
---|---|---|---|---|
width | "auto" or any integer | width={"auto"} or width={600} | true | The width of the word cloud |
maxFont | integer | maxFont={40} | false , default : 40 | Max Font size for font sizing algorithm for the max value |
minFont | integer | minFont={10} | false , default : 10 | Min Font size for font sizing algorithm for the min value |
logFunc | function | logFunc={(x)=> Math.log2(x) * 5} | false , if logfunction not provided than maxFont, minFont algorithm will be used | If this props provided maxFont and minFont will not work. this will use log function to size your word the function you provide as props. |
clickEvent | function | clickEvent={(x)=>console.log(x.word)} | false | get the function for click event through this props. |
color | array of string hex color code | color={['#71803F', '#F8AC1D','#598EC0','#E2543E']} | true | color hex for randomise your word. more color more random it will be. user has control over this color generations not over its randomness |
data | array | data={[{"word":"gt feature recipe","value":275},...]} | true | data that you will provide for word cloud |
If you want to work in this project. fork it, use the files from
src/lib/WordCloud
component to work. and,
npm run build
to build.
and send a pull request.
Current Version: 0.1.7
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
A library of to show Word Cloud in ReactJs ![alt tag](https://github.com/sazzadsazib/word-cloud-react/blob/master/Docs/word%20cloud%20react.png)
The npm package word-cloud-react receives a total of 10 weekly downloads. As such, word-cloud-react popularity was classified as not popular.
We found that word-cloud-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.