Explorar el Código

图表优化

master
suyanyan hace 4 meses
padre
commit
3d36a9351a
Se han modificado 2 ficheros con 33 adiciones y 2 borrados
  1. +1
    -1
      SafeCampus.WEB/src/views/violation/portrait/detail.vue
  2. +32
    -1
      SafeCampus.WEB/src/views/violation/portraitSummary/index.vue

+ 1
- 1
SafeCampus.WEB/src/views/violation/portrait/detail.vue Ver fichero

@@ -125,6 +125,7 @@ const getCharts = (data: any) => {
data: nameArr
},
yAxis: {
name: "次",
type: "value",
splitLine: {
show: true,
@@ -140,7 +141,6 @@ const getCharts = (data: any) => {
fontSize: 12
}
},
name: "",
nameTextStyle: {
color: "#333",
fontSize: 12


+ 32
- 1
SafeCampus.WEB/src/views/violation/portraitSummary/index.vue Ver fichero

@@ -96,6 +96,18 @@ function getCharts1() {
show: true
}
},
itemStyle: {
normal: {
label: {
show: true,
// position:'inside',
formatter: "{b} : {c}人"
}
},
labelLine: {
show: true
}
},
data: [
{
value: 62,
@@ -119,6 +131,13 @@ function getCharts1() {
function getCharts2() {
const chartstation = echarts.init(chart2.value);
const option = {
legend: {
show: true,
right: "0%",
top: "center",
orient: "vertical",
data: ["<20", ">60岁", "50-60岁", "40-50岁", "30-40岁", "20-30岁"]
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
@@ -156,7 +175,19 @@ function getCharts2() {
value: 30,
name: "20-30岁"
}
]
],
itemStyle: {
normal: {
label: {
show: true,
// position:'inside',
formatter: "{b} : {c}人"
}
},
labelLine: {
show: true
}
}
}
]
};


Cargando…
Cancelar
Guardar