diff --git a/app/Resources/views/logged/history-script.html.twig b/app/Resources/views/logged/history-script.html.twig index d0011768..fdef6921 100755 --- a/app/Resources/views/logged/history-script.html.twig +++ b/app/Resources/views/logged/history-script.html.twig @@ -22,9 +22,9 @@ var dataPointsFestivals = [ {% for pair in statisticsFestivals %} { - label: "{{ pair.date|date('Y-m-d') }}", + label: "{{ pair.name }} {{ pair.date|date('Y-m-d') }} , {{ pair.chiffreAffaire }} €", y: {{ pair.chiffreAffaire }} , - countClients : {{ pair.clients_count }} + countClients : "{{ pair.clients_count }} clients" }, {% endfor %} ]; @@ -37,7 +37,7 @@ data: [ { // Change type to "doughnut", "line", "splineArea", etc. - type: "line", + type: "column", dataPoints: dataPointsFestivals } ] diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php index 3e15cc2f..984c7aa3 100755 --- a/src/AppBundle/Controller/DefaultController.php +++ b/src/AppBundle/Controller/DefaultController.php @@ -344,7 +344,7 @@ class DefaultController extends Controller // ['name' => 'bidule', 'count' => 0, 'value' => 0], ]; - $statsForFestival = [ + $statsForFestivalMock = [ ['name' => 'festoche bidule', 'clients_count' => 125, 'chiffreAffaire' => 236, 'date' => new \DateTime()], ]; foreach ($allSellingList as $client) { @@ -373,7 +373,8 @@ class DefaultController extends Controller return $this->render('logged/history.html.twig', [ - 'statisticsFestivals' => $statsForFestival, +// 'statisticsFestivals' => $statsForFestivalMock, // mock of festival stats + 'statisticsFestivals' => $statisticsFestivals, 'statisticsSoldProducts' => $statisticsSoldProducts, 'chiffreAffaires' => $chiffreAffaires, 'recentSells' => $mySellings,