D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
aaizemberg
Full window
Github gist
Gráfico de barras con DIVs desde D3.js
<!DOCTYPE html> <head> <script src="https://d3js.org/d3.v3.min.js"></script> <style> .chart div { font: 10px sans-serif; background-color: green; text-align: right; padding: 3px; margin: 1px; color: white; } </style> </head> <body> <div class="chart"></div> <script> var v = [4,8,15,16,23,42]; d3.select("div.chart") .selectAll("div").data(v).enter().append("div") .text( function(d,i) { return d; } ) .attr("style", function(d,i) { return "width: "+d*10+"px;"; } ); </script> </body> </html>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js