zenkay / d3-cloud-simplified

Wrapper for d3-cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

D3-cloud simplified

Simpler version of D3-cloud

Usage

Include D3 library, D3-cloud plugin and D3-cloud-simplified

<script src="d3.js"></script>
<script src="d3.layout.cloud.js"></script>
<script src="d3.cloud.simplified.js"></script>

Call cloud.make() passing options (width, height, font, container CSS selector and words list)

cloud.make({
  width: 1000,
  height: 800,
  font: "Helvetica",
  container: "#wordcloud",
  words: [{text: "This", size: 40}, {text: "is", size: 40}, {text: "an", size: 40}, {text: "Example", size: 40}]
})

About

Wrapper for d3-cloud


Languages

Language:JavaScript 100.0%