diff --git a/SafeCampus.WEB/src/views/violation/portrait/detail.vue b/SafeCampus.WEB/src/views/violation/portrait/detail.vue index 1b1c125..0b0c871 100644 --- a/SafeCampus.WEB/src/views/violation/portrait/detail.vue +++ b/SafeCampus.WEB/src/views/violation/portrait/detail.vue @@ -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 diff --git a/SafeCampus.WEB/src/views/violation/portraitSummary/index.vue b/SafeCampus.WEB/src/views/violation/portraitSummary/index.vue index 545477b..f49cd0f 100644 --- a/SafeCampus.WEB/src/views/violation/portraitSummary/index.vue +++ b/SafeCampus.WEB/src/views/violation/portraitSummary/index.vue @@ -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}
{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 + } + } } ] };