kokhlo commented on issue #44466:
URL: https://github.com/apache/superset/issues/44466#issuecomment-5754538730

   Confirmed on master. The legibility floor added for the Auto position 
(`MIN_LABEL_SEGMENT_SIZE_PX`, `transformers.ts:86`, enforced in 
`getAutoBarLabelLayout` at `:163`) is only reachable through the `labelLayout` 
callback, which `transformSeries` spreads solely when `isAutoBarLabel` 
(`transformers.ts:568`, applied at `:609-613`) — i.e. `valueLabelPosition === 
Auto`. The shipped default `OutsideEnd` (`getBarLabelPosition`, `:104`) 
resolves with no `labelLayout` callback at all (pinned by 
`test/Timeseries/transformers.test.ts:424-443`), so near-zero non-zero segments 
next to a large-magnitude outlier keep drawing colliding labels — exactly the 
residual defect after #43178 (zero-only suppression) and #43144 (Auto-only 
floor).
   
   Plan: extend the floor to every bar value label via a suppression-only 
`labelLayout` callback for bar series that are not on Auto — hide through the 
same `HIDDEN_LABEL_LAYOUT` (`fontSize: 0`) mechanism when the segment extent 
drops below `MIN_LABEL_SEGMENT_SIZE_PX`, return an empty layout otherwise so 
the configured `OutsideEnd`/inside placement is untouched. This reuses the 
existing data plumbing of `createAutoBarLabelLayout` and adds unit tests for 
`OutsideEnd`/`InsideCenter` with sub-16px segments.
   
   I'd like to implement this myself — PR within the hour.


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