Sha256: 2ad2b4d6d62c3ff9701ecdc7869a7fd8bc2bdeae300ca1479fe7c30db97c77d7

Contents?: true

Size: 957 Bytes

Versions: 25

Compression:

Stored size: 957 Bytes

Contents

<!DOCTYPE html>
<html>
  <head>
    <title>Hello, world!</title>
    <script type="text/javascript" src="../../d3.js"></script>
  </head>
  <body>
    Your lucky numbers are:<br>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <script type="text/javascript">

d3.selectAll("span")
  .append("svg")
    .attr("width", 100)
    .attr("height", 100)
  .append("text")
    .attr("x", "50%")
    .attr("y", "50%")
    .attr("dy", ".35em")
    .attr("text-anchor", "middle")
    .attr("fill", "white")
    .attr("stroke", "black")
    .attr("stroke-width", 1.5)
    .style("font", "36pt Comic Sans MS")
    .style("text-shadow", "3px 3px 3px rgba(0,0,0,.4)")
    .text(function() { return ~~(Math.random() * 100); });

function transform() {
  d3.selectAll("text")
      .text(function() { return ~~(Math.random() * 100); });
}

window.addEventListener("keypress", transform, false);

    </script>
  </body>
</html>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
picky-statistics-4.5.0 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.4.2 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.4.1 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.4.0 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.3.2 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.3.1 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.3.0 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.2.4 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.2.3 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.2.2 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.2.1 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.2.0 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.1.0 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.0.9 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.0.8 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.0.7 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.0.6 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.0.5 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.0.4 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html
picky-statistics-4.0.3 lib/picky-statistics/application/javascripts/d3/examples/hello-world/hello-transform.html