Skip to content
Snippets Groups Projects
Commit cc60ff14 authored by Steve Reis's avatar Steve Reis
Browse files

fix(exareme2): Anova one way missing categories

parent 6c3743b1
No related branches found
No related tags found
No related merge requests found
Pipeline #831769398 passed
......@@ -130,21 +130,20 @@ export default class AnovaOneWayHandler extends BaseHandler {
if (variable) result.anova_table.y_label = variable.label ?? variable.id;
if (coVariate) result.anova_table.x_label = coVariate.label ?? coVariate.id;
result.categories = {};
if (coVariate && coVariate.enumerations) {
result.categories = coVariate.enumerations.reduce((p, e) => {
p[e.value] = e.label ?? e.value;
return p;
}, {});
} else {
result.categories = result['min_max_per_group']['categories'].reduce(
(p: { [x: string]: string }, e: string) => {
p[e] = e;
return p;
},
{},
);
coVariate.enumerations.forEach((cat) => {
result.categories[cat.value] = cat.label ?? cat.value;
});
}
result['min_max_per_group']['categories'].map((cat: string) => {
if (!result.categories[cat]) {
result.categories[cat] = cat;
}
});
const summaryTable = this.getSummaryTable(
result,
result.anova_table.x_label,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment