mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-25 11:18:12 +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({
|
||||
type: "color by continuous metadata",
|
||||
colorAccessor: field,
|
||||
rangeMaxForColorAccessor: ranges.max
|
||||
rangeForColorAccessor: ranges
|
||||
});
|
||||
} else if (world.varData.hasCol(field)) {
|
||||
dispatch(actions.requestSingleGeneExpressionCountsForColoringPOST(field));
|
||||
|
||||
@@ -33,7 +33,7 @@ class Continuous extends React.Component {
|
||||
dispatch({
|
||||
type: "color by continuous metadata",
|
||||
colorAccessor: key,
|
||||
rangeMaxForColorAccessor: summary.max
|
||||
rangeForColorAccessor: summary
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ const updateCellColorsMiddleware = store => next => action => {
|
||||
|
||||
if (action.type === "color by continuous metadata") {
|
||||
const colorBins = 100;
|
||||
const [min, max] = [0, action.rangeMaxForColorAccessor];
|
||||
const { min, max } = action.rangeForColorAccessor;
|
||||
colorScale = d3
|
||||
.scaleQuantile()
|
||||
.domain([min, max])
|
||||
|
||||
Reference in New Issue
Block a user