차트 수정

main
이범준 1 year ago
parent 7efad71a86
commit 5fccfbd924

@ -538,6 +538,10 @@ function fnRenderLine(returnData, cursor){
var yellowColor = '#ffe800'; var yellowColor = '#ffe800';
var cyanColor = '#28dac6'; var cyanColor = '#28dac6';
var orangeLightColor = '#FDAC34'; var orangeLightColor = '#FDAC34';
var redColor = '#FF3E1D';
var indigoColor = '#696CFF';
var ctgrColorSet = [yellowColor,cyanColor,orangeLightColor,redColor,indigoColor];
var borderColor = '#f0f0f0'; var borderColor = '#f0f0f0';
var gridColor = '#f0f0f0'; var gridColor = '#f0f0f0';
@ -577,21 +581,9 @@ function fnRenderLine(returnData, cursor){
minOfStat = minOfStatItem; minOfStat = minOfStatItem;
} }
if(i % 3 == 0){ defaultObject.backgroundColor = ctgrColorSet[i % ctgrColorSet.length];
defaultObject.backgroundColor = config.colors.danger; defaultObject.pointHoverBackgroundColor = ctgrColorSet[i % ctgrColorSet.length];
defaultObject.pointHoverBackgroundColor = config.colors.danger; defaultObject.borderColor = ctgrColorSet[i % ctgrColorSet.length];
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;
}
datasets.push(defaultObject); datasets.push(defaultObject);
} }
@ -674,6 +666,10 @@ function fnRenderDoughnut(returnData, cursor){
var yellowColor = '#ffe800'; var yellowColor = '#ffe800';
var cyanColor = '#28dac6'; var cyanColor = '#28dac6';
var orangeLightColor = '#FDAC34'; var orangeLightColor = '#FDAC34';
var redColor = '#FF3E1D';
var indigoColor = '#696CFF';
var ctgrColorSet = [yellowColor,cyanColor,orangeLightColor,redColor,indigoColor];
var borderColor = '#f0f0f0'; var borderColor = '#f0f0f0';
var gridColor = '#f0f0f0'; var gridColor = '#f0f0f0';
@ -694,9 +690,8 @@ function fnRenderDoughnut(returnData, cursor){
for(var i=0; i < returnData.statItems.length; i++){ for(var i=0; i < returnData.statItems.length; i++){
lebels.push(returnData.statItems[i].itemName[0]); lebels.push(returnData.statItems[i].itemName[0]);
datas.push(returnData.statItems[i].numberValue[0]); datas.push(returnData.statItems[i].numberValue[0]);
if(i % 3 == 0){ colors.push(cyanColor); }
if(i % 3 == 1){ colors.push(orangeLightColor); } colors.push(ctgrColorSet[i % ctgrColorSet.length]);
if(i % 3 == 2){ colors.push(config.colors.primary); }
} }

Loading…
Cancel
Save