From 862a1b129b1cebba5a392c3e99ea23aec2d33194 Mon Sep 17 00:00:00 2001 From: Colin Megill Date: Fri, 22 Dec 2017 19:29:09 -0800 Subject: [PATCH] draw graph from color attr --- src/components/graph/drawGraph.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/graph/drawGraph.js b/src/components/graph/drawGraph.js index 8bce4d19..a1632556 100644 --- a/src/components/graph/drawGraph.js +++ b/src/components/graph/drawGraph.js @@ -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;