From 5fccfbd92443bcb1fc450a187ddd52edbe7cc879 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 6 Nov 2023 16:03:28 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B0=A8=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/jsp/include/dashboard.jsp | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp b/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp index 160a5a6d..54190172 100644 --- a/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp @@ -538,6 +538,10 @@ function fnRenderLine(returnData, cursor){ var yellowColor = '#ffe800'; var cyanColor = '#28dac6'; var orangeLightColor = '#FDAC34'; + var redColor = '#FF3E1D'; + var indigoColor = '#696CFF'; + + var ctgrColorSet = [yellowColor,cyanColor,orangeLightColor,redColor,indigoColor]; var borderColor = '#f0f0f0'; var gridColor = '#f0f0f0'; @@ -577,21 +581,9 @@ function fnRenderLine(returnData, cursor){ minOfStat = minOfStatItem; } - if(i % 3 == 0){ - defaultObject.backgroundColor = config.colors.danger; - defaultObject.pointHoverBackgroundColor = config.colors.danger; - defaultObject.borderColor = config.colors.danger - } - if(i % 3 == 1){ - defaultObject.backgroundColor = config.colors.primary; - defaultObject.pointHoverBackgroundColor = config.colors.primary; - defaultObject.borderColor = config.colors.primary; - } - if(i % 3 == 2){ - defaultObject.backgroundColor = yellowColor; - defaultObject.pointHoverBackgroundColor = yellowColor; - defaultObject.borderColor = yellowColor; - } + defaultObject.backgroundColor = ctgrColorSet[i % ctgrColorSet.length]; + defaultObject.pointHoverBackgroundColor = ctgrColorSet[i % ctgrColorSet.length]; + defaultObject.borderColor = ctgrColorSet[i % ctgrColorSet.length]; datasets.push(defaultObject); } @@ -674,6 +666,10 @@ function fnRenderDoughnut(returnData, cursor){ var yellowColor = '#ffe800'; var cyanColor = '#28dac6'; var orangeLightColor = '#FDAC34'; + var redColor = '#FF3E1D'; + var indigoColor = '#696CFF'; + + var ctgrColorSet = [yellowColor,cyanColor,orangeLightColor,redColor,indigoColor]; var borderColor = '#f0f0f0'; var gridColor = '#f0f0f0'; @@ -694,9 +690,8 @@ function fnRenderDoughnut(returnData, cursor){ for(var i=0; i < returnData.statItems.length; i++){ lebels.push(returnData.statItems[i].itemName[0]); datas.push(returnData.statItems[i].numberValue[0]); - if(i % 3 == 0){ colors.push(cyanColor); } - if(i % 3 == 1){ colors.push(orangeLightColor); } - if(i % 3 == 2){ colors.push(config.colors.primary); } + + colors.push(ctgrColorSet[i % ctgrColorSet.length]); }