Added extra logging to the drawbar function

This commit is contained in:
Peter Edmond 2025-06-16 19:14:32 +01:00
parent 241d7b151a
commit 8b1e862c3c

View File

@ -289,6 +289,8 @@ function doBarData(id,qid, survey, Q1=0, Q2=0, Q3=0 ) {
formData.append('Q2', Q2); formData.append('Q2', Q2);
formData.append('Q3', Q3); formData.append('Q3', Q3);
console.log("Selectors:",Q1,Q2,Q3);
// Send the form data using fetch // Send the form data using fetch
fetch('get_qid_counts.php', { fetch('get_qid_counts.php', {
method: 'POST', method: 'POST',
@ -312,7 +314,7 @@ function doBarData(id,qid, survey, Q1=0, Q2=0, Q3=0 ) {
const total = Object.values(bardata).reduce((sum, value) => sum + value, 0); const total = Object.values(bardata).reduce((sum, value) => sum + value, 0);
//console.log(total); //console.log(total);
document.getElementById("record_no").textContent = total; document.getElementById("record_no").textContent = total;
if (total < 9){ if (total < 8){
return; return;
} }
drawBar(id,bardata); drawBar(id,bardata);