Version
5.4.3
Link to Minimal Reproduction
Steps to Reproduce
- options:
option = {
tooltip: {
trigger: 'axis',
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: {
alignWithLabel: true
}
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: 'Direct',
type: 'bar',
barWidth: '60%',
stack: 'main',
barMinHeight: 4,
data: [0, 52, 200, 334, 390, 330, 220]
},
{
name: 'Direct2',
type: 'bar',
barWidth: '60%',
stack: 'main',
barMinHeight: 4,
data: [0, 52, 200, 334, 390, 330, 220]
}
]
};
Current Behavior
see on Monday is showing the green bar even though Monday has zero 0 values
Expected Behavior
if value is zero, no need for barMinHeight
Environment
- OS: Mac
- Browser: chrome
- Framework: Vue
Any additional comments?
No response
9条答案
按热度按时间13z8s7eq1#
Monday has 0 values
disho6za2#
if you want to 'see' zero value, then do not use barMinHeight
1tu0hz3e3#
let's say I have values stacked of 1000 and 1, the one will not be seen.
but sometimes a zero value appears in other columns
@helgasoft , that was not an answer I expected
1cklez4t4#
let's say I have values stacked of 1000 and 1, the one will not be seen.
All small values will be seen if barMinHeight is set. That's the purpose of it. Demo
kzmpq1sx5#
This confuses users to believe there is a value while its zero (on Monday in the example)
if it is zero, don't show, if it is small, use barMinHeight
k3bvogb16#
if it is zero, don't show, if it is small, use barMinHeight
then use color function - Demo .
b09cbbtk7#
nice, but still it works only on the last declaration.
see this example (I changed the demo you sent me)
lvjbypge8#
We have critical bug, if it help... 🙏
see deferent cases:
dy2hfwbg9#
that's a known bug, still not fixed, see #16565 and #17005
works properly in versions V5.2.2 and below