chart = {
const context = DOM.context2d(width, height);
context.fillStyle = "#F5F5F5";
context.fillRect(0, 0, width, height);
const area = d3.area()
.x0(d => x(-d.length))
.x1(d => x(d.length))
.y(d => y(d.x0))
.curve(d3.curveBasis)
.context(context);
context.strokeStyle = "blue";
context.lineWidth = 2;
context.beginPath();
area(bins);
context.stroke();
return context.canvas;
}