Bug description
Repro steps: 1. Create a mixed chart 2. In one of the queries, set the metric to use a number. In the other, set it to use a % 3. In the Customize tab, set the Primary y-axis format and Secondary y-axis format. One should use something numeric and the other should use something with a % 4. Hover over the tooltips on the chart
Current behavior: The numeric value is showing as a %. Instead of showing 4724163, it's showing 472416260.0%
Expected behavior: The tooltip displays should match the correct formatting as the axis
Note: repro steps use a % for the secondary y axis but this can be reproduced with other formats in the secondary y axis field
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
This looks like a real bug in the tooltip formatting logic for mixed charts. There aren’t any existing issues or PRs that directly address this problem. The root cause is likely in how Superset matches each series to its axis: the tooltip formatter relies on the series key (name/id) matching exactly between the set membership logic and the tooltip rendering logic. If there’s any mismatch in naming conventions or key construction, the wrong formatter can be applied, so a number might be formatted as a percent (or vice versa) in the tooltip. You can see this logic in the transformProps
function for mixed charts, where the formatter is chosen based on whether the series is in the primarySeries
or secondarySeries
set, but this mapping is fragile and can break if the keys don’t match up as expected (source).
If you want to dig deeper or try a fix, focus on how series keys are constructed and matched in both the series initialization and tooltip formatting logic. Making this mapping more robust should resolve the formatting mismatch.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other