Add interactivity to recently created graphs, this time using circles for interactivity

This commit is contained in:
Peter Stockings
2023-12-11 21:38:52 +11:00
parent e93c92a452
commit 197f7bcf6b
2 changed files with 28 additions and 11 deletions

View File

@@ -412,12 +412,15 @@ def get_weekly_pr_graph_model(title, weekly_pr_data):
values_scaled = [((value - min_value) / value_range) * vb_height for value in values]
plot_points = list(zip(values_scaled, relative_positions))
messages = [f'{value} for {person_name} at {date.strftime("%d %b %y")}' for value, date in zip(values, pr_counts.keys())]
plot_labels = zip(values_scaled, relative_positions, messages)
# Create a plot for each user
plot = {
'label': person_name, # Use PersonName instead of User ID
'color': colors[count],
'points': plot_points
'points': plot_points,
'plot_labels': plot_labels
}
plots.append(plot)