feat: make chart legend visibility configurable via show_legend assign

This commit is contained in:
Paul Gauthier (aider) 2025-01-24 08:24:01 -08:00
parent b4535bd29b
commit 35dfd13ddd
2 changed files with 2 additions and 1 deletions

View file

@ -96,7 +96,7 @@ document.addEventListener('DOMContentLoaded', function () {
options: {
plugins: {
legend: {
display: false,
display: {% if show_legend == false %}false{% else %}true{% endif %},
labels: {
generateLabels: function(chart) {
return [

View file

@ -63,6 +63,7 @@ which improved when paired with many different editor models.
{% assign data_source = edit_sorted %}
{% assign pass_rate_field = "pass_rate_2" %}
{% assign highlight_model = "+" %}
{% assign show_legend = false %}
{% include leaderboard.js %}
</script>
<style>