From ed3e8d282e1145a7c26830a4c7df1de214b2bfbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 8 Jan 2018 13:20:56 -0500 Subject: [PATCH] closes #6193 --- public/src/admin/general/dashboard.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/public/src/admin/general/dashboard.js b/public/src/admin/general/dashboard.js index e4023745f8..f1208e9555 100644 --- a/public/src/admin/general/dashboard.js +++ b/public/src/admin/general/dashboard.js @@ -217,6 +217,10 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator', 'benchpress' }; trafficCanvas.width = $(trafficCanvas).parent().width(); + + data.datasets[0].yAxisID = 'left-y-axis'; + data.datasets[1].yAxisID = 'right-y-axis'; + graphs.traffic = new Chart(trafficCtx, { type: 'line', data: data, @@ -227,9 +231,21 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator', 'benchpress' }, scales: { yAxes: [{ + id: 'left-y-axis', + ticks: { + beginAtZero: true, + }, + type: 'linear', + position: 'left', + }, { + id: 'right-y-axis', ticks: { beginAtZero: true, + stepSize: 1, + suggestedMax: 10, }, + type: 'linear', + position: 'right', }], }, tooltips: {