[ Launch Inlet ]
Gist #2958196 No Previous Gist
-
-
Save tonysherbondy/4185024 to your computer and use it in GitHub Desktop.
Update Pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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