关于echart柱形图的使用问题

关于一个数据对应两个值的问题

 1 series: [{
 2             name: '数量(个)',
 3             type: 'bar',
 4             barWidth: '30%',
 5              barGap: 0, //两个数据条没有间距
 6             data: y_data,
 7             itemStyle: {
 8                 normal: {
 9                     color: '#39b3f7',
10                     barBorderRadius: [10, 10, 0, 0],
11                     label: {
12                         textStyle: {
13                             color: '#666'
14                         },
15                         position: 'bottom',
16                         formatter: '{b}'
17                     }
18                 }
19             }
20         }, {
21             name: '数量(个)',
22             type: 'bar',
23             barWidth: '30%',
24              barGap: 0,  //两个数据条没有间距
25             data: y_data_two,
26             itemStyle: {
27                 normal: {
28                     color: '#306494',
29                     barBorderRadius: [10, 10, 0, 0],
30                     label: {
31                         textStyle: {
32                             color: '#666'
33                         },
34                         position: 'bottom',
35                         formatter: '{b}'
36                     }
37                 }
38             }
39         }]
原文地址:https://www.cnblogs.com/fanlijin/p/9473071.html