dosubot[bot] commented on issue #33757: URL: https://github.com/apache/superset/issues/33757#issuecomment-2966631223
<!-- Greeting --> Hi @fgil-gn! I'm [Dosu](https://go.dosu.dev/dosubot) and Iām helping the superset team. <!-- Answer --> I couldn't find any existing tickets or discussions about this regression. Based on the code, tooltip formatting in line charts is handled in the `transformProps` function for ECharts timeseries charts. The tooltip uses a `formatter` that decides between percent or currency/number formatting depending on flags like `contributionMode`, `isAreaExpand`, and the presence of a currency symbol. If the tooltip always shows a dollar format, it's likely that either `currencyFormat` is being set when it shouldn't be, or the logic for picking the formatter isn't respecting your per-metric or axis format settings. You may want to check if `currencyFormat` is being set in your chart config or if the `forcePercentFormatter` flag is being triggered as expected. The formatter logic is here: [transformProps.ts (tooltip config)](https://github.com/apache/superset/blob/e6af4ea126058052506e5437cbe90f9c5f2192d0/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts) and the relevant formatter selection is: ```js const formatter = forcePercentFormatter ? percentFormatter : (getCustomFormatter(customFormatters, metrics) ?? defaultFormatter); ``` where `defaultFormatter` uses `currencyFormat` if present, otherwise falls back to `yAxisFormat`. If your chart is configured for percent but the tooltip still shows dollars, double-check that `currencyFormat` is not set and that your `yAxisFormat` is `.2%`. If you have custom metric formats, make sure they're being picked up by `buildCustomFormatters`. You may want to compare your current config and data flow to a working version from before the regression to spot any differences in how these props are set. Let me know if you want a deeper dive into a specific part of the formatter logic or config! <!-- 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/09255e6b-cee6-4fc6-866f-b12146695cd0?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/09255e6b-cee6-4fc6-866f-b12146695cd0?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/09255e6b-cee6-4fc6-866f-b12146695cd0?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/09255e6b-cee6-4fc6-866f-b12146695cd0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/09255e6b-cee6-4fc6-866f-b12146695cd0?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/09255e6b-cee6-4fc6-866f-b12146695cd0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/09255e6b-cee6-4fc6-866f-b12146695cd0?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [! [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/33757) -- 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]
