From d012b5000bbb262ebbb72aa3e3d3563d8764f7ae Mon Sep 17 00:00:00 2001 From: miaojiale <1123971748@qq.com> Date: Wed, 5 Jul 2023 17:22:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91=E5=A4=A7?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataAnalysis/Bar/BarChart.vue | 178 ++++++++++++++++++++ src/views/dataAnalysis/Pie/PieChart.vue | 11 +- src/views/dataAnalysis/Pie/PieChartFour.vue | 154 +++++++++++++++++ src/views/dataAnalysis/Pie/PieChartTwo.vue | 149 ++++++++++++++++ src/views/dataAnalysis/index.vue | 147 +++++++++++++++- 5 files changed, 626 insertions(+), 13 deletions(-) create mode 100644 src/views/dataAnalysis/Bar/BarChart.vue create mode 100644 src/views/dataAnalysis/Pie/PieChartFour.vue create mode 100644 src/views/dataAnalysis/Pie/PieChartTwo.vue diff --git a/src/views/dataAnalysis/Bar/BarChart.vue b/src/views/dataAnalysis/Bar/BarChart.vue new file mode 100644 index 0000000..be8dbc6 --- /dev/null +++ b/src/views/dataAnalysis/Bar/BarChart.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/views/dataAnalysis/Pie/PieChart.vue b/src/views/dataAnalysis/Pie/PieChart.vue index 7b21153..5bf12b1 100644 --- a/src/views/dataAnalysis/Pie/PieChart.vue +++ b/src/views/dataAnalysis/Pie/PieChart.vue @@ -27,15 +27,15 @@ export default { }, height: { type: String, - default: "350px", + default: "300px", }, autoResize: { type: Boolean, default: true, }, chartData: { - type: Object, - required: true, + // type: Object, + // required: true, }, }, data() { @@ -94,10 +94,7 @@ export default { name: this.title, type: "pie", radius: "50%", - data: [ - { value: 1048, name: "男性" }, - { value: 735, name: "女性" }, - ], + data: this.chartData, emphasis: { itemStyle: { shadowBlur: 10, diff --git a/src/views/dataAnalysis/Pie/PieChartFour.vue b/src/views/dataAnalysis/Pie/PieChartFour.vue new file mode 100644 index 0000000..6f865e6 --- /dev/null +++ b/src/views/dataAnalysis/Pie/PieChartFour.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/src/views/dataAnalysis/Pie/PieChartTwo.vue b/src/views/dataAnalysis/Pie/PieChartTwo.vue new file mode 100644 index 0000000..8d7e060 --- /dev/null +++ b/src/views/dataAnalysis/Pie/PieChartTwo.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/src/views/dataAnalysis/index.vue b/src/views/dataAnalysis/index.vue index 9a3e49d..c12b6cb 100644 --- a/src/views/dataAnalysis/index.vue +++ b/src/views/dataAnalysis/index.vue @@ -70,22 +70,92 @@ :height="'300px'" :title="'筛查人群性别分布'" :total-num="sexNum" - :chart-data="{}" + :chart-data="pieData1" :colorList="colorList1" > -
- - +