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

   <!-- Greeting -->
   Hi @lantushenko-alex! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m 
helping the superset team.
   
   <!-- Answer -->
   This is a known limitation in Superset 6.0.0: the number format you set for 
radar charts is applied to chart labels, but not to tooltip values. The root 
cause is that the tooltip rendering logic (`renderNormalizedTooltip` in 
`superset-frontend/plugins/plugin-chart-echarts/src/Radar/utils.ts`) inserts 
raw metric values into the tooltip HTML without applying the number formatter, 
unlike the chart labels which do use the formatter via `formatLabel` in 
`transformProps.ts` 
[reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Radar/transformProps.ts#L53-L354)
 
[reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Radar/utils.ts#L53-L92).
   
   There’s no built-in UI workaround for this. To fix it, you’d need to update 
the tooltip rendering code to apply the number formatter to each value before 
rendering. This pattern of inconsistent tooltip formatting has also been 
reported in other chart types (like mixed, line, and pie charts) and is 
recognized as a regression in recent versions 
[example](https://github.com/apache/superset/issues/35909) 
[example](https://github.com/apache/superset/issues/33757).
   
   If you want to patch this, look at how `numberFormatter` is used for chart 
labels and apply it to the tooltip values in `renderNormalizedTooltip`. There’s 
currently no merged fix for radar chart tooltips.
   
   
   <!-- 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/863debfd-be56-4690-91de-f6ca4104bd21?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/863debfd-be56-4690-91de-f6ca4104bd21?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/863debfd-be56-4690-91de-f6ca4104bd21?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/863debfd-be56-4690-91de-f6ca4104bd21?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/863debfd-be56-4690-91de-f6ca4104bd21?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/863debfd-be56-4690-91de-f6ca4104bd21?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/863debfd-be56-4690-91de-f6ca4104bd21?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%20limitation%20in%20Superset%206.0.0%3A%20the%20number%20format%20you%20set%20for%20radar%20charts%20is%20applied%20to%20chart%20labels%2C%20but%20not%20to%20tooltip%20values.%20The%20root%20cause%20is%20that%20the%20tooltip%20rendering%20logic%20%28%60renderNormalizedTooltip%60%20in%20%60superset-frontend/plugins/plugin-chart-echarts/src/Radar/utils.ts%60%29%20inserts%20raw%20metric%20values%20into%20the%20tooltip%20HTML%20without%20applying%20the%20number%20formatter%2C%20unlike%20the%20chart%20labels%20which%20do%20use%20the%20formatter%20via%20%60formatLabel%60%20in%20%60transformProps.ts%60%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/p
 
lugin-chart-echarts/src/Radar/transformProps.ts%23L53-L354%29%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Radar/utils.ts%23L53-L92%29.%0A%0AThere%E2%80%99s%20no%20built-in%20UI%20workaround%20for%20this.%20To%20fix%20it%2C%20you%E2%80%99d%20need%20to%20update%20the%20tooltip%20rendering%20code%20to%20apply%20the%20number%20formatter%20to%20each%20value%20before%20rendering.%20This%20pattern%20of%20inconsistent%20tooltip%20formatting%20has%20also%20been%20reported%20in%20other%20chart%20types%20%28like%20mixed%2C%20line%2C%20and%20pie%20charts%29%20and%20is%20recognized%20as%20a%20regression%20in%20recent%20versions%C2%A0%5Bexample%5D%28https%3A//github.com/apache/superset/issues/35909%29%C2%A0%5Bexample%5D%28https%3A//github.com/apache/superset/issues/33757%29.%0A%0AIf%20you%20want%20to%20patch%20this%2C%20look%20at%20how%20%60numberFormatter%60%20is%20used%20for%20chart%
 
20labels%20and%20apply%20it%20to%20the%20tooltip%20values%20in%20%60renderNormalizedTooltip%60.%20There%E2%80%99s%20currently%20no%20merged%20fix%20for%20radar%20chart%20tooltips.)&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/36978)


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