D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
jasonkolb
Full window
Github gist
Rating Results
Built with
blockbuilder.org
<!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.append("text") .text("Edit the code below to change me!") .attr("y", 370) .attr("x", 120) .attr("font-size", 36) .attr("font-family", "monospace") d3.json("ratingResults.json", function (error, data) { console.log( "rating results" ); debugger; var svg = d3.select("svg"); svg.select("defs").remove(); var filter = svg.append("defs").append("filter").attr("id", "gooeyCodeFilter"); filter.append("feGaussianBlur").attr("id", "gaussblurrer").attr("in", "SourceGraphic").attr("stdDeviation", 6).attr("color-interpolation-filters", "sRGB").attr("result", "blur"); filter.append("feColorMatrix").attr("in", "blur").attr("mode", "matrix").attr("values", "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 24 -5").attr("result", "gooey"); var g = svg.append("g").attr("id", "filterG").attr("transform", "translate(510,510)").style("filter", "url(#gooeyCodeFilter)"); var textG = svg.append("g").attr("transform", "translate(1044,510)"); var nesting = d3.nest(); layers.forEach(function (d) { nesting.key(function (p) { return p[d]; }); }); </script> </body>
https://d3js.org/d3.v4.min.js