Skip to content
Extraits de code Groupes Projets
Valider f211efd3 rédigé par Juliana's avatar Juliana
Parcourir les fichiers

[ADD] add courbe prm prod

parent 83898785
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -448,6 +448,46 @@ class EnercoopOperation(models.Model):
}]
}
}
result['line_chart_prod_prm'] = {
'type': 'line',
'data': {
'labels': chart_data['label'],
'datasets': [
{
'label': 'Production solaire',
'data': chart_data['prod'],
'backgroundColor': 'rgba(244, 165, 25, 0)',
'borderColor': 'rgba(244, 165, 25, 1)',
},
],
},
}
result['line_chart_prod_line_prm'] = {
'type': 'line',
'data': {
'labels': chart_data['label'],
'datasets': [
{
'label': 'Production solaire',
'data': chart_data['prod_line'],
'backgroundColor': 'rgba(244, 165, 25, 0)',
'borderColor': 'rgba(244, 165, 25, 1)',
'borderWidth': 2,
'hoverRadius': 1,
'radius': 0,
},
{
'label': 'Autoconso',
'data': chart_data['autocons_line'],
'backgroundColor': 'rgba(91, 154, 81, 0.4)',
'borderColor': 'rgba(91, 154, 81, 1)',
'borderWidth': 2,
'hoverRadius': 1,
'radius': 0,
},
],
},
}
return result
def get_cdc(self, type, date_start, date_end, prm_id=None):
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter