提交 5c013be6 authored 作者: Your Name's avatar Your Name

fix(自适应): 饼状图logo添加

上级 50c91ce7
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h1024v1024H0V0z" fill="#202425" opacity=".01" /><path d="M214.152533 142.2336C181.725867 97.041067 213.981867 34.133333 269.585067 34.133333h484.829866c55.6032 0 87.8592 62.907733 55.432534 108.100267l-77.585067 108.066133A136.533333 136.533333 0 0 1 621.329067 307.2h-218.658134a136.533333 136.533333 0 0 1-110.933333-56.900267L214.152533 142.2336z" fill="#FFAA44" /><path d="M545.621333 238.933333h-67.242666a409.6 409.6 0 0 0-403.012267 336.315734l-31.470933 173.192533C21.026133 874.154667 117.623467 989.866667 245.418667 989.866667h533.230933c127.761067 0 224.3584-115.712 201.489067-241.425067l-31.470934-173.192533A409.6 409.6 0 0 0 545.5872 238.933333z" fill="#FF7744" /><path d="M351.3344 453.7344a34.133333 34.133333 0 0 1 48.264533 0L512 566.135467l112.401067-112.401067a34.133333 34.133333 0 0 1 48.264533 48.264533L594.397867 580.266667H648.533333a34.133333 34.133333 0 1 1 0 68.266666h-102.4v51.2h102.4a34.133333 34.133333 0 1 1 0 68.266667h-102.4v68.266667a34.133333 34.133333 0 1 1-68.266666 0v-68.266667h-102.4a34.133333 34.133333 0 1 1 0-68.266667h102.4V648.533333h-102.4a34.133333 34.133333 0 1 1 0-68.266666h54.135466l-78.267733-78.267734a34.133333 34.133333 0 0 1 0-48.264533z" fill="#FFFFFF" /></svg>
\ No newline at end of file
...@@ -3,7 +3,16 @@ ...@@ -3,7 +3,16 @@
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<div class="echarts-circular">
<div id="businessIncome" class="business-income"></div> <div id="businessIncome" class="business-income"></div>
<div class="money-logo">
<div>
<img src="@/assets/img/qiandai.svg" alt="" />
<div>营业收入 <span>(万元)</span></div>
</div>
<span class="mony-number">3532.82</span>
</div>
</div>
</el-col> </el-col>
<el-col class="pie-items" :span="12" :offset="2"> <el-col class="pie-items" :span="12" :offset="2">
...@@ -38,12 +47,12 @@ import { Aim } from "@element-plus/icons"; ...@@ -38,12 +47,12 @@ import { Aim } from "@element-plus/icons";
const PIE_LIST = [ const PIE_LIST = [
{ label: "数字军工(网络、人工智能)领域", value: 932.66 }, { label: "数字军工(网络、人工智能)领域", value: 932.66 },
{ label: "高端装备领域", value:383.17 }, { label: "高端装备领域", value: 383.17 },
{ label: "核电(新能源领域)", value: 311.27 }, { label: "核电(新能源领域)", value: 311.27 },
{ label: "生物安全领域", value: 267.96 }, { label: "生物安全领域", value: 267.96 },
{ label: "航空航天领域", value: 269.18 }, { label: "航空航天领域", value: 269.18 },
{ label: "船舶与海洋装备领域", value: 84.22 }, { label: "船舶与海洋装备领域", value: 84.22 },
{ label: "军队现代后勤保障领域", value: 517.90 }, { label: "军队现代后勤保障领域", value: 517.9 },
{ label: "军用材料与基础件配套领域", value: 365.24 }, { label: "军用材料与基础件配套领域", value: 365.24 },
{ label: "其他", value: 401.22 }, { label: "其他", value: 401.22 },
]; ];
...@@ -109,7 +118,7 @@ export default defineComponent({ ...@@ -109,7 +118,7 @@ export default defineComponent({
{ {
name: "Access From", name: "Access From",
type: "pie", type: "pie",
radius: ["40%", "70%"], radius: ["48%", "70%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
label: { label: {
show: false, show: false,
...@@ -117,7 +126,7 @@ export default defineComponent({ ...@@ -117,7 +126,7 @@ export default defineComponent({
}, },
emphasis: { emphasis: {
label: { label: {
show: true, show: false,
fontSize: "20", fontSize: "20",
formatter: "营业额(万元)\n \n{c}", formatter: "营业额(万元)\n \n{c}",
}, },
...@@ -171,6 +180,32 @@ export default defineComponent({ ...@@ -171,6 +180,32 @@ export default defineComponent({
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.echarts-circular {
position: relative;
.money-logo {
top: 40%;
left: 32%;
position: absolute;
text-align: center;
div {
display: flex;
align-items: center;
font-size: 24px;
color: #333;
span {
font-size: 18px;
color: #666;
}
img {
width: 40px;
}
}
.mony-number{
font-size: 44px;
color: #4198ff;
}
}
}
.business-income { .business-income {
flex: 1; flex: 1;
height: 400px; height: 400px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论