codeant-ai-for-open-source[bot] commented on code in PR #43088:
URL: https://github.com/apache/superset/pull/43088#discussion_r4073350167
##########
superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts:
##########
@@ -347,18 +347,27 @@ export default function transformProps(
}
}
- const labelMap = data.reduce((acc: Record<string, string[]>, datum) => {
- const label = extractGroupbyLabel({
- datum,
- groupby: groupbyLabels,
- coltypeMapping,
- timeFormatter: getTimeFormatter(dateFormat),
- });
- return {
- ...acc,
- [label]: groupbyLabels.map(col => datum[col] as string),
- };
- }, {});
+ const labelMap = data.reduce(
+ (acc: Record<string, string[] | string[][]>, datum) => {
+ const label = extractGroupbyLabel({
+ datum,
+ groupby: groupbyLabels,
+ coltypeMapping,
+ timeFormatter: getTimeFormatter(dateFormat),
+ });
+ return {
+ ...acc,
+ [label]: groupbyLabels.map(col => datum[col] as string),
+ };
+ },
+ {},
+ );
+
+ if (otherDatum && otherRows.length > 0) {
+ labelMap[otherDatum.name] = otherRows.map(row =>
+ groupbyLabels.map(col => row[col] as string),
+ );
+ }
Review Comment:
✅ **CodeAnt verified this suggestion was addressed in subsequent commits and
marked this thread resolved** as of `d90cd6b`.
The aggregated rows are now stored in `labelMap` under a collision-safe
`__other__${otherDatum.name}` key instead of the rendered label, and selection
opacity checks use the same disambiguated key.
<sub>If that's not right, unresolve this thread and CodeAnt will leave it
open.</sub>
<!-- codeant-auto-resolve-reply -->
--
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]