cleans up code of 'statistiques' module

This commit is contained in:
artus40
2018-03-09 15:28:31 +01:00
parent 2f9b987d1f
commit 8ae1c677f6
4 changed files with 10 additions and 19 deletions

View File

@@ -32,13 +32,6 @@ LABELS = {
}
# TODO: Retrieve charts data from cache to avoid recalculating on each request
class CachedDataSource:
pass
# TODO: Clean up...
class FieldValuesCountDataSource(SimpleDataSource):
""" Generates data from a limited set of choices.
@@ -192,7 +185,6 @@ class AgePieChart(PieWrapper):
super().__init__(data=data, title="Âge")
class IndividuGroupeChart(PieWrapper):
def __init__(self, queryset):
@@ -257,7 +249,6 @@ class RencontreParMoisChart(ColumnWrapper):
)
def gen_heure_minute(_from, to):
start_hour = _from.hour
stop_hour, stop_min = to.hour, to.minute
@@ -335,4 +326,4 @@ class RencontreParLieuChart(PieWrapper):
if self.queryset:
data += [(label, self.get_count_for_group(lieu_pks)) for label, lieu_pks in self.labels]
super().__init__(data=data,
title="Fréquentation par lieu")
title="Fréquentation par lieu")