Skip to content

Commit 8dd2d17

Browse files
committed
Toggle visibility of plots via clickable legend.
1 parent f45926b commit 8dd2d17

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

site/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,19 @@ for proj, data in project_prs.items():
122122
tags: [remove-input]
123123
---
124124
p = figure(
125-
width=600,
125+
width=650,
126126
height=400,
127127
title="Merged PRs per month",
128128
x_axis_type="datetime",
129129
)
130130
131131
legend_items = []
132132
for (label, y), color in zip(merged_prs_per_month.items(), itertools.cycle(palette)):
133-
l = p.line(x, y, color=color)
133+
l = p.line(x, y, line_width=2, color=color, muted_alpha=0.2)
134134
legend_items.append((label, [l]))
135135
136136
legend = Legend(items=legend_items, orientation="horizontal")
137+
legend.click_policy = "mute"
137138
p.add_layout(legend, "below")
138139
show(p)
139140
```

0 commit comments

Comments
 (0)