Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wordcloud

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wordcloud

Tag cloud/Wordle presentation on 2D canvas or HTML

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-36.94%
Maintainers
1
Weekly downloads
 
Created
Source

wordcloud2.js Build Status npm version

Create a tag cloud/Wordle presentation on 2D canvas or HTML.

This library is a spin-off project from HTML5 Word Cloud.

Visit the demo page

Simple usage

Load wordcloud.js script to the web page, and run:

WordCloud(document.getElementById('my_canvas'), { list: list } );

where list is an array that look like this: [['foo', 12], ['bar', 6]].

Options available, see API documentation for detail.

Algorithm

Before putting each word on the canvas, it is drawn on a separate canvas to read back the pixels to record is drawn spaces. With the information, wordcloud.js will then try to find a place to fit the word that is closest to the start point.

Testing

Tests are available with QUnit and grunt. To setup environment for testing, run npm install and manually install SlimerJS of your platform.

Use grunt test to ensure all options can be set without JavaScript error.

Use grunt compare --base-commit=gh-pages to compare your proposed fix with gh-pages branch.

Keywords

FAQs

Package last updated on 14 Apr 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc