From 4e274eb09ab85ed0ed1c6bb5d1f1633e5471a932 Mon Sep 17 00:00:00 2001 From: Colin Megill Date: Wed, 21 Feb 2018 14:47:55 -0800 Subject: [PATCH] white space --- .../continuous/setupParallelCoordinates.js | 12 ++++---- src/components/graph/drawGraph.js | 29 ------------------- 2 files changed, 6 insertions(+), 35 deletions(-) diff --git a/src/components/continuous/setupParallelCoordinates.js b/src/components/continuous/setupParallelCoordinates.js index 0d59babb..aafaed37 100644 --- a/src/components/continuous/setupParallelCoordinates.js +++ b/src/components/continuous/setupParallelCoordinates.js @@ -19,12 +19,12 @@ const setupParallelCoordinates = ( .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); var canvas = container.append("canvas") - .attr("width", width * devicePixelRatio) - .attr("height", height * devicePixelRatio) - .style("width", width + "px") - .style("height", height + "px") - .style("margin-top", margin.top + "px") - .style("margin-left", margin.left + "px"); + .attr("width", width * devicePixelRatio) + .attr("height", height * devicePixelRatio) + .style("width", width + "px") + .style("height", height + "px") + .style("margin-top", margin.top + "px") + .style("margin-left", margin.left + "px"); var ctx = canvas.node().getContext("2d"); ctx.globalCompositeOperation = 'darken'; diff --git a/src/components/graph/drawGraph.js b/src/components/graph/drawGraph.js index f0141059..60585bed 100644 --- a/src/components/graph/drawGraph.js +++ b/src/components/graph/drawGraph.js @@ -64,13 +64,6 @@ export const drawGraph = ( /* clear canvas */ context.clearRect(0, 0, globals.graphWidth, globals.graphHeight); - // let colorScale = null; /* it could be 'by expression' and that's a special case */ - - /* ! 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 data = []; _.each(currentCellSelection, (cell, i) => { @@ -101,34 +94,12 @@ export const drawGraph = ( 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; } else { context.globalAlpha = opacityForDeselectedCells; } - // if (i < 20) { - // console.log( - // '0 to 1 scale', expressionToColorScale(expressionsCountsMap[p[0]]), - // 'color', d3.interpolateViridis(expressionToColorScale( - // expressionsCountsMap[p[0]] - // )) - // ) - // console.log('meta', _.find(metadata, {CellName: p[0]}), color, p) - // } - // context.fillStyle = d3.interpolateViridis(expressionToColorScale( - // expressionsCountsMap[p[0]] - // )); - context.fill(); }); }