Spaces:
Running
Running
Tighten release-date legend spacing in HF Space.
Browse filesIncrease legend density and reduce gap between x-axis title and legend in release-date plots.
Made-with: Cursor
main.js
CHANGED
|
@@ -314,9 +314,9 @@ function renderPlots() {
|
|
| 314 |
Plotly.newPlot(metric.plotId, traces, {
|
| 315 |
title: { text: metric.title, x: 0.01, xanchor: 'left', font: { size: 16 } },
|
| 316 |
height: 460,
|
| 317 |
-
margin: { t: 46, r: 12, b:
|
| 318 |
xaxis: {
|
| 319 |
-
title: { text: 'Model Release Date', standoff:
|
| 320 |
type: 'date',
|
| 321 |
tickmode: 'linear',
|
| 322 |
tick0: xMinMonthStart ? xMinMonthStart.toISOString().slice(0, 10) : undefined,
|
|
@@ -329,11 +329,11 @@ function renderPlots() {
|
|
| 329 |
yaxis: { title: metric.yLabel, range: [metric.yMin, metric.yMax], tickformat: '.2f', automargin: true, showgrid: true },
|
| 330 |
legend: {
|
| 331 |
orientation: 'h',
|
| 332 |
-
y: -0.
|
| 333 |
x: 0.5,
|
| 334 |
xanchor: 'center',
|
| 335 |
entrywidthmode: 'pixels',
|
| 336 |
-
entrywidth:
|
| 337 |
itemsizing: 'constant'
|
| 338 |
},
|
| 339 |
hovermode: 'closest'
|
|
|
|
| 314 |
Plotly.newPlot(metric.plotId, traces, {
|
| 315 |
title: { text: metric.title, x: 0.01, xanchor: 'left', font: { size: 16 } },
|
| 316 |
height: 460,
|
| 317 |
+
margin: { t: 46, r: 12, b: 172, l: 56 },
|
| 318 |
xaxis: {
|
| 319 |
+
title: { text: 'Model Release Date', standoff: 26 },
|
| 320 |
type: 'date',
|
| 321 |
tickmode: 'linear',
|
| 322 |
tick0: xMinMonthStart ? xMinMonthStart.toISOString().slice(0, 10) : undefined,
|
|
|
|
| 329 |
yaxis: { title: metric.yLabel, range: [metric.yMin, metric.yMax], tickformat: '.2f', automargin: true, showgrid: true },
|
| 330 |
legend: {
|
| 331 |
orientation: 'h',
|
| 332 |
+
y: -0.45,
|
| 333 |
x: 0.5,
|
| 334 |
xanchor: 'center',
|
| 335 |
entrywidthmode: 'pixels',
|
| 336 |
+
entrywidth: 125,
|
| 337 |
itemsizing: 'constant'
|
| 338 |
},
|
| 339 |
hovermode: 'closest'
|