Textures.js
SVG patterns for Data Visualization
Textures are useful for the
selective perception of different categories
Getting started
-- from the top of d3.js --
var svg = d3.select("#example")
.append("svg");
var t = textures.lines()
.thicker();
svg.call(t);
svg.append("circle")
.style("fill", t.url());
Lines
Colors and textures can be combined
to have further levels of selection
Circles
Textures of increasing size can represent an order relation
Paths
Create custom patterns
var t = textures.paths()
.d(s =>
`M 0,${s * 3 / 4}
l ${s / 2},${-s / 2}
l ${s / 2},${s / 2}`
)
.size(20)
.strokeWidth(1)
.thicker(2)
.stroke("darkorange");
from Hacker News https://ift.tt/2YF6kT1
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.