v0.36.7
This commit is contained in:
1 parent
213332d0b5
commit
1ac94213e0
13 files changed
+68
-28
No files matched your search
@@ -408,7 +408,7 @@ function cacheOutcomeMix(totals) {
|
||||
return { counts, percentages: counts.map(value => value / requests * 100), requests };
|
||||
}
|
||||
// Percent labels live inside the bar segments; a label that does not fit is hidden
|
||||
// (the exact count and percentage stay in the segment and legend tooltips).
|
||||
// (the legend carries the request counts; tooltips give both).
|
||||
function fitCacheMixLabels() {
|
||||
const bar = $("cache-mix-bar");
|
||||
if (!bar) return;
|
||||
@@ -430,6 +430,7 @@ function renderCacheMix(mix, totalRequests) {
|
||||
segment.style.width = `${pct}%`;
|
||||
segment.textContent = mix && pct > 0 ? `${fmt(pct, pct < 10 ? 1 : 0)}%` : "";
|
||||
const detail = mix ? `${name.toUpperCase()}: ${fmt(mix.counts[i])} (${fmt(pct, 1)}%)` : "";
|
||||
$(`cache-mix-${name}-count`).textContent = mix ? fmt(mix.counts[i]) : "-";
|
||||
segment.title = detail; $(`cache-mix-${name}-key`).title = detail;
|
||||
});
|
||||
fitCacheMixLabels();
|
||||
|
||||
Reference in new issue
Block a user