Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
58221a2
1
Parent(s): 5bb39a7
fix cut off y axis labels
Browse files
app/src/content/embeds/d3-benchmark-comparison.html
CHANGED
|
@@ -461,13 +461,14 @@
|
|
| 461 |
const maxLabelChars = d3.max(finalData, d => d.name.length) || 0;
|
| 462 |
const desiredLeft = Math.max(
|
| 463 |
isMobile ? 92 : 150,
|
| 464 |
-
Math.round(maxLabelChars * (isMobile ?
|
| 465 |
);
|
|
|
|
| 466 |
const margin = {
|
| 467 |
top: hasBaselines ? 20 : 12,
|
| 468 |
right: isMobile ? 40 : 56,
|
| 469 |
bottom: isMobile ? 30 : 32,
|
| 470 |
-
left: Math.min(desiredLeft,
|
| 471 |
};
|
| 472 |
|
| 473 |
const barHeight = 28, barGap = 8;
|
|
|
|
| 461 |
const maxLabelChars = d3.max(finalData, d => d.name.length) || 0;
|
| 462 |
const desiredLeft = Math.max(
|
| 463 |
isMobile ? 92 : 150,
|
| 464 |
+
Math.round(maxLabelChars * (isMobile ? 6.5 : 8))
|
| 465 |
);
|
| 466 |
+
const maxLeft = Math.round(width * 0.35);
|
| 467 |
const margin = {
|
| 468 |
top: hasBaselines ? 20 : 12,
|
| 469 |
right: isMobile ? 40 : 56,
|
| 470 |
bottom: isMobile ? 30 : 32,
|
| 471 |
+
left: Math.min(desiredLeft, maxLeft),
|
| 472 |
};
|
| 473 |
|
| 474 |
const barHeight = 28, barGap = 8;
|