Version
5.5.0
Link to Minimal Reproduction
Steps to Reproduce
Open the codesandbox and you will see the abnormal behavior.
Current Behavior
Right two columns won't show second series' information(in green color). When I set the x axis range bigger like 0-10 or remove the range, the missing two green series come back.
Expected Behavior
All five column should have two stack bars because there is no 0 in given 2 series.
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
2条答案
按热度按时间uqdfh47h1#
API for stack says "Name of stack. On the same category axis".
Your xAxis type is 'value' (not 'category') and therefore bars are not stacked, and some are hidden by others and do not show up. Demo fix
dba5bblo2#
Thanks for giving the catetory type solution! My original intention is to use stack on value type axis, and the example I gave simplified. I found there are already several related issu: #15102#16765#7937 .
My real application takes in dataset from scientific instrument whose x axis is in at least 4-digit decimal, so imputating the missing value might not be very ideal but is a great workaround.