Browse Source

图表优化

master
suyanyan 3 months ago
parent
commit
3d36a9351a
2 changed files with 33 additions and 2 deletions
  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 View File

@@ -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 View File

@@ -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
}
}
}
]
};


Loading…
Cancel
Save