+
+
+
+
{{ testchartData[0].value }}
+
+
+
{{ testchartData[0].name }}
+
+
+
+
{{ testchartData[1].value }}
+
+
+
{{ testchartData[1].name }}
+
+
+
+
+
+
{{ testchartData[2].value }}
+
+
{{ testchartData[2].name }}
+
+
+
+
+
{{ testchartData[3].value }}
+
+
{{ testchartData[3].name }}
+
@@ -20,6 +49,24 @@
},
data() {
return {
+ testchartData:[
+ {
+ value: 520,
+ name: "机芯产量",
+ },
+ {
+ value: 280,
+ name: "盖板产量",
+ },
+ {
+ value: 100,
+ name: "整机产量",
+ },
+ {
+ value: 100,
+ name: "组件产量",
+ },
+ ],
option: {}
}
},
@@ -35,75 +82,63 @@
const chartData = [
{
value: 520,
- name: "保养台数",
+ name: "机芯产量",
},
{
value: 280,
- name: "今天产量",
+ name: "盖板产量",
},
{
value: 100,
- name: "直通率",
+ name: "整机产量",
},
{
value: 100,
- name: "今日不良数",
- },
- {
- value: 100,
- name: "返工数",
- },
- {
- value: 100,
- name: "机芯备料进度",
- },
- {
- value: 100,
- name: "盖板备料进度",
+ name: "组件产量",
},
];
const colorList = [
- new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: "#CA8CCA",
- },
- {
- offset: 1,
- color: "#8A2BE2",
- },
- ]),
- new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: "#FF3333",
- },
- {
- offset: 1,
- color: "#FF3333",
- },
- ]),
- new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: "#A8AAE5",
- },
- {
- offset: 1,
- color: "#BEA3E3",
- },
- ]),
- new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: "#F0F4F8",
- },
- {
- offset: 1,
- color: "#E5F2A7",
- },
- ]),
- '#FF6B35','#2ECC71','#CCD6DD',
+ // new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ // {
+ // offset: 0,
+ // color: "#CA8CCA",
+ // },
+ // {
+ // offset: 1,
+ // color: "#8A2BE2",
+ // },
+ // ]),
+ // new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ // {
+ // offset: 0,
+ // color: "#FF3333",
+ // },
+ // {
+ // offset: 1,
+ // color: "#FF3333",
+ // },
+ // ]),
+ // new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ // {
+ // offset: 0,
+ // color: "#A8AAE5",
+ // },
+ // {
+ // offset: 1,
+ // color: "#BEA3E3",
+ // },
+ // ]),
+ // new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ // {
+ // offset: 0,
+ // color: "#F0F4F8",
+ // },
+ // {
+ // offset: 1,
+ // color: "#E5F2A7",
+ // },
+ // ]),
+ '#f8ffff','#88a8f4','#ffdc9d','#eb7e41'
];
const sum = chartData.reduce((per, cur) => per + cur.value, 0);
const gap = (1 * sum) / 100;
@@ -136,9 +171,9 @@
itemStyle: {
borderRadius: 10,
color: colorList[i],
- opacity: 0.1,
+ opacity: 0.2,
shadowColor: "#000",
- shadowBlur: 1,
+ shadowBlur: 3,
shadowOffsetY: 5,
shadowOffsetX: 0,
},
@@ -150,8 +185,8 @@
title: [
{
text: sum,
- x: "30%",
- y: "43%",
+ x: "50%",
+ y: "40%",
textAlign: "center",
textStyle: {
fontSize: "50",
@@ -165,9 +200,9 @@
},
},
{
- text: "数据展示",
- left: "30%",
- top: "52%",
+ text: "总产量",
+ left: "50%",
+ top: "55%",
textAlign: "center",
textStyle: {
fontSize: "25",
@@ -181,49 +216,49 @@
},
},
],
- legend: {
- right: "10%",
- top: 'middle',
- align: "left",
- width:'200',
- // orient: 'vertical',
- itemGap: 30,
- itemWidth: 20,
- itemHeight: 20,
- shadowBlur: 10,
- shadowOffsetY: 0,
- shadowOffsetX: 0,
- borderColor: "#2a2a34",
- borderWidth: 2,
- textStyle: {
- color: "#D8DDE3",
- rich: {
- name: {
- verticalAlign: "right",
- align: "left",
- fontSize: 24,
- color: "#D8DDE3",
- },
- percent: {
- padding: [0, 0, 0, 10],
- color: "#08e5ff",
- fontSize: 25,
- fontWeight:'bold'
- },
- },
- },
- formatter: (name) => {
- const item = chartData.find((i) => {
- return i.name === name;
- });
- //是否计算为百分比
- // const p = ((item.value / sum) * 100).toFixed(0);
- // return "{name|" + name + "}" + "{percent|" + p + "}" + " %";
+ // legend: {
+ // right: "10%",
+ // top: 'middle',
+ // align: "left",
+ // width:'200',
+ // // orient: 'vertical',
+ // itemGap: 30,
+ // itemWidth: 20,
+ // itemHeight: 20,
+ // shadowBlur: 10,
+ // shadowOffsetY: 0,
+ // shadowOffsetX: 0,
+ // borderColor: "#2a2a34",
+ // borderWidth: 2,
+ // textStyle: {
+ // color: "#D8DDE3",
+ // rich: {
+ // name: {
+ // verticalAlign: "right",
+ // align: "left",
+ // fontSize: 24,
+ // color: "#D8DDE3",
+ // },
+ // percent: {
+ // padding: [0, 0, 0, 10],
+ // color: "#08e5ff",
+ // fontSize: 25,
+ // fontWeight:'bold'
+ // },
+ // },
+ // },
+ // formatter: (name) => {
+ // const item = chartData.find((i) => {
+ // return i.name === name;
+ // });
+ // //是否计算为百分比
+ // // const p = ((item.value / sum) * 100).toFixed(0);
+ // // return "{name|" + name + "}" + "{percent|" + p + "}" + " %";
- // const p = ((item.value / sum) * 100).toFixed(0);
- return "{name|" + name + "}" + "{percent|" + item.value + "}";
- },
- },
+ // // const p = ((item.value / sum) * 100).toFixed(0);
+ // return "{name|" + name + "}" + "{percent|" + item.value + "}";
+ // },
+ // },
color: colorList,
@@ -232,8 +267,8 @@
type: "pie",
z: 3,
roundCap: true,
- radius: ["44%", "51%"],
- center: ["30%", "50%"],
+ radius: ["60%", "50%"],
+ // center: ["30%", "50%"],
label: {
show: false,
},
@@ -245,8 +280,8 @@
{
type: "pie",
z: 2,
- radius: ["40%", "55%"],
- center: ["30%", "50%"],
+ radius: ["70%", "66%"],
+ // center: ["30%", "50%"],
label: {
show: false,
},
@@ -269,11 +304,51 @@
#pie-chart {
box-sizing: border-box;
color: white;
-
+ .item-box{
+ position: absolute;
+ p{margin: 0;}
+ .item-name{
+ width: 200px;
+ font-size:30px;
+ color: #ffffff;
+ font-weight: bold;
+ }
+ .item-value-box{
+ display: flex;
+ align-items: center;
+ }
+ .item-value{
+ font-size:45px;
+ padding: 0 10px;
+ color: #ffffff;
+ font-weight: bold;
+ }
+ }
.pie-chart-container {
- width: 100%;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%,-50%);
+ width: 50%;
height: 100%
}
+ /* 向右的三角形 */
+ .triangle-right {
+ width: 0;
+ height: 0;
+ border-top: 15px solid transparent;
+ border-bottom: 15px solid transparent;
+ border-left: 20px solid #ff4141; /* 通过调整颜色和尺寸改变外观 */
+ }
+
+ /* 向左的三角形 */
+ .triangle-left {
+ width: 0;
+ height: 0;
+ border-top: 15px solid transparent;
+ border-bottom: 15px solid transparent;
+ border-right: 20px solid #41a2ff; /* 通过调整颜色和尺寸改变外观 */
+ }
}
\ No newline at end of file
diff --git a/src/img/icons/12.png b/src/img/icons/12.png
new file mode 100644
index 0000000..7765f74
Binary files /dev/null and b/src/img/icons/12.png differ
diff --git a/src/img/icons/13.png b/src/img/icons/13.png
new file mode 100644
index 0000000..0f209e8
Binary files /dev/null and b/src/img/icons/13.png differ
diff --git a/src/img/icons/14.png b/src/img/icons/14.png
new file mode 100644
index 0000000..3cabcaf
Binary files /dev/null and b/src/img/icons/14.png differ
diff --git a/src/img/icons/15.png b/src/img/icons/15.png
new file mode 100644
index 0000000..ea41b7d
Binary files /dev/null and b/src/img/icons/15.png differ