apache / apache/echarts

Cannot stack bars on time x-axis

Open
#7,937 27 comments 15 reactions 0 assignees View on GitHub
pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### One-line summary [问题简述]

Stacked bar charts collapsed since 4.0.3. See screenshot.

### Version & Environment [版本及环境]
+ ECharts version [ECharts 版本]: 4.0.4
+ Browser version [浏览器类型和版本]: Chrome 64
+ OS Version [操作系统类型和版本]: macOS High Sierra

### Expected behaviour [期望结果]

Bars able to stack on top of each other without overflowing issues.

### ECharts option [ECharts配置项]

```javascript
option = {
grid: {
right: '8%',
left: '8%'
},
xAxis: {
type: 'time',
minInterval: 1000 * 3600 * 24
},
yAxis: {
type: 'value',
min: 0,
max: 100,
name: '%'
},
series: [
{
type: 'bar',
stack: 'adherence',
data: [{
value: ['2018-02-21', 6, 2, 33, 67]
}],
encode: { x: 0, y: 3 },
barMaxWidth: 25,
barCategoryGap: '50%',
cursor: 'auto',
itemStyle: {
normal: {
color: 'red',
opacity: 0.5
}
}
},
{
type: 'bar',
stack: 'adherence',
data: [{
value: ['2018-02-21', 6, 2, 33, 67]
}],
encode: { x: 0, y: 4 },
barMaxWidth: 25,
barCategoryGap: '50%',
cursor: 'auto',
itemStyle: {
normal: {
color: 'green',
opacity: 0.5
}
}
}],
dataZoom: {
type: 'slider',
showDataShadow: false
}
}
```

### Other comments [其他信息]

![screen shot 2018-03-14 at 14 44 01](https://user-images.githubusercontent.com/36439799/37409504-657fb018-2796-11e8-8b32-34717e6d275d.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.