x axis on graphs

This commit is contained in:
Kayn Ty 2018-05-22 17:21:35 +02:00
parent 18bd2ed96d
commit 19144377fe
No known key found for this signature in database
GPG Key ID: 55B09AA0ED327CD3
3 changed files with 32 additions and 7 deletions

View File

@ -68,6 +68,17 @@
choisir comme actuel choisir comme actuel
</a> </a>
{% endif %} {% endif %}
{% if festival.user|length %}
{% for u in festival.user %}
<span class="badge badge-info">{{ u.username }}</span>
{% endfor %}
{% else %}
<div class="alert alert-info">
pas d'owner.
</div>
{% endif %}
<ul> <ul>
<li class="pull-left"> <li class="pull-left">
<a class="btn btn-primary" href="{{ path('festival_show', { 'id': festival.id }) }}">voir <a class="btn btn-primary" href="{{ path('festival_show', { 'id': festival.id }) }}">voir

View File

@ -96,16 +96,31 @@
var dataPoints = [ var dataPoints = [
{% for pair in statisticsSoldProducts %} {% for pair in statisticsSoldProducts %}
{ label: "{{ pair.name }}", y: {{ pair.count }} }, {
label: "{{ pair.name }}",
x: {{ pair.count }},
y: {{ pair.count }}
},
{% endfor %} {% endfor %}
]; ];
var dataPointsChiffreAffaire = [ var dataPointsChiffreAffaire = [
{% for pair in statisticsSoldProducts %} {% for pair in statisticsSoldProducts %}
{ label: "{{ pair.name }}", y: {{ pair.value }} }, {
label: "{{ pair.name }}",
x: {{ pair.value }},
y: {{ pair.value }}
},
{% endfor %} {% endfor %}
];var dataPointsFestivals = [ ];
var dataPointsFestivals = [
{% for pair in statisticsFestivals %} {% for pair in statisticsFestivals %}
{ label: "{{ pair.name }}", y: {{ pair.chiffreAffaire }} , countClients : {{ pair.clients_count }}, date: "{{ pair.date |date('Y-m-d')}}" }, {
label: "{{ pair.name }}",
name: "{{ pair.name }}",
x: "{{ pair.date |date('Y-m-d')}}",
y: {{ pair.chiffreAffaire }} ,
countClients : {{ pair.clients_count }}
},
{% endfor %} {% endfor %}
]; ];
console.log(dataPointsFestivals); console.log(dataPointsFestivals);

View File

@ -59,7 +59,6 @@ class DefaultController extends Controller
1); 1);
} }
if ($lastFestival) { if ($lastFestival) {
$lastFestival->recalculateChiffreAffaire(); $lastFestival->recalculateChiffreAffaire();
} }
$categRepo = $m->getRepository('AppBundle:ProductCategory'); $categRepo = $m->getRepository('AppBundle:ProductCategory');
@ -453,7 +452,7 @@ class DefaultController extends Controller
$m->flush(); $m->flush();
// replace this example code with whatever you need // replace this example code with whatever you need
return $this->redirectToRoute('dashboard'); return $this->redirectToRoute('festival_index');
} }
/** /**