Skip to content

Commit 90613b6

Browse files
committed
Fix rendering of emojis in bar chart labels
1 parent ea626ac commit 90613b6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

desktop-app/src/components/MetricBarChart.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
bars: {
2222
radius: 4
2323
},
24+
xAxis: {
25+
tickLabelProps: {
26+
class: 'emoji-tick-label'
27+
}
28+
},
2429
yAxis: {
2530
ticks: 5
2631
},

desktop-app/src/styles/metrics-bar-chart.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@
44
position: relative;
55
/* Allow tooltip to overflow if necessary, but chart usually clips */
66
}
7+
8+
/* Force Apple Color Emoji to ensure emojis are rendered as graphics, not text */
9+
.emoji-tick-label {
10+
font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
11+
}

0 commit comments

Comments
 (0)