Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation layer using formula is included in the sum of the rich tool tip #31735

Open
3 tasks done
MarkAajuLarsen opened this issue Jan 7, 2025 · 2 comments
Open
3 tasks done
Labels
explore:annotation Related to annotations in Explore viz:charts:bar Related to the Bar chart

Comments

@MarkAajuLarsen
Copy link

Bug description

  1. Create a bar chart
  2. Add a Annotation Layer using Formula
  3. Ensure that rich tool tip is enabled
  4. When hovering over the bar chart the value from the annotation layer is included in the rich tooltip and is included in the total value.

Screenshots/recordings

image

Superset version

4.1.1

Python version

3.9

Node version

16

Browser

Chrome

Additional context

Assuming that some users are using the annotation layers to create baselines and/or goals it would be great if either:

  1. The annotation layer value was not included in the tooltip, or;
  2. Annotation layers has an option to not include the values in the rich tooltip.

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • 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.
@dosubot dosubot bot added explore:annotation Related to annotations in Explore viz:charts:bar Related to the Bar chart labels Jan 7, 2025
Copy link

dosubot bot commented Jan 7, 2025

Hey @MarkAajuLarsen! 👋 I'm here to help you with any bugs, questions, or contributions you have for the project. Let's squash those bugs together!

The issue you're experiencing is related to the inclusion of formula-based annotation layers in the total value displayed in the rich tooltip for bar charts. Currently, there isn't a specific configuration or property in the Superset codebase that controls the exclusion of annotation layers from tooltips [1].

To address this, you might consider implementing a feature that allows users to toggle the inclusion of annotation layer values in tooltips. This could involve adding a configuration option to the annotation layer settings, enabling users to specify whether the values should be included in the tooltip calculations.

If you're looking to modify the behavior, you would need to explore the tooltip generation logic and annotation layer processing in the Superset codebase, particularly in files related to chart rendering and tooltip configuration.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@rusackas
Copy link
Member

rusackas commented Jan 8, 2025

Interesting find! While @michael-s-molina worked on these tooltips not so long ago and might have some insight, I don't think Annotaion Layers have an active/engaged "owner" at the moment, so I'd encourage you to investigate and open a fix PR if you're feeling adventurous! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
explore:annotation Related to annotations in Explore viz:charts:bar Related to the Bar chart
Projects
None yet
Development

No branches or pull requests

2 participants