function sparkline(values, width = 64, height = 17) {
const x = d3.scaleLinear()
.domain([0, values.length - 1])
.range([5, width - 5]);
const y = d3.scaleLinear().domain(d3.extent(values)).range([height - 5, 5]);
const context = DOM.context2d(width, height);
const line = (d) => {
context.beginPath();
var lineDrawer = d3.line().x((d, i) => x(i)).y(y).context(context);
lineDrawer(d);
context.strokeStyle = 'black';
context.stroke();
context.closePath();
}
line(values)
context.fillText(values[0], width - (width * .2), 10)
return context.canvas;
}