draw graph from color attr

This commit is contained in:
Colin Megill
2017-12-22 19:29:09 -08:00
parent f497440af2
commit 862a1b129b
+10 -7
View File
@@ -98,13 +98,16 @@ export const drawGraph = (
2 * Math.PI /* eAngle */
);
if (colorAccessor && colorScale) {
context.fillStyle = d3.interpolateViridis(colorScale(
_currentCellSelectionMap[p[0]][colorAccessor]
));
} else {
context.fillStyle = "rgb(0,0,0)";
}
context.fillStyle = _currentCellSelectionMap[p[0]]["__color__"]
// if (colorAccessor && colorScale) {
// context.fillStyle = d3.interpolateViridis(colorScale(
// _currentCellSelectionMap[p[0]][colorAccessor]
// ));
// } else {
// context.fillStyle = "rgb(0,0,0)";
// }
if (_currentCellSelectionMap[p[0]]["__selected__"]) {
context.globalAlpha = 1;