Skip to content

Commit 2e52ab3

Browse files
fixed the issue regarding legend outline visibility (#423)
Co-authored-by: Abubakar Abid <islamrealm@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
1 parent ead4dc8 commit 2e52ab3

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.changeset/legend-ui-issue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trackio": patch
3+
---
4+
5+
feat: Fix legend outline visibility issue

trackio/ui/main.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,10 +602,22 @@ def configure(request: gr.Request):
602602
position: relative;
603603
z-index: 10;
604604
}
605+
606+
.vega-embed .role-legend-symbol path {
607+
stroke-width: 0 !important;
608+
}
605609
"""
606610

607611
HEAD = """
608612
<script>
613+
new MutationObserver(function() {
614+
document.querySelectorAll('.vega-embed .role-legend-symbol path').forEach(function(p) {
615+
var s = p.style.stroke || p.getAttribute('stroke');
616+
if (s && s !== 'none' && p.style.fill !== s) {
617+
p.style.fill = s;
618+
}
619+
});
620+
}).observe(document.body, { childList: true, subtree: true });
609621
function setCookie(name, value, days) {
610622
var expires = "";
611623
if (days) {
@@ -1318,4 +1330,5 @@ def render_grouped_runs(project, group_key, filter_text, selection):
13181330
show_error=True,
13191331
ssr_mode=False,
13201332
head=HEAD,
1333+
css=CSS,
13211334
)

0 commit comments

Comments
 (0)