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

柱状图整体宽度调整

parent 6123d953
...@@ -274,6 +274,8 @@ export default { ...@@ -274,6 +274,8 @@ export default {
grid: { grid: {
containLabel: true, containLabel: true,
top: "10%", top: "10%",
left: "1%",
right: "1%",
bottom: '0' bottom: '0'
}, },
yAxis: { yAxis: {
...@@ -305,6 +307,8 @@ export default { ...@@ -305,6 +307,8 @@ export default {
grid: { grid: {
containLabel: true, containLabel: true,
top: "10%", top: "10%",
left: "1%",
right: "1%",
bottom: '0' bottom: '0'
}, },
yAxis: { yAxis: {
...@@ -336,6 +340,8 @@ export default { ...@@ -336,6 +340,8 @@ export default {
grid: { grid: {
containLabel: true, containLabel: true,
top: "10%", top: "10%",
left: "1%",
right: "1%",
bottom: '0' bottom: '0'
}, },
yAxis: { yAxis: {
...@@ -540,17 +546,20 @@ export default { ...@@ -540,17 +546,20 @@ export default {
getcarShipTrainCss(){ getcarShipTrainCss(){
return { return {
type: 'bar', type: 'bar',
barMinHeight: 1,
xAxisIndex: null, xAxisIndex: null,
smooth: true, smooth: true,
itemStyle:{ 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, // 渐变方向从上到下 0, 0, 0, 1, // 渐变方向从上到下
[ [
{ offset: 0, color: '#83bff6' }, // 柱图顶部颜色 { offset: 0, color: '#83bff6' }, // 柱图顶部颜色
{ offset: 0.5, color: '#188df0' }, // 柱图中间颜色 { offset: 0.5, color: '#188df0' }, // 柱图中间颜色
{ offset: 1, color: '#188df0' } // 柱图底部颜色 { offset: 1, color: '#188df0' } // 柱图底部颜色
] ]
), );
},
borderRadius:[3,3,3,3] , borderRadius:[3,3,3,3] ,
}, },
label:{ label:{
...@@ -559,8 +568,8 @@ export default { ...@@ -559,8 +568,8 @@ export default {
formatter: '{c}吨', formatter: '{c}吨',
color:'#FFFFFF', color:'#FFFFFF',
}, },
barWidth: '30%', barWidth: '40%',
barGap: '10%', barGap: '50%',
emphasis: { emphasis: {
focus: 'series' focus: 'series'
}, },
...@@ -588,8 +597,8 @@ export default { ...@@ -588,8 +597,8 @@ export default {
position:'top', position:'top',
color:'#FFFFFF', color:'#FFFFFF',
}, },
barWidth: '30%', barWidth: '40%',
barGap: '20%', barGap: '50%',
emphasis: { emphasis: {
focus: 'series' focus: 'series'
}, },
...@@ -645,6 +654,7 @@ export default { ...@@ -645,6 +654,7 @@ export default {
} }
}, },
mounted() { mounted() {
let a=0;
setTimeout(() => { setTimeout(() => {
let peopleDom = this.$refs.people; let peopleDom = this.$refs.people;
this.people = echarts.init(peopleDom); 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