Skip to content

Commit b1dd594

Browse files
committed
embeddings(ui): larger font sizes
1 parent 881bbbe commit b1dd594

3 files changed

Lines changed: 85 additions & 9 deletions

File tree

embedding-connector/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.idea/
33
.vscode/
44
__pycache__/
5+
*.pyc

src/main/resources/static/js/embeddingDashboard.js

Lines changed: 83 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,38 @@ let timelineChartInterval = 5;
1010
let embeddingTestDistanceChart;
1111
let testResults;
1212

13+
const fontSize = 14;
14+
1315
const chartCommonOptions = {
16+
responsive: true,
1417
scales: {
1518
x: {
1619
title: {
1720
display: true,
18-
text: "Progress"
21+
text: "Progress",
22+
font: {
23+
size: fontSize,
24+
}
1925
},
2026
type: "linear",
27+
ticks: {
28+
font: {
29+
size: fontSize,
30+
}
31+
}
2132
},
2233
y: {
2334
title: {
2435
display: true,
25-
text: "Variance"
36+
text: "Variance",
37+
font: {
38+
size: fontSize,
39+
}
40+
},
41+
ticks: {
42+
font: {
43+
size: fontSize,
44+
}
2645
}
2746
}
2847
},
@@ -39,7 +58,24 @@ const chartCommonOptions = {
3958
enabled: true
4059
},
4160
}
61+
},
62+
legend: {
63+
position: 'top',
64+
labels: {
65+
font: {
66+
size: fontSize,
67+
}
68+
}
69+
},
70+
tooltip: {
71+
titleFont: {
72+
size: 14,
73+
},
74+
bodyFont: {
75+
size: 12,
76+
}
4277
}
78+
4379
}
4480
};
4581

@@ -113,7 +149,7 @@ function updateAllLatestChart() {
113149
labels: labels,
114150
datasets: [
115151
{
116-
label: translations.latestChart,
152+
label: "Latest Projects",
117153
data: chartData,
118154
},
119155
{
@@ -166,12 +202,25 @@ function updateTimelineChart() {
166202
const element = document.getElementById("chart-timeline");
167203

168204
const labels = [];
169-
const datasets = [];
205+
const datasets = [
206+
{
207+
label: "Starting Project",
208+
data: [{x: 0, y: 0, r: 7}],
209+
type: "bubble",
210+
},
211+
{
212+
label: "Example Solution",
213+
data: [{x: 1, y: 0, r: 7}],
214+
type: "bubble",
215+
},
216+
];
170217
for (const dataSeries of data.data) {
171218
datasets.push({
172219
label: participantsMap.get(dataSeries.userId).name,
173220
data: dataSeries.datapoints.map(xyToBubble),
174221
tension: 0.1,
222+
borderWidth: 3,
223+
pointBorderWidth: 5,
175224
});
176225
for (let idx = 1; idx <= dataSeries.datapoints.length; ++idx) {
177226
labels.push(idx.toString());
@@ -248,16 +297,42 @@ function updateTestDistanceChart() {
248297
x: {
249298
title: {
250299
display: true,
251-
text: "Test Fitness"
300+
text: "Test Fitness",
301+
font: {
302+
size: fontSize,
303+
},
252304
},
253305
type: "linear",
306+
ticks: {
307+
font: {
308+
size: fontSize,
309+
},
310+
},
254311
},
255312
y: {
256313
title: {
257314
display: true,
258-
text: "Embedding Fitness"
259-
}
260-
}
315+
text: "Embedding Fitness",
316+
font: {
317+
size: fontSize,
318+
},
319+
},
320+
ticks: {
321+
font: {
322+
size: fontSize,
323+
},
324+
},
325+
},
326+
},
327+
plugins: {
328+
legend: {
329+
position: 'top',
330+
labels: {
331+
font: {
332+
size: fontSize,
333+
},
334+
},
335+
},
261336
},
262337
},
263338
});

src/main/resources/templates/embedding-dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ <h4 th:text="#{embedding_dashboard_chart_embedding_test_distance}"></h4>
5959
<h4 th:text="#{embedding_dashboard_chart_timeline}"></h4>
6060
<p th:text="#{embedding_dashboard_chart_timeline_explanation}"></p>
6161
<div>
62-
<select id="participant-selector" class="form-select" multiple size="6">
62+
<select id="participant-selector" class="form-select mb-2" multiple size="6">
6363
<option
6464
th:each="participant: ${participants}"
6565
th:text="${participant.username()}"

0 commit comments

Comments
 (0)