mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-09 04:48:12 +08:00
access varDataCache with kvCache.get
This commit is contained in:
@@ -49,20 +49,21 @@ class HistogramBrush extends React.Component {
|
|||||||
|
|
||||||
histogramCache.numValues = allValuesForContinuousFieldAsArray.length;
|
histogramCache.numValues = allValuesForContinuousFieldAsArray.length;
|
||||||
|
|
||||||
} else if (world.varDataCache[field]) {
|
} else if (kvCache.get(world.varDataCache, field)) {
|
||||||
/* it's not in observations, so it's a gene, but let's check to make sure */
|
/* it's not in observations, so it's a gene, but let's check to make sure */
|
||||||
|
const varValues = kvCache.get(world.varDataCache, field)
|
||||||
|
|
||||||
histogramCache.x = d3
|
histogramCache.x = d3
|
||||||
.scaleLinear()
|
.scaleLinear()
|
||||||
.domain(d3.extent(world.varDataCache[field])) /* replace this if we have ranges for genes back from server like we do for annotations on cells */
|
.domain(d3.extent(varValues)) /* replace this if we have ranges for genes back from server like we do for annotations on cells */
|
||||||
.range([0, this.width]);
|
.range([0, this.width]);
|
||||||
|
|
||||||
histogramCache.bins = d3
|
histogramCache.bins = d3
|
||||||
.histogram()
|
.histogram()
|
||||||
.domain(histogramCache.x.domain())
|
.domain(histogramCache.x.domain())
|
||||||
.thresholds(40)(world.varDataCache[field]);
|
.thresholds(40)(varValues);
|
||||||
|
|
||||||
histogramCache.numValues = world.varDataCache[field].length;
|
histogramCache.numValues = varValues.length;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,7 +175,7 @@ class HistogramBrush extends React.Component {
|
|||||||
colorAccessor: field,
|
colorAccessor: field,
|
||||||
rangeMaxForColorAccessor: initializeRanges[field].range.max
|
rangeMaxForColorAccessor: initializeRanges[field].range.max
|
||||||
});
|
});
|
||||||
} else if (world.varDataCache[field]) {
|
} else if (kvCache.get(world.varDataCache, field)) {
|
||||||
dispatch(
|
dispatch(
|
||||||
actions.requestSingleGeneExpressionCountsForColoringPOST(
|
actions.requestSingleGeneExpressionCountsForColoringPOST(
|
||||||
field
|
field
|
||||||
|
|||||||
Reference in New Issue
Block a user