mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-08 10:28:11 +08:00
[WIP DO NOT MERGE] correctly display graph legend for negative continuous metadata (#620)
correctly display graph legend for negative continuous metadata
This commit is contained in:
@@ -146,7 +146,7 @@ class HistogramBrush extends React.Component {
|
|||||||
dispatch({
|
dispatch({
|
||||||
type: "color by continuous metadata",
|
type: "color by continuous metadata",
|
||||||
colorAccessor: field,
|
colorAccessor: field,
|
||||||
rangeMaxForColorAccessor: ranges.max
|
rangeForColorAccessor: ranges
|
||||||
});
|
});
|
||||||
} else if (world.varData.hasCol(field)) {
|
} else if (world.varData.hasCol(field)) {
|
||||||
dispatch(actions.requestSingleGeneExpressionCountsForColoringPOST(field));
|
dispatch(actions.requestSingleGeneExpressionCountsForColoringPOST(field));
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class Continuous extends React.Component {
|
|||||||
dispatch({
|
dispatch({
|
||||||
type: "color by continuous metadata",
|
type: "color by continuous metadata",
|
||||||
colorAccessor: key,
|
colorAccessor: key,
|
||||||
rangeMaxForColorAccessor: summary.max
|
rangeForColorAccessor: summary
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const updateCellColorsMiddleware = store => next => action => {
|
|||||||
|
|
||||||
if (action.type === "color by continuous metadata") {
|
if (action.type === "color by continuous metadata") {
|
||||||
const colorBins = 100;
|
const colorBins = 100;
|
||||||
const [min, max] = [0, action.rangeMaxForColorAccessor];
|
const { min, max } = action.rangeForColorAccessor;
|
||||||
colorScale = d3
|
colorScale = d3
|
||||||
.scaleQuantile()
|
.scaleQuantile()
|
||||||
.domain([min, max])
|
.domain([min, max])
|
||||||
|
|||||||
Reference in New Issue
Block a user