Cannot stack bars on time x-axis
See original GitHub issueOne-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配置项]
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 [其他信息]
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Cannot stack bars on time x-axis · Issue #7937 · apache/echarts
Currently, stack is only supported on 'category' axis. In fact, we've been considering whether support stack on 'time' or event 'value' axis, ...
Read more >Stacked bar chart does not show bar values for time series X ...
I have some JSON data which is going to be displayed in a Stacked Bar chart using RechartJS in a ReactJS application.
Read more >Problem with stack bars and X axis label in a Chart
Hi All, In Apex 21.2 Having this chart: Am trying to group by the last 5 years. The problem is that is also...
Read more >Bar Chart Component - Appian 22.3
Multiple series items when stacking is NONE or null produces a set of bars for each categories item - one bar for each...
Read more >Bar Chart - With Stacked Log Y Axis ⋅ Storybook
No Preview. Sorry, but you either have no stories or none are selected somehow. Please check the Storybook config. Try reloading the page....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1, we need stacking with x-axis type
value
Same issue here, I use echarts to visualize memory consumption over time and I stack the memory usages to display the repartition of the overall memory usage. eg: heap memory + off-heap memory = total memory consumed, thus I want to stack series as in the following plot: