Skip to content

markisme/TagCloud

Repository files navigation

TagCloud

A Word/Tag Cloud Library in Typescript.I am looking for an Word/Tag Cloud Library in Typescript Until I see an amazing Cloud in Kibana.And I am not able to use it with npm install ... easily, So I separated it out, and modify it into an Library. Maybe the origin library is tagcloud

TagCloud

Getting Started

Prerequisites

Require Typescript:

npm install -g typescript

Installing

npm install d3-tagcloud

Usage

Basic Usage:

import { Word, TagCloud, Options } from "d3-tagcloud";


let tagCloud = new TagCloud(theHTMlElement);

tagCloud.setOptions(opt:Options);

let tags:Word[]=[some words...]

tagCloud.setData(tags)

...

// when you need resize

tagCloud.resize();

'''

// Refresh the Data

tagCloud.setData(newTags);

Example

git clone https://github.com/markisme/TagCloud.git
cd TagCloud
cd example
npm install
npm start

Then open in browser http://localhost:4200

Built With

  • d3 - Bring data to life with SVG, Canvas and HTML.
  • d3-cloud - Create word clouds in JavaScript.

Contributing

And Issue or PR is Great.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

About

A Word/Tag Cloud Library in Typescript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published