mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-27 19:18:12 +08:00
@@ -5,7 +5,6 @@ import Async from "react-async";
|
||||
import memoize from "memoize-one";
|
||||
import * as globals from "../../globals";
|
||||
import actions from "../../actions";
|
||||
import { histogramContinuous } from "../../util/dataframe/histogram";
|
||||
import { makeContinuousDimensionName } from "../../util/nameCreators";
|
||||
import HistogramHeader from "./header";
|
||||
import Histogram from "./histogram";
|
||||
@@ -285,10 +284,11 @@ class HistogramBrush extends React.PureComponent {
|
||||
.domain([domainMin, domainMax])
|
||||
.range([leftMargin, leftMargin + newWidth]);
|
||||
|
||||
histogramCache.bins = histogramContinuous(col, numBins, [
|
||||
histogramCache.bins = col.histogram(numBins, [
|
||||
domainMin,
|
||||
domainMax,
|
||||
]); /* memoized */
|
||||
|
||||
histogramCache.binWidth = (domainMax - domainMin) / numBins;
|
||||
|
||||
histogramCache.binStart = (i) => domainMin + i * histogramCache.binWidth;
|
||||
@@ -306,7 +306,13 @@ class HistogramBrush extends React.PureComponent {
|
||||
}
|
||||
|
||||
createQuery() {
|
||||
const { isObs, isGeneSetSummary, field, setGenes, annoMatrix } = this.props;
|
||||
const {
|
||||
isObs,
|
||||
isGeneSetSummary,
|
||||
field,
|
||||
setGenes,
|
||||
annoMatrix,
|
||||
} = this.props;
|
||||
const { schema } = annoMatrix;
|
||||
if (isObs) {
|
||||
return ["obs", field];
|
||||
@@ -322,7 +328,7 @@ class HistogramBrush extends React.PureComponent {
|
||||
method: "mean",
|
||||
field: "var",
|
||||
column: varIndex,
|
||||
values: setGenes,
|
||||
values: [...setGenes.keys()],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user