red lines on canvas for testing

This commit is contained in:
Colin Megill
2017-12-07 14:33:40 -08:00
parent 9a3d349f99
commit fa9d0ad528
@@ -19,11 +19,18 @@ const drawLinesCanvas = (
colorScale,
) => {
return (d) => {
if (colorAccessor && colorScale) {
ctx.strokeStyle = d3.interpolateViridis(colorScale(d[colorAccessor]));
} else {
ctx.strokeStyle = "rgba(0,0,0,1)";
}
if (d["__selected__"]) {
ctx.strokeStyle = "rgb(255,0,0)";
}
ctx.beginPath();
var coords = project(d, dimensions, xscale);
coords.forEach((p,i) => {