From 7c1d2e8a053d3779c8fbc7378cbcba3bb0a79561 Mon Sep 17 00:00:00 2001 From: Satvik Singh <64309880+satvik-tha-god@users.noreply.github.com> Date: Tue, 6 Sep 2022 20:14:38 +0530 Subject: [PATCH] [dashboard][Study Progression] Add tooltip visualising of Total in line chart (#8123) Added total scan and recruitment data in their respective chart visualisations Added total calculation Updated related CSS Updated scale of chart appropriately Minor Spelling mistake fixes Resolves #8122 --- modules/statistics/css/recruitment.css | 3 ++ modules/statistics/js/studyprogression.js | 34 +++++++++++++++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/modules/statistics/css/recruitment.css b/modules/statistics/css/recruitment.css index a64da3c2f2d..138ea4bc0fc 100644 --- a/modules/statistics/css/recruitment.css +++ b/modules/statistics/css/recruitment.css @@ -11,3 +11,6 @@ background-color: #2FA4E7; } +.c3-chart-line.c3-target.c3-target-Total{ + display: none !important; +} diff --git a/modules/statistics/js/studyprogression.js b/modules/statistics/js/studyprogression.js index b2b04edd2c0..c2a6c42e18e 100644 --- a/modules/statistics/js/studyprogression.js +++ b/modules/statistics/js/studyprogression.js @@ -38,18 +38,38 @@ $(document).ready(function() { dataset.push(data.datasets[i].name); processedData.push(dataset.concat(data.datasets[i].data)); } + var totals = new Array(); + totals.push("Total"); + for(var j=0; j