Skip to content

Commit

Permalink
Merge branch 'main' into gaugup/AddMoreUtilitiesRaiUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
gaugup authored Jun 6, 2022
2 parents 9a31a42 + 72963e5 commit 479096d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libs/dataset-explorer/src/lib/getDatasetBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ export function getDatasetBar(
chartProps?.xAxis.property &&
jointData.metaDict[chartProps.xAxis.property].sortedCategoricalValues
?.length;
const noneGroup = "none";

if (customData && xData) {
for (const [i, customDatum] of customData.entries()) {
const yValue = (customDatum as any).Y;
const yValue = (customDatum as any).Y ?? noneGroup;
if (!groupedData[yValue]) {
groupedData[yValue] = new Array(xDataTypeCount).fill(0);
}
Expand All @@ -36,9 +37,9 @@ export function getDatasetBar(
}

if (chartProps?.yAxis.property) {
jointData.metaDict[
chartProps.yAxis.property
].sortedCategoricalValues?.forEach((value) => {
const groups = jointData.metaDict[chartProps.yAxis.property]
.sortedCategoricalValues ?? [noneGroup];
groups.forEach((value) => {
result.push({
data: groupedData[value],
name: value
Expand Down

0 comments on commit 479096d

Please sign in to comment.