function sparklineArray(values, width = 80, height = 22) {
const x = d3
.scaleLinear()
.domain([0, values.length - 1])
.range([0.5, width - 0.5]);
const y = d3
.scaleLinear()
.domain(d3.extent(values))
.range([height - 0.5, 0.5]);
const context = DOM.context2d(width, height);
const line = d3
.line()
.x((d, i) => x(i))
.y(y)
.context(context);
context.beginPath(), line(values), context.stroke();
return context.canvas;
}