Skip to content

Commit

Permalink
Use display names in visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Jul 26, 2023
1 parent 3fafe28 commit d240866
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mira/modeling/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ def __init__(self, model: Model):
for variable in model.variables.values():
identifiers = variable.data.get('identifiers')
contexts = variable.data.get('context')
name = variable.data.get('name', str(variable.key))
if variable.concept.display_name:
name = variable.concept.display_name
else:
name = variable.data.get('name', str(variable.key))
if not identifiers and not contexts:
label = name
shape = "oval"
Expand Down

0 comments on commit d240866

Please sign in to comment.