Skip to content

Commit 9cd8c40

Browse files
committed
fixes #68
1 parent 3d4f744 commit 9cd8c40

File tree

1 file changed

+7
-1
lines changed
  • pages/coronavirus-contribution-by-state

1 file changed

+7
-1
lines changed

pages/coronavirus-contribution-by-state/04.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1345,8 +1345,14 @@ var tip_html = function(chart) {
13451345

13461346
let pctCases = ((cases / cData.caseSum) * 100).toLocaleString("en-US", {maximumFractionDigits: 2}) + "%";
13471347

1348+
let wholeRegionText = "United States";
1349+
if (chart.show != "us-states") {
1350+
wholeRegionText = "selected data";
1351+
}
1352+
1353+
13481354
s += `<div class="tip-details">`;
1349-
s += `<b>${pctCases}%</b> of all ${dataLabel} in the United States on ${cData.date}`;
1355+
s += `<b>${pctCases}%</b> of all ${dataLabel} in the ${wholeRegionText} on ${cData.date}`;
13501356
s += `</div>`;
13511357

13521358
gtag("event", "mouseover", {event_category: chart.self, event_label: d.country, value: d.dayCounter});

0 commit comments

Comments
 (0)