-
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
Cannot stack bars on time x-axis #7937
Comments
Switching x-axis type to 'category' solved the problem. But unsure why issue only arose after version upgrade from 4.0.2 to 4.0.4. |
Reopened because I need to use time for x-axis 😞 |
I have the same problem, stacked bar chart with time x-axis worked in 4.0.2 but not until 4.0.3. |
Currently, In fact, we've been considering whether support @ClaraMedopad Could I have the detailed reason that why the |
In my case I use it to visualise medication adherence, i.e. how many tablets a patient has taken out of the total per day. I want to have an overview of the continuous data, i.e. if the medication is stopped or not required for the day, a gap will be shown in the bar chart. Example in the above screenshot, 2017-08-05 and 2017-08-07 does not show because no medication is prescribed, but it will be helpful to visualise that to the doctor. A bar chart is used in this case to visualise the percentage completion of the daily dosage. I cannot think of alternative ways to display it other than stacked bar on time axis so any advice is welcomed. |
Same issue, I need to stack registrations of different types at different dates, and categories doesn't work since some days are empty and should still appear. |
our use-case is almost like the Confidence Band example, but:
any ideas for a workaround? e.g.
|
@100pah: will it be simpler to support only a special case and not the general case to stack 2 different series (which may have data-samples at different time-stamps)? e.g. when you have measurement data, you often need to display the min and max values of a series (instead of just e.g. the average) to avoid aliasing: e.g. in the screenshot below we have one such series (1) is the maximum and (2) is the minimum: so each of the samples have a time-stamp and they always have min and max: |
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. |
+1 don't close |
+1, we need stacking with x-axis type |
+1, I assume same solution to #15102 |
+1 Still broken, we're interested to use stacked bar with time. |
Has something changed that makes this slightly more supported now or are there still limitations on stacking on a time axis? When I try the options provided by the original poster, it looks like it might be properly stacked now. |
It seems this still does not work for time, value, and log. :-( |
@helgasoft So this issue can be then closed? |
It works with your specific data which has all values for all series. I changed a single character (the last datapoint) and here's the incorrect result. |
yes @gggdomi. And "incorrect results" are due to missing values which could/should be fixed by data preprocessing. FAQ: ECharts axis typesECharts has four axis types available - value, category, time and log.
Character data are naturally discrete and can only be represented on a category axis. All axis types allow for missing data, but present them differently. For instance Log axis is not suitable for stacked charts. A stacked chart relies on a linear axis to show proportions, but log axis is not linear. |
@helgasoft thanks for your answer, even if I politely disagree. I guess this issue can indeed be closed, in favor of #20254 which is cleaner. |
One-line summary [问题简述]
Stacked bar charts collapsed since 4.0.3. See screenshot.
Version & Environment [版本及环境]
Expected behaviour [期望结果]
Bars able to stack on top of each other without overflowing issues.
ECharts option [ECharts配置项]
Other comments [其他信息]
The text was updated successfully, but these errors were encountered: