axis = g =>
g
.attr(
"transform",
`translate(${margin.left}, ${height - margin.bottom - margin.top})`
)
.call(
d3
.axisBottom(axisScale)
.tickSize(-height - margin.bottom - margin.top)
.tickFormat(d => `${d3.format(".2f")(d) * 100}%`)
.tickValues(axisValues)
)
.call(g => g.select(".domain").remove())