Skip to content

Commit

Permalink
Merge pull request #252 from Renumics/fix/umap-rendering-error
Browse files Browse the repository at this point in the history
fix: fix legend rendering error for `null` category
  • Loading branch information
neindochoh authored Sep 26, 2023
2 parents 8aabd41 + 0311535 commit 4921392
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/shared/Plot/Legend/CategoricalLegend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export const CategoricalTransferFunctionLegend: React.FunctionComponent<
const map = transferFunction.domain.map((v) => {
const label = isCategorical(transferFunction.dType)
? transferFunction.dType.invertedCategories[v] ?? 'None'
: v === null
? 'null'
: v.toString();
return { label, color: transferFunction(v) };
});
Expand Down

0 comments on commit 4921392

Please sign in to comment.