makeChart1 = (dataset) => {
dataset.sort((a, b) => b.downloads - a.downloads);
const chart = d3.create("svg").attr("width", w).attr("height", h);
chart
.selectAll("rect")
.data(dataset)
.join("rect")
.attr("x", 80)
.attr("y", (d) => yScale(d.app_name))
.attr("width", 0)
.attr("height", 20)
.style("fill", (d) => colorScale(0))
.transition()
.attr("width", (d) => xScale(d.downloads))
.style("fill", (d) => colorScale(d.downloads))
.delay((d, i) => i * 35)
.duration(1500)
.transition()
.style("fill", "#88d")
.duration(1500)
.transition()
.style("fill", d => colorScale(d.downloads))
.duration(1500);
chart
.append("g")
.classed("axis", true)
.attr("transform", `translate(80, ${h - 20})`)
.call(d3.axisBottom(xScale));
chart
.append("g")
.classed("axis", true)
.attr("transform", `translate(80,0)`)
.call(d3.axisLeft(yScale));
chart
;
return chart.node();
}