[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:
Bruce Martin
2019-02-28 09:08:19 -08:00
committed by GitHub
parent 2f1facaafb
commit e7ad6f5d1c
3 changed files with 3 additions and 3 deletions
@@ -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
}); });
}; };
} }
+1 -1
View File
@@ -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])