View on GitHub

MySQL Word Cloud

HTML5 Word Cloud from a MySQL Database

Download this project as a .zip file Download this project as a tar.gz file

If you…

and you just want a word cloud…then you have come to the right place!

1.   Extract

Download the zip/tar or clone the Git Repo into a directory in your jQuery enabled web site.


2.   Include

Add a <SCRIPT> tag for the jQuery plugin to the <HEAD> section of your site:

<script type="text/javascript" src="wordcloud/jquery.wordcloud.js"></script>

and a <CANVAS> tag where you want the cloud to appear in the <BODY> section of your site:

<canvas id="cloudcanvas" width="600" height="400"></canvas>

3.   Connect

After the DOM is ready, call the wordCloud function on the canvas jQuery object with your database credentials.

$("#cloudcanvas").wordCloud({
	database: {
		dbHost: <your database host>,
		dbUser: <your datbase username>,
		dbPass: <your database password>,
		dbName: <your database name>,
		selectFields: <comma separated list of fields to select>,
		tableName: <database table to select from>
	}
});