Skip to content

Commit 57df6e3

Browse files
Merge branch 'master' into fix/replace-asserts-with-runtime-validation
2 parents 586f49f + eb5bdaf commit 57df6e3

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

docs/source/_static/custom.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Fix version switcher dropdown overflow - GitHub issue #578 */
2+
.version-switcher__menu {
3+
max-height: 60vh;
4+
overflow-y: auto !important;
5+
overflow-x: hidden;
6+
}

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@
4646
],
4747
}
4848
html_static_path = ["_static"]
49+
html_css_files = ["custom.css"]
4950
html_logo = "_static/logo.svg"
5051
html_favicon = "_static/favicon.ico"

malariagen_data/anoph/sample_metadata.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,8 @@ def plot_samples_interactive_map(
979979
fill_value=0,
980980
)
981981

982+
taxa = df_pivot.columns.dropna().sort_values().unique()
983+
982984
# Append aggregations to pivot.
983985
df_location_aggs = df_samples.groupby(location_composite_key).agg(
984986
{
@@ -1023,7 +1025,6 @@ def plot_samples_interactive_map(
10231025
samples_map.layout.width = width
10241026

10251027
# Add markers.
1026-
count_factors = df_samples[count_by].dropna().sort_values().unique()
10271028
for _, row in df_pivot.reset_index().iterrows():
10281029
title = (
10291030
f"Location: {row.location} ({row.latitude:.3f}, {row.longitude:.3f})"
@@ -1036,13 +1037,13 @@ def plot_samples_interactive_map(
10361037
title += f"\nContributors: {row.contributor}"
10371038
title += "\nNo. specimens: "
10381039
all_n = 0
1039-
for factor in count_factors:
1040+
for taxon in taxa:
10401041
# Get the number of samples in this taxon
1041-
n = row[factor]
1042+
n = int(row[taxon])
10421043
# Count the number of samples in all taxa
10431044
all_n += n
10441045
if n > 0:
1045-
title += f"{n} {factor}; "
1046+
title += f"{n} {taxon}; "
10461047
# Only show a marker when there are enough samples
10471048
if all_n >= min_samples:
10481049
marker = ipyleaflet.Marker(

0 commit comments

Comments
 (0)