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, colorScale,
) => { ) => {
return (d) => { return (d) => {
if (colorAccessor && colorScale) { if (colorAccessor && colorScale) {
ctx.strokeStyle = d3.interpolateViridis(colorScale(d[colorAccessor])); ctx.strokeStyle = d3.interpolateViridis(colorScale(d[colorAccessor]));
} else { } else {
ctx.strokeStyle = "rgba(0,0,0,1)"; ctx.strokeStyle = "rgba(0,0,0,1)";
} }
if (d["__selected__"]) {
ctx.strokeStyle = "rgb(255,0,0)";
}
ctx.beginPath(); ctx.beginPath();
var coords = project(d, dimensions, xscale); var coords = project(d, dimensions, xscale);
coords.forEach((p,i) => { coords.forEach((p,i) => {