thibaud frere commited on
Commit ·
73c8635
1
Parent(s): 03cd478
update
Browse filesFiles changed (3)
12323version https://git-lfs.github.com/spec/v1oid sha256:85f900011d0ea9cd2e0326e2d5bf40b74e90e696901b8fd9283dd802aa0bdbe1size 37017oid sha256:db5080bacf123328439db1c2e611e0a073cc4c1d2ff250ff4f7e7dc2ec6c04e2size 37016341 unmodified lines34234334434534634734834935035135235335435535635735835936034534634734834934 unmodified lines384385386401387388389390341 unmodified lines .attr('d', d=>gen(d.values)); paths.exit().remove();
// Points for rank metrics (discrete steps) if (isRank) { const pointData = series.flatMap(s => s.values.map(v => ({ run: s.run, color: s.color, step: v.step, value: v.value }))); const circles = gPoints.selectAll('circle.point').data(pointData, d => d.run + '-' + d.step); circles.enter().append('circle').attr('class', 'point') .attr('r', 2.5) .attr('fill', d => d.color) .attr('cx', d => xScale(d.step)) .attr('cy', d => yScale(d.value)) .merge(circles) .attr('cx', d => xScale(d.step)) .attr('cy', d => yScale(d.value)); circles.exit().remove(); } else { gPoints.selectAll('*').remove(); } // No point markers for rank metrics (and none for others) gPoints.selectAll('*').remove();
// Inline legend content (row, right side) compact legendInline.innerHTML = series.map(s => `<span style="display:inline-flex;align-items:center;gap:6px;white-space:nowrap;"><span style="width:18px;height:10px;background:${s.color};border-radius:3px;display:inline-block"></span><span>${s.run}</span></span>`).join('');34 unmodified lines const rows = d3.csvParse(text, d => ({ run: (d.run||'').trim(), step: +d.step, metric: (d.metric||'').trim(), value: +d.value })); metricList = Array.from(new Set(rows.map(r=>r.metric))).sort(); runList = Array.from(new Set(rows.map(r=>r.run))).sort(); runOrder = ['FineVision', ...runList.filter(r=>r!=='FineVision')]; runOrder = runList; // Build dataByMetric metricList.forEach(m => { const map = {};126 unmodified lines127128129130130131132133126 unmodified lines const cellWidth = (pieAreaWidth - gapX * (cols - 1)) / cols; const cellHeight = innerHeight - 6; // room for captions const radius = Math.max(30, Math.min(cellWidth, cellHeight) * 0.42); const innerR = Math.round(radius * 0.58); // donut, trou modéré const innerR = Math.round(radius * 0.28); // donut, trou modéré
const pie = d3.pie().sort(null).value(d => d.value).padAngle(0.02); const arc = d3.arc().innerRadius(innerR).outerRadius(radius).cornerRadius(3);app/src/content/assets/data/against_baselines.csv+2-2
app/src/content/embeds/d3-line.html+3-17
app/src/content/embeds/d3-pie.html+1-1