mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-09 05:58:11 +08:00
create occupancy stacks for all category values, not just top N values (#764)
This commit is contained in:
@@ -6,13 +6,7 @@ import * as d3 from "d3";
|
|||||||
@connect()
|
@connect()
|
||||||
class Occupancy extends React.Component {
|
class Occupancy extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { occupancy, colorScale, colorAccessor, schema, world } = this.props;
|
||||||
occupancy,
|
|
||||||
colorScale,
|
|
||||||
categoricalSelection,
|
|
||||||
colorAccessor,
|
|
||||||
schema
|
|
||||||
} = this.props;
|
|
||||||
const width = 100;
|
const width = 100;
|
||||||
const height = 11;
|
const height = 11;
|
||||||
|
|
||||||
@@ -25,8 +19,9 @@ class Occupancy extends React.Component {
|
|||||||
.range([0, width]);
|
.range([0, width]);
|
||||||
|
|
||||||
let currentOffset = 0;
|
let currentOffset = 0;
|
||||||
|
const dfColumn = world.obsAnnotations.col(colorAccessor);
|
||||||
const stacks = categoricalSelection[colorAccessor].categoryValues.map(d => {
|
const categoryValues = dfColumn.summarize().categories;
|
||||||
|
const stacks = categoryValues.map(d => {
|
||||||
const o = occupancy.get(d);
|
const o = occupancy.get(d);
|
||||||
|
|
||||||
const scaledValue = x(o);
|
const scaledValue = x(o);
|
||||||
|
|||||||
Reference in New Issue
Block a user