schizophrenicmaniac opened a new pull request, #45529:
URL: https://github.com/apache/superset/pull/45529

   ### SUMMARY
   The bar label legibility floor added in #43144 and extended to manual 
positions in #44469 hides any value label whose own segment is under 16px on 
the value axis. It was meant for thin stacked segments, where the label 
collides with the neighboring segment's label (#44466). But it was applied to 
every bar series, which caused two regressions from 6.1.0:
   
   1. Non-stacked bars with a small value (e.g. 1 or 0 next to 2,300) lost 
their label, even though the outside label has nothing next to it.
   2. Stack totals were checked against the height of the topmost series' 
segment, so a thin top slice hid the total of an otherwise tall bar.
   
   The floor now only applies to labels on stacked segments that aren't totals. 
For non-stacked bars with Auto, the fit check moves a label that doesn't fit 
just past the end of the bar. Manual positions on non-stacked bars no longer 
get the layout callback at all. Stack totals are always drawn just past the end 
of the stack (top, or right for horizontal bars), with no layout callback, like 
6.1.0. Labels on individual stacked segments keep the floor, so the #44466 fix 
is unchanged.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Still to be added: screenshots from a local master deployment of both cases 
from the issue, before and after.
   
   ### TESTING INSTRUCTIONS
   1. Create a Bar Chart with a categorical dimension, one metric, no stacking 
and "Show value" on, using data like `[2300, 1500, 400, 75, 1]` (and one row 
with `0`). Try it both vertical and horizontal.
   2. Check that the `1` and `0` bars show their labels with Auto and with 
every manual "Bar label position" option.
   3. Create a Bar Chart with a temporal x-axis, two or more metrics, stacking 
on and "Show value" on (totals only), where the top series is a thin slice of 
each bar, e.g. `[600, 100, 20]` per period.
   4. Check that every bar shows its total above the stack (or to the right 
when horizontal), with both Auto and Outside End.
   5. With stacking on and "Show value" showing per-segment values, check that 
labels on very thin stacked segments are still hidden as before.
   
   Unit tests: `npx jest plugins/plugin-chart-echarts/test/Timeseries`
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #45470
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
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