-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bar stacking doesn't work if the x-axis is value type instead of category type #15102
Comments
Hi! We've received your issue and please be patient to get responded. 🎉 In the meanwhile, please make sure that it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so. A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster. You may also check out the API and chart option to get the answer. If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question. If you are interested in the project, you may also subscribe our mailing list. Have a nice day! 🍵 |
This is very lightly mentioned in the series-bar documentation, but should definitely be more prominent. |
Some fields like grade of the student are numeric. What I see with bar charts is that they work great with category axis type and the data being string. If it is value type and/or numeric data then there are challenges. Any reason for limiting the full bar chart capabilities for value type and numeric data? |
+1 for needing stacking on a value axis. Biggest problem for me with this is missing values - there may be parts of your x-axis where none of your series have any observations. It's a pain to have to iterate through the dataset and prepare it so that it shows missing data. For example: series1 = [
[3, 10],
[4, 13],
[5, 16],
[8, 21]
]
series2 = [
[3, 15],
[4, 17],
[5, 21],
[8, 23]
] Using a The current workaround for this would be to iterate through each of these series, see which x values are missing, and recreate the data so that 6 and 7 are included as rows in each dataset. One approach that might work is to treat this situation in the same way as a histogram:
|
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue. |
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks! |
Version
5.1.1
Steps to reproduce
Use the following in the editor
What is expected?
I expected to see a stacked bar chart.
What is actually happening?
It shows only one of the two series.
Just change the type from 'value' to 'category' for xAxis and everything is good.
The text was updated successfully, but these errors were encountered: