ouhenio commited on
Commit
15ffb5b
·
verified ·
1 Parent(s): 542cf2d

Update template.txt

Browse files
Files changed (1) hide show
  1. template.txt +4 -3
template.txt CHANGED
@@ -194,12 +194,13 @@
194
  name: countryData[code].name,
195
  percent: countryData[code].percent,
196
  documents: countryData[code].documents || 0,
197
- total_answers: countryData[code].total_answers || 0
 
198
  };
199
  });
200
 
201
  // Sort by document count descending
202
- countriesWithDocs.sort((a, b) => b.total_answers - a.total_answers);
203
 
204
  // Take the top 5
205
  const topCountries = countriesWithDocs.slice(0, 5);
@@ -233,7 +234,7 @@
233
  <div class="country-bar">
234
  <div class="country-bar-fill" style="width: ${country.percent}%;"></div>
235
  </div>
236
- <span class="country-value">${country.total_answers.toLocaleString()}</span>
237
  `;
238
 
239
  fragment.appendChild(countryDiv);
 
194
  name: countryData[code].name,
195
  percent: countryData[code].percent,
196
  documents: countryData[code].documents || 0,
197
+ total_answers: countryData[code].total_answers || 0,
198
+ answered_questions: countryData[code].answered_questions || 0
199
  };
200
  });
201
 
202
  // Sort by document count descending
203
+ countriesWithDocs.sort((a, b) => b.answered_questions - a.answered_questions);
204
 
205
  // Take the top 5
206
  const topCountries = countriesWithDocs.slice(0, 5);
 
234
  <div class="country-bar">
235
  <div class="country-bar-fill" style="width: ${country.percent}%;"></div>
236
  </div>
237
+ <span class="country-value">${country.answered_questions.toLocaleString()}</span>
238
  `;
239
 
240
  fragment.appendChild(countryDiv);