function chart(){
const svg = d3.select(DOM.svg(width, height));
svg.append("g")
.attr("fill", "steelblue")
.selectAll("rect")
.data(importances_prepared)
.join("rect")
.attr("x", d => x(d.name))
.attr("y", d => y(d.value))
.attr("height", d => y(0) - y(d.value))
.attr("width", x.bandwidth());
svg.append("g")
.call(xAxis);
svg.append("g")
.call(yAxis);
svg.append("text")
.attr("x", width / 2)
.attr("y", 30)
.attr("text-anchor", "middle")
.style("font-size", "20px")
.text("Importances of variables to predict player's salary");
svg.append("text")
.attr("x", width/2)
.attr("y", 490)
.attr("text-anchor", "middle")
.style("font-size", "16px")
.text("Variables");
svg.append("text")
.attr("x", 10)
.attr("y", height/2)
.attr("transform", function(d) {
return "rotate(-90,10, 250)"
})
.attr("text-anchor", "middle")
.style("font-size", "16px")
.text("Importance");
return svg.node();
}