Skip to content

Instantly share code, notes, and snippets.

@tonysherbondy
Created December 1, 2012 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonysherbondy/4185024 to your computer and use it in GitHub Desktop.
Save tonysherbondy/4185024 to your computer and use it in GitHub Desktop.
Update Pattern
{"description":"Update Pattern","endpoint":"","display":"svg","public":true,"require":[{"name":"jquery","url":"http://code.jquery.com/jquery-1.8.3.js"},{"name":"handlebars","url":"http://cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.rc.1.js"}],"tab":"edit","display_percent":0.6187547456340167,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":600,"height":300,"hide":false}}
var textstring = "Hi world!";
var textx = 120;
var texty = 153;
var fontsize = 126;
var svg = d3.select("svg")
var text = svg.append("svg:text")
.attr("x", textx)
.attr("y", texty)
.text(textstring)
.attr("class", "letter")
.style("font-size", fontsize);
text {
font: bold 48px monospace;
}
.enter {
fill: green;
}
.update {
fill: #333;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment