Explorar o código

feat: add other age data

jiangzixin hai 1 ano
pai
achega
3daa417718
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  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) => {
 		if (item.name == '其他') {
 			unknown += item.count;
-			eduction.splice(index, 1);
+			// eduction.splice(index, 1);
+			//其他数据
+			item.value = item.count;
 		} else {
 			total += item.count;
 			item.value = item.count;
@@ -238,7 +240,7 @@ function pieAge(data) {
 				length2: 10
 			}
 		}],
-		color: ['#006cff', '#60cda0', '#ed8884', '#ff9f7f', '#0096ff', '#9fe6b8', '#32c5e9', '#1d9dff']
+		color: ['#006cff', '#9fe6b8', '#32c5e9', '#1d9dff', '#60cda0', '#ed8884', '#ff9f7f', '#0096ff']
 	};
 	myechartAge.setOption(option);
 }