Commit c65a285b authored by 谢章伟's avatar 谢章伟

柱状图整体宽度调整

parent 6123d953
......@@ -274,6 +274,8 @@ export default {
grid: {
containLabel: true,
top: "10%",
left: "1%",
right: "1%",
bottom: '0'
},
yAxis: {
......@@ -305,6 +307,8 @@ export default {
grid: {
containLabel: true,
top: "10%",
left: "1%",
right: "1%",
bottom: '0'
},
yAxis: {
......@@ -336,6 +340,8 @@ export default {
grid: {
containLabel: true,
top: "10%",
left: "1%",
right: "1%",
bottom: '0'
},
yAxis: {
......@@ -540,17 +546,20 @@ export default {
getcarShipTrainCss(){
return {
type: 'bar',
barMinHeight: 1,
xAxisIndex: null,
smooth: true,
itemStyle:{
color: new echarts.graphic.LinearGradient(
color: function (params) {
return params.value==0?'rgba(0, 0, 0, 0)':new echarts.graphic.LinearGradient(
0, 0, 0, 1, // 渐变方向从上到下
[
{ offset: 0, color: '#83bff6' }, // 柱图顶部颜色
{ offset: 0.5, color: '#188df0' }, // 柱图中间颜色
{ offset: 1, color: '#188df0' } // 柱图底部颜色
]
),
);
},
borderRadius:[3,3,3,3] ,
},
label:{
......@@ -559,8 +568,8 @@ export default {
formatter: '{c}吨',
color:'#FFFFFF',
},
barWidth: '30%',
barGap: '10%',
barWidth: '40%',
barGap: '50%',
emphasis: {
focus: 'series'
},
......@@ -588,8 +597,8 @@ export default {
position:'top',
color:'#FFFFFF',
},
barWidth: '30%',
barGap: '20%',
barWidth: '40%',
barGap: '50%',
emphasis: {
focus: 'series'
},
......@@ -645,6 +654,7 @@ export default {
}
},
mounted() {
let a=0;
setTimeout(() => {
let peopleDom = this.$refs.people;
this.people = echarts.init(peopleDom);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment