n = "left";
	ctx.fillText("[" + x_template.replace("%x", String(min_x)) + ",", slider_margin_left + 6, slider_margin_top + 6);
	ctx.textAlign = "right";
	ctx.fillText(x_template.replace("%x", String(max_x)) + "]", slider_w - slider_margin_right - 6, slider_margin_top + 6);
	// the selected interval
	ctx.fillStyle="#942b3b";
	ctx.textBaseline = "bottom";
	ctx.textAlign = "left";
	const left_piece_text = "[" + x_template.replace("%x", lb.toFixed(0)) + ",";
	const left_width = ctx.measureText(left_piece_text).