Skip to content

Commit a19b38b

Browse files
committed
Merge remote-tracking branch 'origin/fix_graph_label_case' into recette
2 parents cfc8bd1 + f86f56e commit a19b38b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

atlas/static/chart.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function formatStackedBarChart(values, element) {
145145

146146
if(configuration.DISPLAY_PATRIMONIALITE) {
147147
datasets.push({
148-
label: `Nombre d'espèces ${configuration.PATRIMONIALITE.label_pluriel || "remarquables"}`,
148+
label: `Nombre d'espèces ${configuration.PATRIMONIALITE.label_pluriel.toLowerCase() || "remarquables"}`,
149149
data: nb_patrimonial,
150150
backgroundColor: [configuration.COLOR_STACKED_BAR_CHARTS[1]],
151151
stack: "2",
@@ -154,7 +154,7 @@ function formatStackedBarChart(values, element) {
154154

155155
datasets.push(
156156
{
157-
label: "Nombre d'espèces sur ce territoire",
157+
label: "Nombre d'espèces",
158158
data: nb_species,
159159
backgroundColor: [configuration.COLOR_STACKED_BAR_CHARTS[0]],
160160
stack: "0",
@@ -171,6 +171,14 @@ function formatStackedBarChart(values, element) {
171171
labels: labels,
172172
datasets: datasets
173173
};
174+
if(configuration.DISPLAY_PATRIMONIALITE) {
175+
data.datasets.push({
176+
label: "Nombre d'espèces patrimonialies",
177+
data: nb_patrimonial,
178+
backgroundColor: [configuration.COLOR_STACKED_BAR_CHARTS[1]],
179+
stack: "2",
180+
});
181+
}
174182

175183
return data
176184
}

0 commit comments

Comments
 (0)