Chart.js module for charting word or tag clouds. Adding new chart type: wordCloud
.
Install
sh
npm install chart.js chartjs-chart-wordcloud
Usage
see Examples
and CodePen
Configuration
Data Structure
ts
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: IWordControllerOptions Word element options: IWordElementOptions