multilinechart = {
const svg = d3.create("svg")
.attr("width", width)
.attr("height", height);
svg.append("g")
.call(xmultiAxis);
svg.append("g")
.call(ymultiAxis);
svg.selectAll('.line')
.data(dataGroup)
.join('path')
.attr("class", "line")
.attr("d", d => lineMultiCases(d[1]))
.attr("stroke", d => colorScale(d[0]))
.style("fill", "none")
.style("stroke-width", 1);
let legend = svg.selectAll(".legend")
.data(dataGroup)
.enter();
legend
.append('text')
.text(d => d[0])
.attr('x', legendOrigin[0] + labelHeight * 1.2)
.attr('y', (d,i) => legendOrigin[1] + labelHeight + labelHeight * 1.2 *i)
.style('font-family', 'sans-serif')
.style('font-size', `${labelHeight-3}px`);
legend
.append('rect')
.attr('x', legendOrigin[0])
.attr('y', (d,i) => legendOrigin[1] + labelHeight * 1.2 * i)
.attr('width', labelHeight)
.attr('height', labelHeight)
.attr('fill', d => colorScale(d[0]))
.attr('stroke', 'grey')
.style('stroke-width', '1px');
return svg.node();
}