Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
johncthomas committed Sep 12, 2023
1 parent 6c3bd35 commit daa4db4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plotly_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ def get_info_dicts(nodes_df: pd.DataFrame) -> dict[str, dict[str, Any]]:

def textify_additional_data(
data: dict[str, dict[str, Any]],
max_length:int=25,
) -> dict[str, str]:
"""Take data in form of {nodeID:{dataKey:dataValue}} and return text string for annotation."""

out = {}

for nodeid, values in data.items():
#todo truncate long strings
s = '\n'.join([f"{k}:{v}" for k, v in values.items()])
out[nodeid] = s

Expand Down

0 comments on commit daa4db4

Please sign in to comment.