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]); }