| | |
| | | ); |
| | | }); |
| | | |
| | | let colors = ["#91CC75", "#5470C6"]; |
| | | let colors = ['#2eadd6', '#FFA500']; |
| | | |
| | | const seriesData = []; |
| | | for (let i = 0; i < newval.length; i++) { |
| | |
| | | value: newval[i][j], |
| | | itemStyle: { |
| | | normal: { |
| | | barBorderRadius: borderRadius, // 设置圆角 |
| | | // barBorderRadius: borderRadius, // 设置圆角 |
| | | color: colors[i], |
| | | } |
| | | }, |
| | |
| | | name: seriesName, |
| | | type: "bar", |
| | | stack: "总量", |
| | | barWidth: 60, |
| | | data: curSeriesData, |
| | | label: { |
| | | show: true, |
| | | position: 'top' |
| | | position: 'top', |
| | | formatter: function (params) { |
| | | return params.value === 0 ? '' : params.value; // 值为 0 不显示,其他情况显示 |
| | | } |
| | | }, |
| | | emphasis: { |
| | | focus: "series", |