Dashlet Scatterplot add option to revers Tooltip

2 votes

for the Dashlet Scatterplot add an Option to reverse the tooltip (Mouseover)

The only change is the addition of the argument reverse=True or false to the sorted() function

@classmethod
def _create_tooltip(
cls,
timestamp: int,
host_to_value_dict: Mapping[str, str],
additional_rows: Sequence[tuple[str, str]] | None = None,
) -> HTML:
# Werte absteigend sortieren (höchster Wert zuerst)
table_rows = sorted(host_to_value_dict.items(), key=lambda item: item[1], reverse=True)
table_rows.extend(additional_rows or [])
rows = []
for a, b in table_rows:
rows.append(HTMLWriter.render_tr(HTMLWriter.render_td(a) + HTMLWriter.render_td(b)))
return HTMLWriter.render_div(date_and_time(timestamp)) + HTMLWriter.render_table(
HTML.empty().join(rows)
)

Under consideration Dashboards & Visualizations Suggested by: Bernd Holzhauer Upvoted: 18 Feb Comments: 2

Comments: 2
OldestNewestMost likesFewest likes