Skip to content

Commit

Permalink
Merge pull request #358 from freezingsaddles/c3-dark-mode
Browse files Browse the repository at this point in the history
C3 graphs, bootstrap style
  • Loading branch information
merlinorg authored Dec 31, 2024
2 parents 18b4fbf + ef3f5aa commit ad2d8ad
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion freezing/web/templates/explore/distance_by_lowtemp.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
format: (d) => d + '°F'
}
}
},
tooltip: {
format: {
value: (value, ratio, id) =>
Math.round(value) + (id === 'distance' ? ' mi' : '°F')
}
}
});
},
Expand All @@ -72,6 +78,18 @@
requestData();
});
</script>
<style>
.c3 path, .c3 line {
stroke: var(--bs-body-color);
}
.c3-axis text, .c3-legend-item text {
fill: var(--bs-body-color);
}
.c3-tooltip-container td, .c3-tooltip-container th {
background: var(--bs-body-bg);
color: var(--bs-body-color);
}
</style>
{% endblock %}
{% block content %}
<!--Div that will hold our leaderboard chart-->
Expand All @@ -82,7 +100,7 @@
Relationship between total number of miles logged riders and the average low daily temperatures.
</div>
{# djlint:off H021 #}
<div id="chart" style="width:100%; height:400px;">
<div id="chart" style="width:100%; height:560px;">
{# djlint:on #}
</div>
{% endblock %}

0 comments on commit ad2d8ad

Please sign in to comment.