|
|
@@ -65,7 +65,11 @@ const getDataChart = async () => { |
|
|
|
getCharts1(sex.data.label, sex.data.value); |
|
|
|
/* 获取学生年龄 */ |
|
|
|
let age: any = await portraitSummaryApi.getStudentAge(); |
|
|
|
getCharts2(age.data.label, age.data.value); |
|
|
|
let data = { |
|
|
|
label: [89, 99, 36, 29, 31, 30, 28, 22, 32, 33, 35, 12012012, 26, 27, 23], |
|
|
|
value: [1, 1, 1, 2, 2, 2, 1, 16, 1, 1, 1, 1, 1, 1, 1] |
|
|
|
}; |
|
|
|
getCharts2(data.label, data.value); |
|
|
|
/* 获取属性标签 */ |
|
|
|
let attr: any = await portraitSummaryApi.getStudentAttr(); |
|
|
|
getCharts4(attr.data.label, attr.data.value); |
|
|
@@ -104,7 +108,7 @@ function getCharts1(label: any, value: any) { |
|
|
|
type: "pie", |
|
|
|
radius: "80%", |
|
|
|
center: ["50%", "50%"], |
|
|
|
roseType: "area", |
|
|
|
// roseType: "area", |
|
|
|
label: { |
|
|
|
normal: { |
|
|
|
show: true |
|
|
@@ -158,10 +162,15 @@ function getCharts2(label: any, value: any) { |
|
|
|
{ |
|
|
|
name: "年龄分布", |
|
|
|
type: "pie", |
|
|
|
radius: [50, 140], |
|
|
|
|
|
|
|
radius: [50, 110], |
|
|
|
roseType: "area", |
|
|
|
center: ["35%", "50%"], |
|
|
|
data: data, |
|
|
|
label: { |
|
|
|
bleedMargin: 5, |
|
|
|
position: "outer", |
|
|
|
alignTo: "none" |
|
|
|
}, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
label: { |
|
|
@@ -171,7 +180,12 @@ function getCharts2(label: any, value: any) { |
|
|
|
} |
|
|
|
}, |
|
|
|
labelLine: { |
|
|
|
show: true |
|
|
|
show: true, //数据标签引导线 |
|
|
|
length: 20, |
|
|
|
lineStyle: { |
|
|
|
width: 1, |
|
|
|
type: "solid" |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|