codeant-ai-for-open-source[bot] commented on code in PR #43481:
URL: https://github.com/apache/superset/pull/43481#discussion_r3865466441
##########
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/transformProps.ts:
##########
@@ -145,6 +155,13 @@ export default function transformProps(chartProps:
ChartProps<QueryFormData>) {
data: splitRows[i] as DataRecord[],
groupby: combination,
}));
+ // This result *does* carry the rollup levels, so pick out the leaf level
--
+ // the one grouping every dimension, same definition the splitter uses.
+ const leafIndex = levelLabels.findIndex(labels => {
+ const grouped = new Set(labels);
+ return allGroupbyLabels.every(label => grouped.has(label));
+ });
+ colorScaleRows = (splitRows[leafIndex] as DataRecord[]) ?? [];
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Keep conditional-formatting domains based only on leaf/detail rows; do not
include subtotal or rollup values when defining the scale.
**Applied to:**
-
`superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/transformProps.ts`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
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]