D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
aaizemberg
Full window
Github gist
2 círculos (con lie factor = 1)
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.2.3/d3.min.js"></script> <title>lie factor</title> </head> <body> <script> var radio = d3.scaleLinear() .domain([0, 100]) .range([0, 50]); var area = d3.scaleSqrt() .domain([0, 100]) .range([0, 50]); var ex = d3.scaleLinear() .domain([0, 1]) .range([50, 150]); var svg = d3.select("body") .append("svg") .attr("width",200) .attr("height",200); var data = [50,100]; svg.selectAll("circle").data(data).enter().append("circle") .attr("cx", (d,i) => ex(i) ) .attr("cy",100) .style("stroke","black") .style("fill","none") .attr("r", (d) => area(d) ); </script> </body> </html>
https://cdnjs.cloudflare.com/ajax/libs/d3/4.2.3/d3.min.js