Browse Source

feat: add other age data

jiangzixin 1 year ago
parent
commit
3daa417718
1 changed files with 4 additions and 2 deletions
  1. 4 2
      public/bi/js/index.js

+ 4 - 2
public/bi/js/index.js

@@ -193,7 +193,9 @@ function pieAge(data) {
 	eduction.map((item, index) => {
 	eduction.map((item, index) => {
 		if (item.name == '其他') {
 		if (item.name == '其他') {
 			unknown += item.count;
 			unknown += item.count;
-			eduction.splice(index, 1);
+			// eduction.splice(index, 1);
+			//其他数据
+			item.value = item.count;
 		} else {
 		} else {
 			total += item.count;
 			total += item.count;
 			item.value = item.count;
 			item.value = item.count;
@@ -238,7 +240,7 @@ function pieAge(data) {
 				length2: 10
 				length2: 10
 			}
 			}
 		}],
 		}],
-		color: ['#006cff', '#60cda0', '#ed8884', '#ff9f7f', '#0096ff', '#9fe6b8', '#32c5e9', '#1d9dff']
+		color: ['#006cff', '#9fe6b8', '#32c5e9', '#1d9dff', '#60cda0', '#ed8884', '#ff9f7f', '#0096ff']
 	};
 	};
 	myechartAge.setOption(option);
 	myechartAge.setOption(option);
 }
 }