Skip to content

Instantly share code, notes, and snippets.

@blockspring
blockspring / index.html
Last active August 29, 2015 14:02
BlockSpring - A Basic Stream Graph.
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
margin: 0;
}
path {
stroke: #000;
@blockspring
blockspring / configs.json
Last active August 29, 2015 14:02
BlockSpring - Stream Graph.
{
"appearance": {
},
"roles": {
"streamHeight": {
"allows_multiple": false,
"required": true,
"types": [
"number"
],
@blockspring
blockspring / configs.json
Last active August 29, 2015 14:02
BlockSpring - Stream Graph, Extra Credit
{
"appearance": {
"colors": {
"readable": "Colors",
"category": "Colors",
"placeholder": null,
"values": ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"],
"description": "Sets the colors used in the graph. Each color will be used for 1 series. If you specify less colors than series, colors will be repeated.",
"type": "multiple_colors_arbitrary"
}
@blockspring
blockspring / cloud.js
Created July 29, 2014 07:10
D3 Wordcloud
// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
(function() {
function cloud() {
var size = [256, 256],
text = cloudText,
font = cloudFont,
fontSize = cloudFontSize,
fontStyle = cloudFontNormal,
fontWeight = cloudFontNormal,
@blockspring
blockspring / cloud.js
Created July 29, 2014 07:10
D3 Wordcloud
// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
(function() {
function cloud() {
var size = [256, 256],
text = cloudText,
font = cloudFont,
fontSize = cloudFontSize,
fontStyle = cloudFontNormal,
fontWeight = cloudFontNormal,
@blockspring
blockspring / cloud.js
Created July 29, 2014 07:10
D3 Wordcloud
// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
(function() {
function cloud() {
var size = [256, 256],
text = cloudText,
font = cloudFont,
fontSize = cloudFontSize,
fontStyle = cloudFontNormal,
fontWeight = cloudFontNormal,
@blockspring
blockspring / cloud.js
Created July 26, 2014 19:27
D3 Wordcloud
// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
(function() {
function cloud() {
var size = [256, 256],
text = cloudText,
font = cloudFont,
fontSize = cloudFontSize,
fontStyle = cloudFontNormal,
fontWeight = cloudFontNormal,