You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ApexCharts v4.4.0, the hideZeroBarsWhenGrouped option does not work correctly when horizontal: false (i.e., vertical bar chart) if zero values appear in the middle of the dataset. However, when horizontal: true, it works as expected.
Steps to Reproduce
Create a bar chart with horizontal: false
Use hideZeroBarsWhenGrouped: true
Include multiple series where some bars have y: 0 in the middle of the dataset
Observe that zero-value bars in the middle are still displayed
When hideZeroBarsWhenGrouped: true, all zero-value bars should be hidden, regardless of their position in the datase
Actual Behavior
Horizontal (horizontal: true) → Zero-value bars are correctly hidden(Works as expected) ✅
Vertical (horizontal: false) → Zero-value bars in the middle of the dataset are still visible(Bug: hideZeroBarsWhenGrouped is ignored for middle values) ❌
Zero-value bars at the beginning or end of the dataset may be hidden, but any zero values appearing between non-zero values remain visible unexpectedly.
Thank you for your quick response! Perhaps I wasn't able to explain the issue clearly enough. To clarify, in the attached screenshots, the empty spaces in the chart actually represent zero-value bars that are still being rendered, even though hideZeroBarsWhenGrouped: true is enabled.
This behavior specifically occurs in vertical bar charts (horizontal: false). While zero-value bars at the beginning or end of the dataset might be hidden, those appearing in the middle remain visible, creating unintended gaps. However, in horizontal bar charts (horizontal: true), zero-value bars are correctly hidden as expected.
Would you mind taking another look at the screenshots to see if this aligns with what I’m describing? I appreciate your time and help in understanding whether this is expected behavior or a potential issue.
Description
In ApexCharts v4.4.0, the
hideZeroBarsWhenGrouped
option does not work correctly whenhorizontal: false
(i.e., vertical bar chart) if zero values appear in the middle of the dataset. However, whenhorizontal: true
, it works as expected.Steps to Reproduce
horizontal: false
hideZeroBarsWhenGrouped: true
y: 0
in the middle of the datasetExample:
Expected Behavior
hideZeroBarsWhenGrouped: true
, all zero-value bars should be hidden, regardless of their position in the dataseActual Behavior
horizontal: true
) → Zero-value bars are correctly hidden (Works as expected) ✅horizontal: false
) → Zero-value bars in the middle of the dataset are still visible (Bug:hideZeroBarsWhenGrouped
is ignored for middle values) ❌Screenshots
hideZeroBarsWhenGrouped: true
)hideZeroBarsWhenGrouped: true
)Reproduction Link
You can test the issue using this CodePen example: https://codepen.io/Cemil-Tan/pen/gbOYqGG
The text was updated successfully, but these errors were encountered: