mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-23 05:38:11 +08:00
draw graph from color attr
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user