{
const width = 900
const height = 850
const svg = d3.create('svg')
.attr("width",width)
.attr("height",height);
const group = svg.append("g")
const x = d3.scaleLinear()
.domain([0,25000])
.range([100, width - 200]);
const y = d3.scaleLinear()
.domain([0, 100])
.range([50, 800]);
const xAxis = d3.axisBottom().scale(x)
.ticks(19, ",.0f")
.tickPadding(-15)
.tickValues(d3.range(0, 25001, 5000))
.tickSize(-5)
const yAxis = d3.axisLeft().scale(y).ticks(6, ",.0f");
const theline = d3.line()
.curve(d3.curveBasisOpen)
.x(d => x(d.ac))
.y(d => y(d.index));
const thearea = d3.area()
.curve(d3.curveBasisOpen)
.y(d => y(d.index))
.x0(d => x(d.ac-d.ac/3*Math.random()))
.x1(d => x(d.ac+d.ac/3*Math.random()));
group
.append("g")
.attr('transform', 'translate(0,' + (50) + ')')
.call(xAxis)
group
.append("g")
.attr('transform', 'translate(' + (100) + ',0)')
.call(yAxis);
group
.append("path")
.attr("d", thearea(population))
.attr("stroke-width", "0px")
.attr("stroke", "none")
.attr("fill", "#45E4FE")
group
.append("path")
.attr("d", theline(population))
.attr("stroke-width", "4px")
.attr("stroke", "#16B6D6")
.attr("fill", "none")
group
.append("text")
.attr("transform", "rotate(-90)")
.attr("y", 30)
.attr("x", -400)
.attr("dy", "1em")
.style("text-anchor", "middle")
.text("Age")
.attr("font-family", "Gill Sans, sans-serif")
.attr("font-size", 16)
.style("fill", "black");
group.append("text")
.attr("y", 10)
.attr("x", 420)
.attr("dy", "1em")
.style("text-anchor", "middle")
.text("Population")
.attr("font-family", "Gill Sans, sans-serif")
.attr("font-size", 16)
.style("fill", "black");
return svg.node();
}