Following up, I was able to modify the Vega-lite code to get what I wanted, thank you.
Code in case it’s helpful for anyone:
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "A plot for an arbitrary number of lines",
"data": {
"name": "wandb"
},
"transform": [
{"filter": {"field": "${field:lineVal}", "valid": true}},
{"filter": {"field": "${field:step}", "valid": true}}
],
"title": "${string:title}",
"layer": [
{
"mark": {"type": "line", "interpolate": "linear"},
"encoding": {
"x":{
"field": "${field:step}",
"type": "quantitative",
"title": "${string:name}"
},
"y": {
"field": "${field:lineVal}",
"title": "y",
"type": "quantitative"
},
"color": {
"type": "nominal",
"field": "name",
"scale" : {
"range" : {"field": "color"}
}
},
"strokeDash": {
"type": "nominal",
"field": "${field:lineKey}"
}
}
},
{
"transform": [{"pivot": "lineKey", "value":"lineVal", "groupby": ["step", "name"]}],
"mark": {"type":"rule", "tooltip":true},
"params": [{
"name": "hover",
"select": {"type": "point", "fields": ["step", "name"], "on": "mouseover", "nearest":true, "clear": "mouseout"}
}],
"encoding": {
"x": {
"field": "step",
"type": "quantitative"
},
"tooltip":[
{"field": "name", "type":"nominal", "title":"Model"},
{"field": "Precision", "type":"quantitative"},
{"field": "Recall", "type":"quantitative"},
{"field": "F1", "type": "quantitative"},
{"field": "step", "type": "quantitative", "title": "Threshold"}
],
"color": {
"condition": {
"param": "hover",
"empty": false,
"value": "black"
},
"value": "transparent"
}
}
},{
"mark":{"type":"circle", "size": 60},
"encoding": {
"x":{
"field": "${field:step}",
"type": "quantitative",
"title": "${string:name}"
},
"y": {
"field": "${field:lineVal}",
"title": "y",
"type": "quantitative"
},
"color": {
"condition": {
"param": "hover",
"empty": false,
"field": "name"
},
"value": "transparent"
}
}
}
]
}