You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/04/30 14:02:13 UTC
Re: [PR] feat(pie): add the ability to make half a donut [superset]
rusackas commented on PR #35459:
URL: https://github.com/apache/superset/pull/35459#issuecomment-4353101363
Thanks for iterating on this @SBIN2010. A few things still need addressing before I can approve:
**Design question**: now that `start_angle` and `swept_angle` controls exist, is the separate `half` boolean still needed? It feels redundant — half-donut is just `start_angle: 180, swept_angle: 180`. I'd lean toward dropping `half` and relying on the angle controls alone (with sensible defaults), which avoids the dual-codepath padding logic below.
**Code issues flagged by review bots that look legitimate**:
1. `transformProps.ts:107` — codeant-ai flagged a division-by-zero: `chartPadding` divided by `height`/`width` with no guard. Worth an early return / safe default when dimensions are non-positive.
2. `transformProps.ts:111` — bito flagged that the `if (half)` block sets `padding.top`, then the subsequent `if (chartPadding.top)` block overwrites it. Need to consolidate so only one path sets the final value.
3. Control names `start_angle`/`swept_angle` (snake_case) don't match `DEFAULT_FORM_DATA.startAngle`/`sweptAngle` (camelCase). Defaults likely won't apply correctly — please align the casing.
4. The new control descriptions ("Angle at which to start progress axis", "axis of progress rotates") look copy-pasted from the gauge chart. Could you reword them for pie/donut semantics?
5. Worth adding clamping/validation on the angles (negatives, >360, swept ≤ 0) before passing to ECharts.
A quick test for the new transform logic would also help.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org