dpruess commented on issue #30914:
URL: https://github.com/apache/superset/issues/30914#issuecomment-4544511302

   Hi @rusackas @sfirke, I can reproduce the issue described in this thread. It 
still persists in Superset 6.1 and I would like to ask you to reopen it.
   
   As described, in a 100% stacked bar chart with Contribution Mode = Row, 
small segments are silently dropped from the rendering even though the 
underlying data is present and the percentages sum to 100%. **The bug only 
occurs in horizontal orientation** — with vertical bars the same chart on the 
same data renders correctly (see screenshots below).
   
   **Screenshots**
   Vertical (correct) — same data, same config, all segments rendered:
   <img width="2559" height="1087" alt="Image" 
src="https://github.com/user-attachments/assets/cd044b61-ba12-4652-9b97-909393e1552f";
 />
   
   Horizontal (buggy) — visible gaps, bars do not reach 100%:
   <img width="2559" height="1079" alt="Image" 
src="https://github.com/user-attachments/assets/cb3b4bf6-8220-41e6-86b1-4d8d57e848e3";
 />
   
   **Reproducible SQL Query**
   ```sql
   -- Reproducible example for stacked bar chart + contribution mode (row) bug
   -- Each category sums to 1.0 across the 8 response buckets.
   
   WITH survey_data AS (
       SELECT * FROM (VALUES
           ('Market_A', 'freq_1_multiple_per_week',  0.04957923259683993),
           ('Market_A', 'freq_2_once_per_week',      0.11473646865673656),
           ('Market_A', 'freq_3_every_2_weeks',      0.08411398260985987),
           ('Market_A', 'freq_4_once_per_month',     0.07613464543474366),
           ('Market_A', 'freq_5_every_2_3_months',   0.05740424340773429),
           ('Market_A', 'freq_6_less_often',         0.10598774638925428),
           ('Market_A', 'freq_7_never_but_nearby',   0.07463807633186544),
           ('Market_A', 'freq_8_never_no_market',    0.43740560457296596),
   
           ('Market_B', 'freq_1_multiple_per_week',  0.04741191013541650),
           ('Market_B', 'freq_2_once_per_week',      0.14180686001291035),
           ('Market_B', 'freq_3_every_2_weeks',      0.09994411030913514),
           ('Market_B', 'freq_4_once_per_month',     0.08712060362137433),
           ('Market_B', 'freq_5_every_2_3_months',   0.07750892275541255),
           ('Market_B', 'freq_6_less_often',         0.10841262868162947),
           ('Market_B', 'freq_7_never_but_nearby',   0.07689863404222866),
           ('Market_B', 'freq_8_never_no_market',    0.36089633044189300),
   
           ('Market_C', 'freq_1_multiple_per_week',  0.09963048973353685),
           ('Market_C', 'freq_2_once_per_week',      0.22469041737551800),
           ('Market_C', 'freq_3_every_2_weeks',      0.16380472368977445),
           ('Market_C', 'freq_4_once_per_month',     0.12916694024691677),
           ('Market_C', 'freq_5_every_2_3_months',   0.11948047832935614),
           ('Market_C', 'freq_6_less_often',         0.14454744216522220),
           ('Market_C', 'freq_7_never_but_nearby',   0.06277281650916573),
           ('Market_C', 'freq_8_never_no_market',    0.05590669195050987),
   
           ('Market_D', 'freq_1_multiple_per_week',  0.04386839304959836),
           ('Market_D', 'freq_2_once_per_week',      0.13782144517688577),
           ('Market_D', 'freq_3_every_2_weeks',      0.10545432513578293),
           ('Market_D', 'freq_4_once_per_month',     0.12258455519862200),
           ('Market_D', 'freq_5_every_2_3_months',   0.12576791799389650),
           ('Market_D', 'freq_6_less_often',         0.20418835994563772),
           ('Market_D', 'freq_7_never_but_nearby',   0.10411585436455739),
           ('Market_D', 'freq_8_never_no_market',    0.15619914913501930),
   
           ('Market_E', 'freq_1_multiple_per_week',  0.09443057881604648),
           ('Market_E', 'freq_2_once_per_week',      0.21576911140021532),
           ('Market_E', 'freq_3_every_2_weeks',      0.15327581542307758),
           ('Market_E', 'freq_4_once_per_month',     0.13789071873079867),
           ('Market_E', 'freq_5_every_2_3_months',   0.12629513383045002),
           ('Market_E', 'freq_6_less_often',         0.15005139139871865),
           ('Market_E', 'freq_7_never_but_nearby',   0.08464066799736332),
           ('Market_E', 'freq_8_never_no_market',    0.03764658240332997),
   
           ('Market_F', 'freq_1_multiple_per_week',  0.07123371598255984),
           ('Market_F', 'freq_2_once_per_week',      0.15105295755986892),
           ('Market_F', 'freq_3_every_2_weeks',      0.16420179955913214),
           ('Market_F', 'freq_4_once_per_month',     0.11539479946921805),
           ('Market_F', 'freq_5_every_2_3_months',   0.10186332401754646),
           ('Market_F', 'freq_6_less_often',         0.16414613694143945),
           ('Market_F', 'freq_7_never_but_nearby',   0.14727509153225507),
           ('Market_F', 'freq_8_never_no_market',    0.08483217493798008),
   
           ('Market_G', 'freq_1_multiple_per_week',  0.06622545665543873),
           ('Market_G', 'freq_2_once_per_week',      0.13863795548156643),
           ('Market_G', 'freq_3_every_2_weeks',      0.11297744573184368),
           ('Market_G', 'freq_4_once_per_month',     0.10890347312644783),
           ('Market_G', 'freq_5_every_2_3_months',   0.09622365080734895),
           ('Market_G', 'freq_6_less_often',         0.16721524557021544),
           ('Market_G', 'freq_7_never_but_nearby',   0.14809708304228722),
           ('Market_G', 'freq_8_never_no_market',    0.16171968958485172),
   
           ('Market_H', 'freq_1_multiple_per_week',  0.15035999731330770),
           ('Market_H', 'freq_2_once_per_week',      0.24021340746551073),
           ('Market_H', 'freq_3_every_2_weeks',      0.17043573402321976),
           ('Market_H', 'freq_4_once_per_month',     0.12247282115077646),
           ('Market_H', 'freq_5_every_2_3_months',   0.08966118987151522),
           ('Market_H', 'freq_6_less_often',         0.11961309282338696),
           ('Market_H', 'freq_7_never_but_nearby',   0.05120620500071224),
           ('Market_H', 'freq_8_never_no_market',    0.05603755235157094)
       ) AS t(category, response_bucket, share)
   )
   SELECT *
   FROM survey_data
   ORDER BY category, response_bucket;
   ```
   **Chart configuration**
   - Dimension: category
   - Metric: AVG(share)
   - Breakdowns / Series: response_bucket
   - Stacked Style: Stack
   - Contribution Mode: Row
   - Orientation: Horizontal → bug occurs / Vertical → renders correctly
   
   Happy to provide more details, additional screenshots, or test a patch if 
needed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to