All Projects → sgratzl → chartjs-chart-wordcloud

sgratzl / chartjs-chart-wordcloud

Licence: MIT License
Chart.js Word Clouds

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to chartjs-chart-wordcloud

Wordcloud2.js
Tag cloud/Wordle presentation on 2D canvas or HTML
Stars: ✭ 1,905 (+5502.94%)
Mutual labels:  word-cloud, wordcloud, tag-cloud
chartjs-plugin-piechart-outlabels
Highly customizable Chart.js plugin that displays labels outside the pie/doughnut chart.
Stars: ✭ 46 (+35.29%)
Mutual labels:  chartjs, chartjs-plugin
chartjs-plugin-datasource-prometheus
Chart.js plugin for Prometheus data loading
Stars: ✭ 77 (+126.47%)
Mutual labels:  chartjs, chartjs-plugin
chartjs-chart-graph
Chart.js Graph-like Charts (tree, force directed)
Stars: ✭ 103 (+202.94%)
Mutual labels:  chartjs, chartjs-plugin
chartjs-plugin-doughnutlabel
Chart.js plugin for doughnut chart to display text in the center
Stars: ✭ 48 (+41.18%)
Mutual labels:  chartjs, chartjs-plugin
soan
Social Analysis based on Whatsapp data
Stars: ✭ 106 (+211.76%)
Mutual labels:  word-cloud, wordcloud
GravityTagCloudView
A tag cloud view with gravity.
Stars: ✭ 22 (-35.29%)
Mutual labels:  tag-cloud
laravel-chartjs
No description or website provided.
Stars: ✭ 13 (-61.76%)
Mutual labels:  chartjs
firefox-health-dashboard
firefox-health-dashboard.netlify.com
Stars: ✭ 26 (-23.53%)
Mutual labels:  chartjs
ipychart
The power of Chart.js with Python
Stars: ✭ 48 (+41.18%)
Mutual labels:  chartjs
chartjs.github.io
www.chartjs.org
Stars: ✭ 20 (-41.18%)
Mutual labels:  chartjs
gbkel-portfolio
💎 My personal website that's mainly powered by Next.js, my own style guide and a lot of other technologies.
Stars: ✭ 12 (-64.71%)
Mutual labels:  tag-cloud
Xiecheng Comment
🌈Xiecheng_Comment多线程Threading爬取携程的丽江古城景点评论并生成词云
Stars: ✭ 23 (-32.35%)
Mutual labels:  wordcloud
StatusPilatus
Monitor your PC like never before!
Stars: ✭ 52 (+52.94%)
Mutual labels:  chartjs
andresrodriguez55.github.io
Personal blog and portfolio with administration panel, notification system and comment system.
Stars: ✭ 18 (-47.06%)
Mutual labels:  chartjs
network performance monitor
Network Performance Monitor - a portable tool for troubleshooting performance issues with home networks
Stars: ✭ 74 (+117.65%)
Mutual labels:  chartjs
FacebookGraphAPI-Examples
Examples for facebook graph api for python
Stars: ✭ 38 (+11.76%)
Mutual labels:  wordcloud
django admin chart js
An example repo showing how to add Chart.js to Django admin
Stars: ✭ 35 (+2.94%)
Mutual labels:  chartjs
ngx-chartjs
Functional Chart.js wrapper for Angular
Stars: ✭ 50 (+47.06%)
Mutual labels:  chartjs
covid-19-next
Offline Covid-19 stats
Stars: ✭ 17 (-50%)
Mutual labels:  chartjs

Chart.js Word Clouds

NPM Package Github Actions

Chart.js module for charting word or tag clouds. Adding new chart type: wordCloud.

word cloud example

Related Plugins

Check out also my other chart.js plugins:

Install

npm install --save chart.js chartjs-chart-wordcloud

Usage

see Samples on Github

or at this Open in CodePen

Word Cloud

Data Structure

const config = {
  type: 'wordCloud',
  data: {
    // text
    labels: ['Hello', 'world', 'normally', 'you', 'want', 'more', 'words', 'than', 'this'],
    datasets: [
      {
        label: 'DS',
        // size in pixel
        data: [90, 80, 70, 60, 50, 40, 30, 20, 10],
      },
    ],
  },
  options: {},
};

Styling of elements

A word has the basic FontSpec styling options (family, color, ...). In addition it has several options regarding rotating the text.

Controller options:

export interface IWordCloudControllerDatasetOptions
extends IControllerDatasetOptions,
ScriptableAndArrayOptions<IWordElementOptions>,
ScriptableAndArrayOptions<ICommonHoverOptions> {
/**
* whether to fit the word cloud to the map, by scaling to the actual bounds
* @default true
*/
fit: boolean;
}

Word element options:

export interface IWordElementOptions extends IFontSpec {
/**
* rotation of the word
* @default undefined then it will be randomly derived given the other constraints
*/
rotate: number;
/**
* number of rotation steps between min and max rotation
* @default 2
*/
rotationSteps: number;
/**
* angle in degree for the min rotation
* @default -90
*/
minRotation: number;
/**
* angle in degree for the max rotation
* @default 0
*/
maxRotation: number;
/**
* padding around each word while doing the layout
* @default 1
*/
padding: number;
}

ESM and Tree Shaking

The ESM build of the library supports tree shaking thus having no side effects. As a consequence the chart.js library won't be automatically manipulated nor new controllers automatically registered. One has to manually import and register them.

Variant A:

import { Chart } from 'chart.js';
import { WordCloudController, WordElement } from 'chartjs-chart-wordcloud';

Chart.register(WordCloudController, WordElement);
...

new Chart(ctx, {
  type: WordCloudController.id,
  data: [...],
});

Variant B:

import { WordCloudChart } from 'chartjs-chart-wordcloud';

new WordCloudChart(ctx, {
  data: [...],
});

Development Environment

npm i -g yarn
yarn install
yarn sdks vscode

Common commands

yarn compile
yarn test
yarn lint
yarn fix
yarn build
yarn docs
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].