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
</a>
{% 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>
<li class="pull-left">
<a class="btn btn-primary" href="{{ path('festival_show', { 'id': festival.id }) }}">voir

View File

@ -96,16 +96,31 @@
var dataPoints = [
{% for pair in statisticsSoldProducts %}
{ label: "{{ pair.name }}", y: {{ pair.count }} },
{
label: "{{ pair.name }}",
x: {{ pair.count }},
y: {{ pair.count }}
},
{% endfor %}
];
var dataPointsChiffreAffaire = [
{% for pair in statisticsSoldProducts %}
{ label: "{{ pair.name }}", y: {{ pair.value }} },
{
label: "{{ pair.name }}",
x: {{ pair.value }},
y: {{ pair.value }}
},
{% endfor %}
];var dataPointsFestivals = [
];
var dataPointsFestivals = [
{% 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 %}
];
console.log(dataPointsFestivals);

View File

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