D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
Fil
Full window
Github gist
GNU parallel logo
Challenged by @curran
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://d3js.org/d3.v4.min.js"></script> <style> body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } </style> </head> <body> <script> // Feel free to change or delete any of the code you see in this editor! var svg = d3.select("body").append("svg") .attr("width", 960) .attr("height", 500) svg.selectAll('g') .data(d3.range(9)) .enter() .append('g') .attr('transform', d => `translate(${20 + 2*((d+2)%5) - 2*((1-d)%3)}, ${20 + d*15})`) .selectAll('rect') .data(d3.range(15)) .enter() .append('rect') .attr('x', d => d * 20) .attr("width", 20) .attr("height", 15) .attr('fill', d => (d%2) ? 'black':'white') .attr('stroke', d => (d%2) ? '#888':'black') var text = svg.append('text') .attr('font-size', 50) .attr('font-family', 'sans-serif') .attr('transform', 'translate(20,210)') text.append('tspan').text('GNU ') text.append('tspan').text('para').attr('font-weight', 'bold') text.append('tspan').text('ll').attr('font-weight', 'bold').attr('font-style', 'italic').attr('dx', -3) text.append('tspan').text('el').attr('font-weight', 'bold').attr('dx', 1) </script> </body>
https://d3js.org/d3.v4.min.js