Skip to content

Commit 32ac21d

Browse files
committed
refactor: improve chart typography across histograms and bar charts
Standardize font sizes to 14px and apply monospace font family (ui-monospace, SFMono-Regular, Menlo, Monaco, Courier New, monospace) to all chart axes, ticks, and tooltips for better readability and consistency across all chart types.
1 parent 1db5179 commit 32ac21d

1 file changed

Lines changed: 32 additions & 6 deletions

File tree

script.js

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ function createRoundHistogram(stats, canvasId) {
202202
boxWidth: 10,
203203
color: themeColors.axis,
204204
font: {
205-
size: 11
205+
size: 14,
206+
family: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Courier New, monospace'
206207
}
207208
}
208209
},
@@ -219,7 +220,11 @@ function createRoundHistogram(stats, canvasId) {
219220
text: 'Round'
220221
},
221222
ticks: {
222-
color: themeColors.axis
223+
color: themeColors.axis,
224+
font: {
225+
size: 14,
226+
family: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Courier New, monospace'
227+
}
223228
},
224229
grid: {
225230
color: themeColors.grid,
@@ -239,7 +244,11 @@ function createRoundHistogram(stats, canvasId) {
239244
ticks: {
240245
color: themeColors.axis,
241246
precision: 0,
242-
stepSize: 1
247+
stepSize: 1,
248+
font: {
249+
size: 14,
250+
family: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Courier New, monospace'
251+
}
243252
},
244253
grid: {
245254
color: themeColors.grid,
@@ -320,6 +329,14 @@ function createPerformanceBarChart(entries) {
320329
display: false
321330
},
322331
tooltip: {
332+
titleFont: {
333+
size: 14,
334+
family: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Courier New, monospace'
335+
},
336+
bodyFont: {
337+
size: 14,
338+
family: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Courier New, monospace'
339+
},
323340
callbacks: {
324341
label: function(context) {
325342
const index = context.dataIndex;
@@ -335,7 +352,11 @@ function createPerformanceBarChart(entries) {
335352
text: 'Model'
336353
},
337354
ticks: {
338-
color: themePalette.axis
355+
color: themePalette.axis,
356+
font: {
357+
size: 14,
358+
family: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Courier New, monospace'
359+
}
339360
},
340361
grid: {
341362
color: themePalette.grid,
@@ -353,7 +374,11 @@ function createPerformanceBarChart(entries) {
353374
text: 'Average Final Round'
354375
},
355376
ticks: {
356-
color: themePalette.axis
377+
color: themePalette.axis,
378+
font: {
379+
size: 14,
380+
family: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Courier New, monospace'
381+
}
357382
},
358383
grid: {
359384
color: themePalette.grid,
@@ -453,7 +478,8 @@ function createProviderPieChart(data, canvasId) {
453478
boxWidth: 10,
454479
color: themeColors.axis,
455480
font: {
456-
size: 11
481+
size: 14,
482+
family: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Courier New, monospace'
457483
}
458484
}
459485
},

0 commit comments

Comments
 (0)