v1.18.x
Barış Soner Uşaklı 7 years ago
parent ff72d022c1
commit ed3e8d282e

@ -217,6 +217,10 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator', 'benchpress'
}; };
trafficCanvas.width = $(trafficCanvas).parent().width(); trafficCanvas.width = $(trafficCanvas).parent().width();
data.datasets[0].yAxisID = 'left-y-axis';
data.datasets[1].yAxisID = 'right-y-axis';
graphs.traffic = new Chart(trafficCtx, { graphs.traffic = new Chart(trafficCtx, {
type: 'line', type: 'line',
data: data, data: data,
@ -227,9 +231,21 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator', 'benchpress'
}, },
scales: { scales: {
yAxes: [{ yAxes: [{
id: 'left-y-axis',
ticks: {
beginAtZero: true,
},
type: 'linear',
position: 'left',
}, {
id: 'right-y-axis',
ticks: { ticks: {
beginAtZero: true, beginAtZero: true,
stepSize: 1,
suggestedMax: 10,
}, },
type: 'linear',
position: 'right',
}], }],
}, },
tooltips: { tooltips: {

Loading…
Cancel
Save