[Dashboards] add primary axis select gap fill for bar and line charts#17098
[Dashboards] add primary axis select gap fill for bar and line charts#17098
Conversation
…-options-improvement
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
1 issue found across 11 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/twenty-front/src/modules/page-layout/widgets/graph/utils/fillSelectGapsInTwoDimensionalChartData.ts">
<violation number="1" location="packages/twenty-front/src/modules/page-layout/widgets/graph/utils/fillSelectGapsInTwoDimensionalChartData.ts:33">
P1: Key collision vulnerability: Using underscore concatenation for Map keys can cause data corruption when dimension values contain underscores. Use JSON.stringify for reliable key generation.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| | null; | ||
| uniqueSecondDimensionValues.add(secondDimensionValue); | ||
|
|
||
| const key = `${String(primaryDimensionValue)}_${String(secondDimensionValue)}`; |
There was a problem hiding this comment.
P1: Key collision vulnerability: Using underscore concatenation for Map keys can cause data corruption when dimension values contain underscores. Use JSON.stringify for reliable key generation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/twenty-front/src/modules/page-layout/widgets/graph/utils/fillSelectGapsInTwoDimensionalChartData.ts, line 33:
<comment>Key collision vulnerability: Using underscore concatenation for Map keys can cause data corruption when dimension values contain underscores. Use JSON.stringify for reliable key generation.</comment>
<file context>
@@ -0,0 +1,52 @@
+ | null;
+ uniqueSecondDimensionValues.add(secondDimensionValue);
+
+ const key = `${String(primaryDimensionValue)}_${String(secondDimensionValue)}`;
+ existingGroupsMap.set(key, item);
+ }
</file context>
| const key = `${String(primaryDimensionValue)}_${String(secondDimensionValue)}`; | |
| const key = JSON.stringify([primaryDimensionValue, secondDimensionValue]); |
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:1686 This environment will automatically shut down when the PR is closed or after 5 hours. |
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/transformGroupByDataToLineChartData.ts">
<violation number="1" location="packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/transformGroupByDataToLineChartData.ts:158">
P1: This change breaks gap filling for MULTI_SELECT fields. The original `isFieldMetadataSelectKind()` function checks for both SELECT and MULTI_SELECT types, but the new code only checks for SELECT. This will cause MULTI_SELECT fields to not have gaps filled in charts.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
.../page-layout/widgets/graph/graphWidgetLineChart/utils/transformGroupByDataToLineChartData.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/page-layout/widgets/graph/types/FillSelectGapsResult.ts
Outdated
Show resolved
Hide resolved
charlesBochet
left a comment
There was a problem hiding this comment.
LGTM regarding the code, I've left one nitpick comment, I'm testing locally now
|
Tested the behavior, LGTM, merge when you are ready :) |
...front/src/modules/page-layout/widgets/graph/utils/fillSelectGapsInTwoDimensionalChartData.ts
Outdated
Show resolved
Hide resolved
|
Hey @ehconitin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
1 similar comment
|
Hey @ehconitin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
|
Thanks @ehconitin for your contribution! |

closes twentyhq/core-team-issues#2056
CleanShot.2026-01-12.at.20.29.02.mp4