dosubot[bot] commented on issue #37074:
URL: https://github.com/apache/superset/issues/37074#issuecomment-3742573205

   <!-- Greeting -->
   Hi @silasdoehler! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping 
the superset team.
   
   <!-- Answer -->
   This is a known issue with Superset's Table Chart when using Time Comparison 
and hiding columns or collapsing groups: the group headers can become 
misaligned or display incorrect names. The root cause is that the logic for 
grouping and rendering headers relies on substring operations and column 
indices, which can break when only a subset of comparison columns is visible. 
This leads to the header labels drifting or duplicating, especially when 
columns are hidden or reordered.
   
   A recent fix (PR #35968) improved header alignment and accessibility by 
introducing better header ID generation and grouping, but it doesn't fully 
resolve cases with duplicate metric labels or complex metric/time-shift 
combinations. There is currently no open issue or PR tracking this specific bug 
with group headers when not all columns are shown or groups are collapsed. As a 
workaround, you can try renaming your metrics to ensure unique labels or use 
custom CSS targeting header IDs to temporarily mitigate the misalignment. For a 
long-term fix, the grouping and header ID logic in the TableChart and DataTable 
components needs to be reviewed for uniqueness and correct mapping. If you can 
provide a minimal reproducible example or more details about your 
configuration, it could help maintainers debug and address the problem more 
effectively.
   
   References:  
   - [Discussion of the root cause and 
workaround](https://github.com/apache/superset/issues/36185#issuecomment-3596243791)
  
   - [Relevant code logic in 
TableChart.tsx](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx#L308-L697)
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/354db286-f3a9-44a4-a895-e8726788afe7?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/354db286-f3a9-44a4-a895-e8726788afe7?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/354db286-f3a9-44a4-a895-e8726788afe7?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/354db286-f3a9-44a4-a895-e8726788afe7?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/354db286-f3a9-44a4-a895-e8726788afe7?feedback_type=hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/354db286-f3a9-44a4-a895-e8726788afe7?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/354db286-f3a9-44a4-a895-e8726788afe7?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20issue%20with%20Superset%27s%20Table%20Chart%20when%20using%20Time%20Comparison%20and%20hiding%20columns%20or%20collapsing%20groups%3A%20the%20group%20headers%20can%20become%20misaligned%20or%20display%20incorrect%20names.%20The%20root%20cause%20is%20that%20the%20logic%20for%20grouping%20and%20rendering%20headers%20relies%20on%20substring%20operations%20and%20column%20indices%2C%20which%20can%20break%20when%20only%20a%20subset%20of%20comparison%20columns%20is%20visible.%20This%20leads%20to%20the%20header%20labels%20drifting%20or%20duplicating%2C%20especially%20when%20columns%20are%20hidden%20or%20reordered.%0A%0AA%20recent%20fix%20%28PR%20%2335968%29%20improved%20header%20alignment%20and%20accessibility%20by%20introducing%20b
 
etter%20header%20ID%20generation%20and%20grouping%2C%20but%20it%20doesn%27t%20fully%20resolve%20cases%20with%20duplicate%20metric%20labels%20or%20complex%20metric/time-shift%20combinations.%20There%20is%20currently%20no%20open%20issue%20or%20PR%20tracking%20this%20specific%20bug%20with%20group%20headers%20when%20not%20all%20columns%20are%20shown%20or%20groups%20are%20collapsed.%20As%20a%20workaround%2C%20you%20can%20try%20renaming%20your%20metrics%20to%20ensure%20unique%20labels%20or%20use%20custom%20CSS%20targeting%20header%20IDs%20to%20temporarily%20mitigate%20the%20misalignment.%20For%20a%20long-term%20fix%2C%20the%20grouping%20and%20header%20ID%20logic%20in%20the%20TableChart%20and%20DataTable%20components%20needs%20to%20be%20reviewed%20for%20uniqueness%20and%20correct%20mapping.%20If%20you%20can%20provide%20a%20minimal%20reproducible%20example%20or%20more%20details%20about%20your%20configuration%2C%20it%20could%20help%20maintainers%20debug%20and%20address%20the%20problem%20more
 
%20effectively.%0A%0AReferences%3A%20%20%0A-%20%5BDiscussion%20of%20the%20root%20cause%20and%20workaround%5D%28https%3A//github.com/apache/superset/issues/36185%23issuecomment-3596243791%29%20%20%0A-%20%5BRelevant%20code%20logic%20in%20TableChart.tsx%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx%23L308-L697%29)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37074)


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