echarts阴影连接的堆积柱形图
时间: 2023-07-09 16:13:49 浏览: 164
您可以通过设置 `series` 中的 `itemStyle` 来实现阴影连接的堆积柱形图。具体步骤如下:
1. 设置 `series` 类型为 `bar`,并开启堆积模式。
```javascript
series: [{
type: 'bar',
stack: 'stack',
// ...
}]
```
2. 在 `itemStyle` 中设置 `barBorderColor` 和 `barBorderWidth`。
```javascript
itemStyle: {
barBorderColor: 'transparent',
barBorderWidth: 2,
// ...
}
```
3. 在 `emphasis` 中设置 `barBorderColor` 和 `barBorderWidth` 以及阴影样式。
```javascript
emphasis: {
itemStyle: {
barBorderColor: '#fff',
barBorderWidth: 2,
shadowBlur: 10,
shadowColor: 'rgba(0, 0, 0, 0.3)',
shadowOffsetX: 0,
shadowOffsetY: 0
}
}
```
其中,`barBorderColor` 和 `barBorderWidth` 用于设置柱形图的边框颜色和宽度;`shadowBlur`、`shadowColor` 和 `shadowOffset` 用于设置柱形图的阴影样式。