D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
ricardofelippe
Full window
Github gist
D3 Scales
Built with
blockbuilder.org
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://d3js.org/d3.v3.min.js"></script> <style> body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } </style> </head> <body> <p>Click the button to show all colors of d3.scale.category10().</p> <button onclick="category10()">Click me</button> <p id="demo"></p> <script> function category10() { var color = d3.scale.category10(); document.getElementById("demo").innerHTML = [color(1), color(2), color(3), color(4), color(5), color(6), color(7),color(8), color(9), color(10)]; } </script> body>
https://d3js.org/d3.v3.min.js