From d5bcfbef183bca43e6e388c92f024a92234130e1 Mon Sep 17 00:00:00 2001 From: Colin Megill Date: Thu, 2 Nov 2017 12:55:34 -0700 Subject: [PATCH] preparing for color scales --- src/components/graph/drawGraph.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/graph/drawGraph.js b/src/components/graph/drawGraph.js index 2b3cd994..2a43756c 100644 --- a/src/components/graph/drawGraph.js +++ b/src/components/graph/drawGraph.js @@ -56,13 +56,15 @@ export const drawGraph = (data, context, expressionsCountsMap) => { context.clearRect(0, 0, width, height); /* ! create a scale to map between expression values and colors, remove to somewhere else */ - const expressionToColorScale = d3.scaleLinear() - .domain([0, expressionsCountsMap.maxValue]) - .range([1,0]) + // const expressionToColorScale = d3.scaleLinear() + // .domain([0, expressionsCountsMap.maxValue]) + // .range([1,0]) /* shuffle the data to overcome render order hiding cells */ data = d3.shuffle(data); + console.log('drawing', data, context, expressionsCountsMap) + /* loop */ data.forEach((p, i) => { context.beginPath(); @@ -84,8 +86,8 @@ export const drawGraph = (data, context, expressionsCountsMap) => { // )) // ) // } - context.fillStyle = d3.interpolateViridis(expressionToColorScale( - expressionsCountsMap[p[0]] - )); + // context.fillStyle = d3.interpolateViridis(expressionToColorScale( + // expressionsCountsMap[p[0]] + // )); }); }