chart_a= {
const svg= d3.create("svg").attr("viewBox", ([0, 0, width + 200, height - 100]))
const x= d3.scaleLinear()
.domain([0, d3.max( data, d=> d.Index)])
.range([0, 300])
svg.append("g")
.attr("transform", `translate(${ 0 }, ${ height/ 2})`)
.call(d3.axisBottom(x))
const y= d3.scaleLinear()
.domain([0, 1])
.range([200, 20])
svg.append("g")
.call(d3.axisLeft(y))
svg.selectAll(".line")
.data(data)
.append("path")
.attr("fill", "none")
.attr("stroke-width", 1.5)
.attr("d", d3.line()
.x(function(d) { return x(d.Index) })
.y(function(d) { return y(d.Air_Temp_at_2m) })
)
return svg.node();
}