Skip to content

Commit

Permalink
Data Sources reports bug fixes (#2972)
Browse files Browse the repository at this point in the history
* Fix frequency chart bug
* Default loading spinner to false. It is set to true if there is something to load.
* This solves the loading spinner issue specifically for the data source reports.
  • Loading branch information
amarsan authored Nov 5, 2024
1 parent 934ce42 commit a876656
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions js/components/reports/classes/Treemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ define([
data
}) {
const normalizedData = atlascharts.chart.normalizeDataframe(ChartUtils.normalizeArray(data, true));
let tableData = [];

if (!normalizedData.empty) {
let distinctConceptIds = new Set([]);
let tableData = [];
// Make the values unique per https://github.com/OHDSI/Atlas/issues/913
normalizedData.conceptPath.forEach((d, i) => {
if (!distinctConceptIds.has(normalizedData.conceptId[i])) {
Expand All @@ -165,14 +165,13 @@ define([
});
}
});
this.tableData(tableData);
this.treeData(normalizedData);

return {
data
};
}
this.tableData(tableData);

return {
data
};
}

getData() {
Expand Down
2 changes: 1 addition & 1 deletion js/components/reports/reportDrilldown.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ define([
this.chartFormats.frequencyDistribution.yMax = yScaleMax;
this.chartFormats.frequencyDistribution.xLabel = ko.pureComputed(function () {
return ko.i18n('dataSources.drilldown.chartFormat.frequencyDistribution.xLabel1', 'Count ("x" or more ')() +
report() +
report +
ko.i18n('dataSources.drilldown.chartFormat.frequencyDistribution.xLabel2', 's)')();
});
this.chartFormats.frequencyDistribution.ticks = Math.min(5, frequencyHistogram.INTERVALS);
Expand Down

0 comments on commit a876656

Please sign in to comment.