Commit edadcad0 by 匡雅琴

样式调整

1 parent 2f196a23
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
.left { .left {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 43.89vw; width: 41.67vw;
overflow: hidden; overflow: hidden;
.top { .top {
......
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
margin: 4px 4px; margin: 4px 4px;
// height:10.98vh; // height:10.98vh;
font-size: 10px; font-size: 10px;
background-image: linear-gradient(90deg, #003F57 0%, #111056 54%, #071735 100%);
} }
.go { .go {
width: 12px; width: 12px;
......
<template> <template>
<div class="area"> <div class="area">
<div class="title title-icon"> <div class="title-icon">
<span class="icon"></span> <span class="title-bg">区域分布</span>
<span>区域分布</span>
</div> </div>
<div class="container"> <div class="container">
<BarChart domId="areaChart" :analysisList="areaList" :colorList="colorList"></BarChart> <BarChart domId="areaChart" :analysisList="areaList" :colorList="colorList"></BarChart>
...@@ -32,5 +31,14 @@ export default { ...@@ -32,5 +31,14 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.area { .area {
width: 15.83vw; width: 15.83vw;
.title-icon {
font-weight: 500;
font-size: 10px;
color: #ffffff;
.title-bg {
background-image: linear-gradient(90deg, #003f57 0%, #111056 54%, #071735 100%);
padding-left: 0.83vw;
}
}
} }
</style> </style>
<template> <template>
<div class="brand"> <div class="brand">
<div class="title title-icon"> <div class="title-icon">
<span class="icon"></span> <span class="title-bg">品牌分布</span>
<span>品牌分布</span>
</div> </div>
<div class="container"> <div class="container">
<BarChart domId="brandChart" :rotate="30" :analysisList="brandList" :colorList="colorList"></BarChart> <BarChart domId="brandChart" :rotate="30" :analysisList="brandList" :colorList="colorList"></BarChart>
...@@ -32,5 +31,14 @@ export default { ...@@ -32,5 +31,14 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.brand { .brand {
width: 15.83vw; width: 15.83vw;
.title-icon {
font-weight: 500;
font-size: 10px;
color: #ffffff;
.title-bg {
background-image: linear-gradient(90deg, #003f57 0%, #111056 54%, #071735 100%);
padding-left: 0.83vw;
}
}
} }
</style> </style>
...@@ -61,10 +61,11 @@ function getBarOptions(obj, colorList) { ...@@ -61,10 +61,11 @@ function getBarOptions(obj, colorList) {
// }, // },
itemStyle: { itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角 barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) { color: function (params) {
// var colorItem = [] // var colorItem = []
return new echarts.graphic.LinearGradient( return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
0, 0, 0, 1, [{ // 代表渐变色从正上方开始 {
// 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色 offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: colorList[0] color: colorList[0]
}, // 柱图渐变色 }, // 柱图渐变色
...@@ -75,8 +76,8 @@ function getBarOptions(obj, colorList) { ...@@ -75,8 +76,8 @@ function getBarOptions(obj, colorList) {
{ {
offset: 1, // 指100%处的颜色 offset: 1, // 指100%处的颜色
color: colorList[2] color: colorList[2]
}] }
) ])
} }
}, },
barWidth: '35%', barWidth: '35%',
...@@ -170,21 +171,21 @@ function getBarReverseOptions(obj, colorList) { ...@@ -170,21 +171,21 @@ function getBarReverseOptions(obj, colorList) {
padding: [0, 2, 2, 4], padding: [0, 2, 2, 4],
lineHeight: 16 lineHeight: 16
} }
},
barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function (params) {
// var colorItem = []
return {
colorStops: [{
offset: 0.3, // 颜色的开始位置
color: colorList[0] // 0% 处的颜色
},
{
offset: 0.6, // 颜色的结束位置
color: colorList[1] // 100% 处的颜色
}]
}
} }
},
barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) {
// var colorItem = []
return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: colorList[0]
}, // 柱图渐变色
{
offset: 1, // 指100%处的颜色
color: colorList[1]
}]
)
} }
}, },
data: value.map(item => item.value) data: value.map(item => item.value)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!