multimodalart HF Staff commited on
Commit
d795797
·
verified ·
1 Parent(s): ca0c669

Vision bar chart: room for long first labels

Browse files
Files changed (1) hide show
  1. index.html +2 -1
index.html CHANGED
@@ -1565,7 +1565,8 @@ function drawVBars(){
1565
  const t=r.name;
1566
  g+=`<g transform="translate(${x+w/2} ${bh-B+6}) rotate(-60)"><text class="blab" text-anchor="end"${r.ref?' font-weight="700"':''}>${esc(t)}</text></g>`});
1567
  const labH=Math.ceil(Math.max(...rows.map(r=>r.name.length*6.2))*Math.sin(Math.PI/3))+16;
1568
- host.innerHTML=`<div class="scrollwrap"><div class="scroll"><svg viewBox="-10 0 ${BW+10} ${bh-B+labH}" style="min-width:${BW>900?BW:0}px" role="img" aria-label="Vision ${vName()} by model">${g}</svg></div><span class="scroll-hint" aria-hidden="true">scroll →</span></div>`;
 
1569
  wireScrollHint('#vbars .scroll');
1570
  paintSwitch();
1571
  const n=$('#vbarnote');if(n)n.textContent=state.pub?'The public vision benchmarks alone. ▲▼ shows places moved compared with the Full score.':'The Full score: half public vision benchmarks, half private set for same skill.';
 
1565
  const t=r.name;
1566
  g+=`<g transform="translate(${x+w/2} ${bh-B+6}) rotate(-60)"><text class="blab" text-anchor="end"${r.ref?' font-weight="700"':''}>${esc(t)}</text></g>`});
1567
  const labH=Math.ceil(Math.max(...rows.map(r=>r.name.length*6.2))*Math.sin(Math.PI/3))+16;
1568
+ const padL=Math.max(10,Math.ceil(Math.max(...rows.map((r,i)=>r.name.length*7.4*0.5-(L+i*step+step/2))))+14);
1569
+ host.innerHTML=`<div class="scrollwrap"><div class="scroll"><svg viewBox="${-padL} 0 ${BW+padL} ${bh-B+labH}" style="min-width:${BW>900?BW+padL:0}px" role="img" aria-label="Vision ${vName()} by model">${g}</svg></div><span class="scroll-hint" aria-hidden="true">scroll →</span></div>`;
1570
  wireScrollHint('#vbars .scroll');
1571
  paintSwitch();
1572
  const n=$('#vbarnote');if(n)n.textContent=state.pub?'The public vision benchmarks alone. ▲▼ shows places moved compared with the Full score.':'The Full score: half public vision benchmarks, half private set for same skill.';