Skip to content

Commit

Permalink
toggle confusion matrix text (#146)
Browse files Browse the repository at this point in the history
* toggle confusion matrix text

* rename toggle
  • Loading branch information
dberenbaum authored Nov 6, 2023
1 parent e04c5de commit 5280aa2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/dvc_render/vega_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ class ConfusionTemplate(Template):
"data": {"values": Template.anchor("data")},
"title": Template.anchor("title"),
"facet": {"field": "rev", "type": "nominal"},
"params": [
{
"name": "showValues",
"bind": {"input": "checkbox"},
},
],
"spec": {
"transform": [
{
Expand Down Expand Up @@ -294,6 +300,13 @@ class ConfusionTemplate(Template):
{
"mark": "text",
"encoding": {
"text": {
"condition": {
"param": "showValues",
"field": "xy_count",
"type": "quantitative",
},
},
"color": {
"condition": {
"test": "datum.percent_of_max > 0.5",
Expand Down

0 comments on commit 5280aa2

Please sign in to comment.