Skip to content

Commit bc4b7cd

Browse files
legend
1 parent 3ac4a87 commit bc4b7cd

2 files changed

Lines changed: 21 additions & 19 deletions

File tree

cybench/runs/viz/global_insights_template.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -934,12 +934,13 @@ <h3 style="font-size:1rem;margin:1rem 0 0.5rem;">Detail per country × model</h3
934934
let worldFeatures = null;
935935
let mapProjection = d3.geoNaturalEarth1();
936936
let mapPath = d3.geoPath(mapProjection);
937-
const MAP_EXPORT_PAD_B = 50;
938-
const MAP_EXPORT_LEGEND_FS = 8;
939-
const MAP_EXPORT_LEGEND_BAR_W = 200;
940-
const MAP_EXPORT_LEGEND_BAR_H = 8;
937+
const MAP_EXPORT_PAD_B = 68;
938+
const MAP_EXPORT_LEGEND_FS = 12;
939+
const MAP_EXPORT_LEGEND_BAR_W = 300;
940+
const MAP_EXPORT_LEGEND_BAR_H = 12;
941941
const MAP_EXPORT_FONT = "DejaVu Sans";
942-
const MAP_EXPORT_LABEL_GAP = 10;
942+
const MAP_EXPORT_LABEL_GAP = 12;
943+
const MAP_EXPORT_LEGEND_TICK = 4;
943944
let exportMeasureSvg = null;
944945

945946
function exportMeasureLayer() {
@@ -1267,10 +1268,10 @@ <h3 style="font-size:1rem;margin:1rem 0 0.5rem;">Detail per country × model</h3
12671268
<stop offset="100%" stop-color="#1a9850"/>
12681269
</linearGradient>
12691270
</defs>
1270-
<rect x="${barX}" y="${yBase}" width="${barW}" height="${barH}" fill="url(#export-metric-grad)" stroke="#c8d0d8" stroke-width="0.5"/>
1271-
<line x1="${barX}" y1="${yBase + barH}" x2="${barX}" y2="${yBase + barH + 3}" stroke="#656d76" stroke-width="0.5"/>
1272-
<line x1="${barX + barW / 2}" y1="${yBase + barH}" x2="${barX + barW / 2}" y2="${yBase + barH + 3}" stroke="#656d76" stroke-width="0.5"/>
1273-
<line x1="${barX + barW}" y1="${yBase + barH}" x2="${barX + barW}" y2="${yBase + barH + 3}" stroke="#656d76" stroke-width="0.5"/>
1271+
<rect x="${barX}" y="${yBase}" width="${barW}" height="${barH}" fill="url(#export-metric-grad)" stroke="#c8d0d8" stroke-width="0.75"/>
1272+
<line x1="${barX}" y1="${yBase + barH}" x2="${barX}" y2="${yBase + barH + MAP_EXPORT_LEGEND_TICK}" stroke="#656d76" stroke-width="0.75"/>
1273+
<line x1="${barX + barW / 2}" y1="${yBase + barH}" x2="${barX + barW / 2}" y2="${yBase + barH + MAP_EXPORT_LEGEND_TICK}" stroke="#656d76" stroke-width="0.75"/>
1274+
<line x1="${barX + barW}" y1="${yBase + barH}" x2="${barX + barW}" y2="${yBase + barH + MAP_EXPORT_LEGEND_TICK}" stroke="#656d76" stroke-width="0.75"/>
12741275
${exportLegendMarkup(barX, labelY, lo, "start")}
12751276
${exportLegendMarkup(barX + barW / 2, labelY, mid, "middle")}
12761277
${exportLegendMarkup(barX + barW, labelY, hi, "end")}`;

cybench/runs/viz/model_family_radar_template.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,12 +1192,13 @@ <h2>Country-level AI advantage (bootstrap)</h2>
11921192
const MAP_HEIGHT = 694;
11931193
const MAP_MARGIN = 8;
11941194
const MAP_EXPORT_SCALE = 4;
1195-
const MAP_EXPORT_PAD_B = 50;
1196-
const MAP_EXPORT_LEGEND_FS = 8;
1197-
const MAP_EXPORT_LEGEND_BAR_W = 200;
1198-
const MAP_EXPORT_LEGEND_BAR_H = 8;
1195+
const MAP_EXPORT_PAD_B = 68;
1196+
const MAP_EXPORT_LEGEND_FS = 12;
1197+
const MAP_EXPORT_LEGEND_BAR_W = 300;
1198+
const MAP_EXPORT_LEGEND_BAR_H = 12;
11991199
const MAP_EXPORT_FONT = "DejaVu Sans";
1200-
const MAP_EXPORT_LABEL_GAP = 10;
1200+
const MAP_EXPORT_LABEL_GAP = 12;
1201+
const MAP_EXPORT_LEGEND_TICK = 4;
12011202
let exportMeasureSvg = null;
12021203

12031204
function exportMeasureLayer() {
@@ -1491,7 +1492,7 @@ <h2>Country-level AI advantage (bootstrap)</h2>
14911492
const items = winnerLegend.querySelectorAll("span");
14921493
if (!items.length) return "";
14931494
const fs = MAP_EXPORT_LEGEND_FS;
1494-
const sw = 8;
1495+
const sw = MAP_EXPORT_LEGEND_FS;
14951496
let x = 24;
14961497
let out = "";
14971498
items.forEach(span => {
@@ -1526,10 +1527,10 @@ <h2>Country-level AI advantage (bootstrap)</h2>
15261527
<stop offset="100%" stop-color="#2166ac"/>
15271528
</linearGradient>
15281529
</defs>
1529-
<rect x="${barX}" y="${yBase}" width="${barW}" height="${barH}" fill="url(#export-benefit-grad)" stroke="#c8d0d8" stroke-width="0.5"/>
1530-
<line x1="${barX}" y1="${yBase + barH}" x2="${barX}" y2="${yBase + barH + 3}" stroke="#656d76" stroke-width="0.5"/>
1531-
<line x1="${barX + barW / 2}" y1="${yBase + barH}" x2="${barX + barW / 2}" y2="${yBase + barH + 3}" stroke="#656d76" stroke-width="0.5"/>
1532-
<line x1="${barX + barW}" y1="${yBase + barH}" x2="${barX + barW}" y2="${yBase + barH + 3}" stroke="#656d76" stroke-width="0.5"/>
1530+
<rect x="${barX}" y="${yBase}" width="${barW}" height="${barH}" fill="url(#export-benefit-grad)" stroke="#c8d0d8" stroke-width="0.75"/>
1531+
<line x1="${barX}" y1="${yBase + barH}" x2="${barX}" y2="${yBase + barH + MAP_EXPORT_LEGEND_TICK}" stroke="#656d76" stroke-width="0.75"/>
1532+
<line x1="${barX + barW / 2}" y1="${yBase + barH}" x2="${barX + barW / 2}" y2="${yBase + barH + MAP_EXPORT_LEGEND_TICK}" stroke="#656d76" stroke-width="0.75"/>
1533+
<line x1="${barX + barW}" y1="${yBase + barH}" x2="${barX + barW}" y2="${yBase + barH + MAP_EXPORT_LEGEND_TICK}" stroke="#656d76" stroke-width="0.75"/>
15331534
${exportLegendMarkup(barX, labelY, left, "start")}
15341535
${exportLegendMarkup(barX + barW / 2, labelY, mid, "middle")}
15351536
${exportLegendMarkup(barX + barW, labelY, right, "end")}`;

0 commit comments

Comments
 (0)