Cumulate graph

This commit is contained in:
poka 2021-03-15 20:19:12 +01:00
parent 25a1d44ffe
commit 542fd94012
1 changed files with 67 additions and 24 deletions

View File

@ -23,19 +23,11 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
type: 'line',
data: {
labels: date,
datasets: [{
label: 'Ḡ1 reçus sur les simples portefeuilles',
data: rwallets,
backgroundColor: 'rgba(0, 119, 204, 0.3)',
pointBorderWidth: 1,
pointHoverRadius: 6,
pointHoverBackgroundColor: "beige",
pointHoverBorderColor: "brown",
pointHoverBorderWidth: 2,
pointRadius: 1,
pointHitRadius: 4
}, {
label: 'Ḡ1 reçus sur les portefeuilles membres',
datasets: [
{
label: 'Portefeuilles membres',
data: rmembers,
backgroundColor: 'rgba(0, 178, 0, 0.3)',
pointBorderWidth: 1,
@ -45,11 +37,45 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
pointHoverBorderWidth: 2,
pointRadius: 1,
pointHitRadius: 4
}]
},
{
label: 'Simples portefeuilles',
data: rwallets,
backgroundColor: 'rgba(0, 119, 204, 0.3)',
pointBorderWidth: 1,
pointHoverRadius: 6,
pointHoverBackgroundColor: "beige",
pointHoverBorderColor: "brown",
pointHoverBorderWidth: 2,
pointRadius: 1,
pointHitRadius: 4
},
]
},
options: {
maintainAspectRatio: false,
responsive: true
responsive: true,
scales: {
xAxes: [{
stacked: true
}],
yAxes: [
{
id: 'y-axis',
stacked: true
}
]
}
}
};
var myChartRW = new Chart(ctx, config);
@ -61,10 +87,11 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
type: 'line',
data: {
labels: date,
datasets: [{
label: 'Nombre de simple portefeuilles',
data: nbrwallets,
backgroundColor: 'rgba(0, 119, 204, 0.3)',
datasets: [
{
label: 'Portefeuilles membres',
data: nbrmembers,
backgroundColor: 'rgba(0, 178, 0, 0.3)',
pointBorderWidth: 1,
pointHoverRadius: 6,
pointHoverBackgroundColor: "beige",
@ -72,10 +99,12 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
pointHoverBorderWidth: 2,
pointRadius: 1,
pointHitRadius: 4
}, {
label: 'Nombre de portefeuilles membres',
data: nbrmembers,
backgroundColor: 'rgba(0, 178, 0, 0.3)',
},
{
label: 'Simples portefeuilles',
data: nbrwallets,
backgroundColor: 'rgba(0, 119, 204, 0.3)',
pointBorderWidth: 1,
pointHoverRadius: 6,
pointHoverBackgroundColor: "beige",
@ -87,7 +116,21 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
},
options: {
maintainAspectRatio: true,
responsive: true
responsive: true,
scales: {
xAxes: [{
stacked: true
}],
yAxes: [
{
id: 'y-axis',
stacked: true
}
]
}
}
};