mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-06-20 01:44:42 +02:00
up to sf 7
This commit is contained in:
parent
a39b6239b0
commit
501795a8fa
16586 changed files with 19384005 additions and 0 deletions
75
v1/old/app/Resources/views/logged/history-script.html.twig
Executable file
75
v1/old/app/Resources/views/logged/history-script.html.twig
Executable file
|
@ -0,0 +1,75 @@
|
|||
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
|
||||
<script>
|
||||
|
||||
var dataPoints = [
|
||||
{% for pair in statisticsSoldProducts %}
|
||||
{
|
||||
label: "{{ pair.name }}",
|
||||
x: {{ pair.count }},
|
||||
y: {{ pair.count }}
|
||||
},
|
||||
{% endfor %}
|
||||
];
|
||||
var dataPointsChiffreAffaire = [
|
||||
{% for pair in statisticsSoldProducts %}
|
||||
{
|
||||
label: "{{ pair.name }}",
|
||||
x: {{ pair.value }},
|
||||
y: {{ pair.value }}
|
||||
},
|
||||
{% endfor %}
|
||||
];
|
||||
var dataPointsFestivals = [
|
||||
{% for pair in statisticsFestivals %}
|
||||
{
|
||||
label: "{{ pair.name }} {{ pair.date|date('Y-m-d') }} , {{ pair.chiffreAffaire }} €",
|
||||
y: {{ pair.chiffreAffaire }} ,
|
||||
countClients : "{{ pair.clients_count }} clients"
|
||||
},
|
||||
{% endfor %}
|
||||
];
|
||||
console.log(dataPointsFestivals);
|
||||
var chartFestival = new CanvasJS.Chart("chartContainerstatisticsFestivals", {
|
||||
title:{
|
||||
text: "Chiffre d'affaire par festival"
|
||||
},
|
||||
animationEnabled: true,
|
||||
data: [
|
||||
{
|
||||
// Change type to "doughnut", "line", "splineArea", etc.
|
||||
type: "column",
|
||||
dataPoints: dataPointsFestivals
|
||||
}
|
||||
]
|
||||
});
|
||||
console.log('dataPointsFestivals', dataPointsFestivals);
|
||||
chartFestival.render();
|
||||
var chart = new CanvasJS.Chart("chartContainer", {
|
||||
title:{
|
||||
text: "Volume de produits vendus"
|
||||
},
|
||||
animationEnabled: true,
|
||||
data: [
|
||||
{
|
||||
// Change type to "doughnut", "line", "splineArea", etc.
|
||||
type: "pie",
|
||||
dataPoints: dataPoints
|
||||
}
|
||||
]
|
||||
});
|
||||
chart.render();
|
||||
var chartContainerChiffreAffaire = new CanvasJS.Chart("chartContainerChiffreAffaire", {
|
||||
title:{
|
||||
text: "Valeur en euros des produits vendus"
|
||||
},
|
||||
animationEnabled: true,
|
||||
data: [
|
||||
{
|
||||
// Change type to "doughnut", "line", "splineArea", etc.
|
||||
type: "pie",
|
||||
dataPoints: dataPointsChiffreAffaire
|
||||
}
|
||||
]
|
||||
});
|
||||
chartContainerChiffreAffaire.render();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue