function chart (data) {
const svg = d3.select(DOM.svg(width, height))
const x = d3.scaleTime()
.domain(d3.extent(data, d => d.t))
.range([margin.left, width - margin.right])
const minY = d3.min(data, d => Math.min(d.u, d.e, d.y, d.s))
const maxY = d3.max(data, d => Math.max(d.u, d.y, d.s, d.e))
const y = d3.scaleLinear()
.domain([minY,maxY]).nice()
.range([height - margin.bottom, margin.top])
const u = d3.scaleLinear()
.domain([minY,maxY]).nice()
.range([height - margin.bottom, margin.top])
const s = d3.scaleLinear()
.domain([minY,maxY]).nice()
.range([height - margin.bottom, margin.top])
const e = d3.scaleLinear()
.domain([minY,maxY]).nice()
.range([height - margin.bottom, margin.top])
const lineU = d3.line()
.x(d => x(d.t))
.y(d => u(d.u))
const lineY = d3.line()
.x(d => x(d.t))
.y(d => y(d.y))
const lineE = d3.line()
.x(d => x(d.t))
.y(d => e(d.e))
const lineS = d3.line()
.x(d => x(d.t))
.y(d => s(d.s))
const xAxis = g => g
.attr("transform", `translate(0,${height - margin.bottom})`)
.call(d3.axisBottom(x))
const yAxis = g => g
.attr("transform", `translate(${margin.left},0)`)
.call(d3.axisLeft(y))
const yAxis2 = g => g
.attr("transform", `translate(${width - margin.right},0)`)
.call(d3.axisRight(y))
svg.append("g")
.call(xAxis);
svg.append("g")
.call(yAxis);
svg.append("g")
.call(yAxis2);
svg.append("path")
.datum(data)
.attr("fill", "salmon")
.attr("stroke", "red")
.attr("stroke-width", 2)
.attr("d", lineS)
.attr("opacity",0.5);
svg.append("path")
.datum(data)
.attr("fill", "none")
.attr("stroke", "steelblue")
.attr("stroke-width", 2)
.attr("d", lineY)
.attr("opacity",1);
svg.append("path")
.datum(data)
.attr("fill", "none")
.attr("stroke", "green")
.attr("stroke-width", 2)
.attr("d", lineE)
.attr("opacity",0.5);
svg.append("path")
.datum(data)
.attr("fill", "none")
.attr("stroke", "brown")
.attr("stroke-width", 2)
.attr("d", lineU)
.attr("opacity",0.5);
return svg.node();
}