[ Launch: Axis tick marks ] 5207532 by RobinL
-
-
Save RobinL/5207532 to your computer and use it in GitHub Desktop.
Axis tick marks
This file contains hidden or 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":"Axis tick marks","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"style.css":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"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} |
This file contains hidden or 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
svg = d3.select("svg") | |
var myScale = d3.scale.linear() | |
.domain([0,100]) | |
.range([0,400]); | |
var ticks = [0,50,60,100]; | |
var myAxis = d3.svg.axis() | |
.scale(myScale) | |
.tickValues(ticks); | |
svg.append("g") | |
.attr("class", "axis") | |
.call(myAxis) | |
.attr("transform","translate(100,100)"); | |
This file contains hidden or 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
path { | |
fill: none; | |
stroke: black; | |
stroke-width: 1px; | |
shape-rendering: crispEdges; | |
} | |
line { | |
fill: none; | |
stroke: black; | |
stroke-width: 1px; | |
shape-rendering: crispEdges; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment