npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular7-word-cloud

v1.2.1

Published

this is word cloud package for the displaying the word in pattern

Downloads

101

Readme

Installation

To install this library, run:

$ npm install angular7-word-cloud --save
$ npm install d3 --save

API

Import



// In your App's module:
imports: [
   AgWordCloudModule.forRoot()
]

Then add add the script to .angular-cli.json

"scripts": [
      ***
        "../node_modules/angular7-word-cloud/d3.min.js"
      ]

How to use

There are one directive for word cloud: ag-word-cloud, to use it just add this block on your html file:

<div AgWordCloud 
	#word_cloud_chart=ag-word-cloud 
	[wordData]="word_cloud"
	 [options]="options">
	</div>
// Create Work Cloud Data Array
wordData: Array<AgWordCloudData> = [// Words];
// Word Cloud Options
options = {
	settings: {
		minFontSize: 10,
		maxFontSize: 100,
	},
	margin: {
		top: 10,
		right: 10,
		bottom: 10,
		left: 10
	},
	labels: true // false to hide hover labels
};

Properties

  • wordData (Array<WordCloudData> | WordCloudData[]) - set of words, it should be Array<WordCloudData> and each object must have a text and size;

  • colors (?Array<string> | string[]) - data colors, will use default and|or random colors if not specified.

  • options (?WordCloudOptions) - word cloud options and there are two object you can pass it settings and margin.

    • setting containes minFontSize and maxFontSize for word sets.
    • margin of canves top, left, bottom, right, Default values is 10.
    • labels show Size label at the bottom
  • width and height of canvas, the Default value for width is the width of the container, and the height equals the width * 0.75.

Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

  1. Use GitHub Issues board to report bugs and feature requests (not our email address)
  2. Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

License

MIT © [Raghvendra]