Fiddling with d3.geom.voronoi and a polygon.
The polygon's vertices are fed into the Voronoi layout, that yields the colored regions as output. Also, links are drawn as dashed lines.
Relevant examples by Mike Bostock:
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>Voronoi</title>
<link type="text/css" href="index.css" rel="stylesheet"/>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="index.js"></script>
</head>
<body onload="main()"></body>
</html>
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js