echarts
echarts copied to clipboard
Space between bars.
Can't current version support to remove space between bars when some value is 0? https://ecomfe.github.io/echarts-examples/public/editor.html?c=dataset-series-layout-by&theme=light
In corner cases, we would get this chart.
This is not supported yet. We will have a further discussion about this feature.
Thanks, @Ovilia, @100pah .
This should also apply to when the value is null. There can be instances where you would want a 0 value to be shown as well but null I guess should always be hidden.
I need this exact feature in one of my projects, where some data values do not exist for all categories. then to reoccur later in the series. Really glad to see that it is allready reported.
Thanks @geekboy0801 @Ovilia @100pah
@TobiasSvenberg I understand. But this feature is not so easy to implement. We will work on this but please understand that you may not have this feature very quickly.
@Ovilia I under stand that π No problem, I can work around it. This would be a great addition to a great library though. Thanks for letting me know π
Hey, yes, it will be great if this feature is implemented! Maybe, are there some workarounds on this issue for now, that don't have annoying spaces?
Create a custom series, which you can control each bar like this one.
Currently, there is no easy way to make the categories to be of different width. Further discussion required.
We need more scenarios to state why this feature requested is necessary.
I think there are some pretty common scenarios which exactly require this feature. Here some examples when thinking about displaying car sales in a bar chart:
-
Displaying the number of sold cars per manufacturer and year. There will be manufacturers which don't have car sales in every year since they didn't exist at that time or already went bankrupt. So you don't want that the space is preserved for them since there are some fluctuations over the years and otherwise the chart would look really scattered and not very readable.
-
Displaying the number of sold cars per manufacturer and model. Obviously, each manufacturer has a different number of models and each model is unique per manufacturer.
Please note, these are just hypothetical scenarios and the amount of data displayed in a single chart might be too big, but you can easily adjust it by only displaying the top 10 per series. I'm also aware, that in some cases stacked bars might be a valid workaround, but often they are not serving the purpose. These examples should just show that it is pretty common to have varying categories over multiple series.
In general, I think it is a highly beneficial feature to have the option to configure to don't preserve space for bars which don't have any data.
Good afternoon. Any news 'bout this issue?
Good afternoon. Any news 'bout this issue?
I am developing an app and I use Echarts for charts. I faced this issue aswell and it is a big burden for real scenarios, making the chart unusable when there are more than just a few columns (and even if they are few, its really ugly).
The chart becomes unusable and unreadable when enough bars get added to it.
The image that @geekboy0801 used a year ago is a really close scenario to what I end up facing many times.
This library is great and I'd love to see this issue sorted out.
I also encountered this kind of problem. How did you solve itοΌ
This is a real problem for me. I have very sparse data
I used a horizontal stacked chart, this is the only solution that meets my business requirements
Has there been any progress or a workaround for this issue? This feature is crucial for my company's web application.
There is a reason why this "feature" is not implemented. Because there are two "pick-your-poison" options.
A) - consistent xAxis with variable-width bars
B) - inconsistent xAxis with constant-width bars
Some people may find B acceptable, but I doubt other charting libraries are supporting it. Examples are welcome. UPDATE: option B has been solved, see reference below.
@ahmadshkour solution is good - stacked bars for both consistent axis and bar width. The only disadvantage is that bar comparison is difficult. But this can be remediated by adding a stack toolbar button. Then the user can quickly switch between stacked and non-stacked bars for comparison.
Also meet the same problem. Still waiting news...
@qhsong, this has been solved - see Demo Code in #19250
Thanks a lot,I will try this code.
On Tue, Feb 20, 2024 at 03:04 helgasoft @.***> wrote:
@qhsong https://github.com/qhsong, this has been solved - see Demo Code in #19250 https://github.com/apache/echarts/issues/19250
β Reply to this email directly, view it on GitHub https://github.com/apache/echarts/issues/9899#issuecomment-1953032738, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABS4FC2W6373YZERMTOTMXDYUOO2XAVCNFSM4GWLLRQKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVGMYDGMRXGM4A . You are receiving this because you were mentioned.Message ID: @.***>