Added total number of records to page

This commit is contained in:
2025-05-31 03:38:30 +01:00
parent 5b4f7b5119
commit 943ae44e2b
3 changed files with 10 additions and 4 deletions

View File

@@ -309,6 +309,12 @@ function doBarData(id,qid, survey, Q1=0, Q2=0, Q3=0 ) {
});
console.log(bardata);
const total = Object.values(bardata).reduce((sum, value) => sum + value, 0);
console.log(total);
document.getElementById("record_no").textContent = total;
if (total < 9){
return;
}
drawBar(id,bardata);
// return data; // Should be an array like [{ value: -3, count: 2 }, ..., { value: 3, count: 5 }]