D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
dougdowson
Full window
Github gist
Dot Map
<!DOCTYPE HTML> <meta charset="utf-8"> <html> <head> <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400italic,600italic,700italic,200,300,400,600,700,900"> <script src="https://d3js.org/d3.v3.min.js"></script> <style> body, h1, h2, h3, p { margin: 0; padding: 0; font-family: 'Source Sans Pro', sans-serif; font-size: 1em; color: #333; font-weight: 400; } #content { margin: 5px; padding: 20px; width: 805px; border: 1px solid #ccc; } #map { margin: 10px 0px 0px 0px; padding: 0px; } h1, h2 { line-height: 1em; font-size: 1.75em; font-weight: 900; color: #000; } h2.year, h2.count { margin: 5px 0px 0px 0px; font-size: 1.3em; font-weight: 700; } p { margin: 10px 0px 0px 0px; } input { display: block; width: 200px; margin: 10px 0px 0px 0px; } .states { fill: #f5eede; stroke: #fff; stroke-width: 2; stroke-linejoin: round; } .openings { fill: #f5eede; stroke: #8D0600; stroke-width: 2; } .openings:hover { fill: #8D0600; } .locations{ fill: #f5eede; stroke: #C0392B; stroke-width: 1; opacity: 0.7; } .tooltip { position: absolute; padding: 7px; font-size: 0.9em; pointer-events: none; background: #fff; border: 1px solid #ccc; border-radius: 4px; -moz-box-shadow: 3px 3px 10px 0px rgba(0, 0, 0, 0.25); -webkit-box-shadow: 3px 3px 10px 0px rgba(0, 0, 0, 0.25); box-shadow: 3px 3px 10px 0px rgba(0, 0, 0, 0.25); } .tooltip p { margin: 0; padding: 0; } </style> </head> <body> <div id="content"> <h1>Walmart Store Openings, 1962-2013</h1> <h2 class="year"></h2> <h2 class="count"></h2> <input id="menu" type="range" min="1962" max="2013" step="1" value ="1962"/> <div id="map"></div> <script type="text/javascript" src="map.js"></script> </div> </body> </html>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js