All Projects → chrisrzhou → React Wordcloud

chrisrzhou / React Wordcloud

Licence: mit
☁️ Simple React + D3 wordcloud component with powerful features.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Wordcloud

Freecodecamp.cn
FCC China open source codebase and curriculum. Learn to code and help nonprofits.
Stars: ✭ 36,576 (+29396.77%)
Mutual labels:  d3
Rust Si
a rusty `scanf` (`scan!`) and inverse of `print!` (`read!`)
Stars: ✭ 116 (-6.45%)
Mutual labels:  io
Scattertext
Beautiful visualizations of how language differs among document types.
Stars: ✭ 1,722 (+1288.71%)
Mutual labels:  d3
Stocks
machine learning web app game where the user competes against the AI in picking stocks
Stars: ✭ 108 (-12.9%)
Mutual labels:  d3
Just Dashboard
📊 📋 Dashboards using YAML or JSON files
Stars: ✭ 1,511 (+1118.55%)
Mutual labels:  d3
Planetary.js
🌎 Awesome interactive globes for the web
Stars: ✭ 1,545 (+1145.97%)
Mutual labels:  d3
D3 Tube Map
Draw tube maps in the style of the London Underground using d3
Stars: ✭ 106 (-14.52%)
Mutual labels:  d3
Socket
Non-blocking socket and TLS functionality for PHP based on Amp.
Stars: ✭ 122 (-1.61%)
Mutual labels:  io
Nuclei
Proactive IO & Runtime system
Stars: ✭ 113 (-8.87%)
Mutual labels:  io
Project Pages
Fork this repo for a quick start. If "Project Timeline" or "License" appeared on your nav bar, Look Below!
Stars: ✭ 119 (-4.03%)
Mutual labels:  d3
Awesome Frontendmasters
📚 List of awesome frontendmasters course resources
Stars: ✭ 110 (-11.29%)
Mutual labels:  d3
Vue D3
a vue.js plugin for D3
Stars: ✭ 113 (-8.87%)
Mutual labels:  d3
Timeline Lwc
An interactive timeline for the Salesforce platform.
Stars: ✭ 116 (-6.45%)
Mutual labels:  d3
Forcelayout
Forcelayout is library for android. You can drawing graph with spring-like attractive forces. Inspired by force layout in D3.js.
Stars: ✭ 108 (-12.9%)
Mutual labels:  d3
Eon Chart
Realtime animated graphs with PubNub and C3.
Stars: ✭ 121 (-2.42%)
Mutual labels:  d3
D3js doc
D3js中文文档 D3中文 📊 📈 🎉
Stars: ✭ 1,599 (+1189.52%)
Mutual labels:  d3
Markvis
make visualization in markdown. 📊📈
Stars: ✭ 1,509 (+1116.94%)
Mutual labels:  d3
Purewebappsample
Minimal http4s + Doobie + ZIO + Circe Scala application to show how to build a purely functional web application in Scala.
Stars: ✭ 123 (-0.81%)
Mutual labels:  io
Fgtk
A set of a misc tools to work with files and processes
Stars: ✭ 121 (-2.42%)
Mutual labels:  d3
Plotly.net
.NET interface for plotly.js written in F# 📈
Stars: ✭ 119 (-4.03%)
Mutual labels:  d3

☁️ react-wordcloud

Simple React + D3 wordcloud component with powerful features. Uses the d3-cloud layout.

image

Install

npm install react-wordcloud

Note that react-wordcloud requires react^16.13.0 as a peer dependency.

Use

Simple

import React from 'react';
import ReactWordcloud from 'react-wordcloud';

import 'tippy.js/dist/tippy.css';
import 'tippy.js/animations/scale.css';

const words = [
  {
    text: 'told',
    value: 64,
  },
  {
    text: 'mistake',
    value: 11,
  },
  {
    text: 'thought',
    value: 16,
  },
  {
    text: 'bad',
    value: 17,
  },
]

function SimpleWordcloud() {
  return <ReactWordcloud words={words} />
}

By default, ReactWordcloud is configured with animated tooltips enabled and requires CSS for styling. Tippy provides base styling in the resources above or you can create your own.

Kitchen Sink

An example showing various features (callbacks, options, size).

const callbacks = {
  getWordColor: word => word.value > 50 ? "blue" : "red",
  onWordClick: console.log,
  onWordMouseOver: console.log,
  getWordTooltip: word => `${word.text} (${word.value}) [${word.value > 50 ? "good" : "bad"}]`,
}
const options = {
  rotations: 2,
  rotationAngles: [-90, 0],
};
const size = [600, 400];
const words = [...];

function MyWordcloud() {
  return (
    <ReactWordcloud
      callbacks={callbacks}
      options={options}
      size={size}
      words={words}
    />
  );
}

Examples

View all documented examples and gallery of react-wordcloud applications at https://react-wordcloud.netlify.com/.

You can also run the examples locally:

git clone [email protected]:chrisrzhou/react-wordcloud

cd react-wordcloud
npm install && npm run docs

No props

Edit react-wordcloud-simple

Responsive

Edit react-wordcloud-simple

Configurable Options

Edit react-wordcloud-interactive

Callbacks

Edit react-wordcloud-interactive

Wordcloud Generator

Create wordclouds using this wordcloud generator: https://wordcloud-generator.netlify.com/

Features supported:

  • Edit and Upload text inputs
  • Various NLP features (stopwords, ngrams)
  • Wordcloud configurations
  • Export/save/share wordclouds

Contributing

The code is written in typescript, linted with xo, and built with microbundle. Examples and documentations are built with docz.

Feel free to contribute by submitting a pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].