white space

This commit is contained in:
Colin Megill
2018-02-21 14:47:55 -08:00
parent add08c4764
commit 4e274eb09a
2 changed files with 6 additions and 35 deletions

View File

@@ -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';

View File

@@ -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();
});
}