From 7adac5d0042620e05efc931f9d1275abd89c4610 Mon Sep 17 00:00:00 2001 From: Bruce Martin Date: Mon, 13 May 2019 11:22:46 -0700 Subject: [PATCH] create occupancy stacks for all category values, not just top N values (#764) --- client/src/components/categorical/occupancy.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/client/src/components/categorical/occupancy.js b/client/src/components/categorical/occupancy.js index 7c6bf0e0..6ea86917 100644 --- a/client/src/components/categorical/occupancy.js +++ b/client/src/components/categorical/occupancy.js @@ -6,13 +6,7 @@ import * as d3 from "d3"; @connect() class Occupancy extends React.Component { render() { - const { - occupancy, - colorScale, - categoricalSelection, - colorAccessor, - schema - } = this.props; + const { occupancy, colorScale, colorAccessor, schema, world } = this.props; const width = 100; const height = 11; @@ -25,8 +19,9 @@ class Occupancy extends React.Component { .range([0, width]); let currentOffset = 0; - - const stacks = categoricalSelection[colorAccessor].categoryValues.map(d => { + const dfColumn = world.obsAnnotations.col(colorAccessor); + const categoryValues = dfColumn.summarize().categories; + const stacks = categoryValues.map(d => { const o = occupancy.get(d); const scaledValue = x(o);