mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
closes #6193
This commit is contained in:
@@ -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: {
|
ticks: {
|
||||||
beginAtZero: true,
|
beginAtZero: true,
|
||||||
},
|
},
|
||||||
|
type: 'linear',
|
||||||
|
position: 'left',
|
||||||
|
}, {
|
||||||
|
id: 'right-y-axis',
|
||||||
|
ticks: {
|
||||||
|
beginAtZero: true,
|
||||||
|
stepSize: 1,
|
||||||
|
suggestedMax: 10,
|
||||||
|
},
|
||||||
|
type: 'linear',
|
||||||
|
position: 'right',
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
tooltips: {
|
tooltips: {
|
||||||
|
|||||||
Reference in New Issue
Block a user