nthakur commited on
Commit
3178695
·
1 Parent(s): 8fd13b9

Tighten release-date legend spacing in HF Space.

Browse files

Increase legend density and reduce gap between x-axis title and legend in release-date plots.

Made-with: Cursor

Files changed (1) hide show
  1. main.js +4 -4
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: 195, l: 56 },
318
  xaxis: {
319
- title: { text: 'Model Release Date', standoff: 34 },
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.52,
333
  x: 0.5,
334
  xanchor: 'center',
335
  entrywidthmode: 'pixels',
336
- entrywidth: 155,
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'