1.label位置
data: [
{
name:"民間投資",
value:-4,
label:{position:"right"}
},{
name:"工業(yè)投資",
value:2,
label:{position:"left"}
},{
運行結(jié)果
2.柱形寬度
series: [
{
type: 'bar',
data: [],
barWidth: 15,
3.柱狀圖每列顏色不同
4.自定義柱形圖樣式
https://jingyan.baidu.com/article/fea4511a151747f7bb91251f.html
5.柱形圖各參數(shù)
6.消除多列柱形圖間隙
7.柱形圖背景
https://blog.csdn.net/qq_41694696/article/details/80077896
等寬背景圖
https://echarts.apache.org/examples/zh/editor.html?c=bar-background
https://echarts.apache.org/examples/zh/editor.html?c=doc-example/barGrid-barGap
https://gallery.echartsjs.com/editor.html?c=xkZFtowaDl
color: 'rgba(255, 255, 255, 0.14)' //rgba設(shè)置透明度0.14
運行結(jié)果
{
name: '背景',
type: 'bar',
// xAxisIndex: 1,
data: [100, 100, 100, 100, 100,],
itemStyle: {
normal: {
color: 'rgba(102, 102, 102,0.5)'
}
},
barWidth: 40,
zlevel: -1
},
8.柱形圖顏色
https://blog.csdn.net/weixin_43798882/article/details/89848153
series: [
{
type: 'bar',
// barWidth: 30,
data,
barWidth: 20,
itemStyle: {
normal: {
//好幽崩,這里就是重頭戲了,定義一個list图张,然后根據(jù)所以取得不同的值皂贩,這樣就實現(xiàn)了寒砖,
color: function (params) {
// let data = params.data
return params.data.color
},