chart1 = hexgrid((g, hexes) => {
const d = 2 * radius;
const line = (length) =>
d3.line()([
[0, 0],
[length, 0]
]);
g.append("path")
.attr("d", line(d * ratio))
.attr("stroke-width", "1")
.attr("stroke", "#f00")
.clone()
.attr("transform", "rotate(60)")
.clone()
.attr("transform", "rotate(-60)")
.clone()
.attr("d", line(d))
.attr("stroke", "#0f0a")
.attr("transform", "rotate(30)")
.clone()
.attr("transform", "rotate(90)")
.clone()
.attr("d", line(d * 0.75))
.attr("stroke", "#00fa")
.attr("transform", "rotate(-30)")
.clone()
.attr("transform", "rotate(-90)");
})