Skip to content

Commit

Permalink
Clean up selectedValues type
Browse files Browse the repository at this point in the history
  • Loading branch information
jernestmyers committed Jun 29, 2023
1 parent 69d5cf9 commit cbdd30c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ interface MarkerConfiguration<T extends string> {
export interface BarPlotMarkerConfiguration
extends MarkerConfiguration<'barplot'>,
SharedMarkerConfigurations {
selectedValues: OverlayConfig['overlayValues'] | undefined;
selectedPlotMode: 'count' | 'proportion';
dependentAxisLogScale: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ export interface SharedMarkerConfigurations {
selectedVariable: VariableDescriptor;
binningMethod: 'equalInterval' | 'quantile' | 'standardDeviation' | undefined;
selectedCountsOption: 'filtered' | 'visible' | undefined;
selectedValues: string[] | undefined;
}
export interface PieMarkerConfiguration
extends MarkerConfiguration<'pie'>,
SharedMarkerConfigurations {
selectedValues: string[] | undefined;
}
SharedMarkerConfigurations {}

interface Props
extends Omit<
Expand Down
4 changes: 1 addition & 3 deletions packages/libs/eda/src/lib/map/analysis/appState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import * as t from 'io-ts';
import { isEqual } from 'lodash';
import { useCallback, useEffect } from 'react';
import {
AllValuesDefinition,
AnalysisState,
BinDefinitions,
useGetDefaultVariableDescriptor,
useStudyMetadata,
} from '../../core';
Expand All @@ -29,7 +27,7 @@ export const MarkerConfiguration = t.intersection([
t.union([
t.type({
type: t.literal('barplot'),
selectedValues: t.union([BinDefinitions, t.array(t.string), t.undefined]), // user-specified selection
selectedValues: t.union([t.array(t.string), t.undefined]), // user-specified selection
selectedPlotMode: t.union([t.literal('count'), t.literal('proportion')]),
binningMethod: t.union([
t.literal('equalInterval'),
Expand Down

1 comment on commit cbdd30c

@bobular
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Please sign in to comment.