echart中x的0位置出现柱子宽度被裁掉一部分的问题
series: [{name: "柱子名称",type: "bar",yAxisIndex: 0,barWidth: 10,color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#1B7AEB" },{ offset: 1, color: "#1B7AEB00" },]),clip: false, // 禁止坐标系裁剪barMinHeight: 10,// 防止完全消失itemStyle: {width: (params) => params.value === '00:00' ? '100%' : null,normal: {barBorderRadius: [20, 20, 0, 0], // 左上,右上,右下,左下},},data: data,},],
重点代码!!!
clip: false, // 禁止坐标系裁剪barMinHeight: 10,// 防止完全消失itemStyle: {width: (params) => params.value === '00:00' ? '100%' : null,},
效果: