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

Table Chart - Line "totals" without tooltip to show the real/exact value #28385

Open
3 tasks done
jose-l-goncalves-alb opened this issue May 8, 2024 · 1 comment
Open
3 tasks done

Comments

@jose-l-goncalves-alb
Copy link

Bug description

I have a table chart with the "SHOW TOTALS" option enabled.
The column values of line "Totals" does not show a tooltip (mouse over) with the value. The value is showed as 346M , but the tooltip does not apear to show the real/exact value.
Nevertheless the metric values of cells table, as we can see (image below), have a tooltip associated (with the real/exact value).

How to reproduce the bug

  1. Create a chart table
  2. Enable "SHOW TOTALS" option
  3. Generate the table with metrics values greater than 1000
  4. Check if exist a tooltip at a "totals" metric value (ex.: 12M). The tooltip should show the real/exact value

Screenshots/recordings

table-chart-tooltip-but-not-at-totals-metric

Superset version

3.1.2

Python version

3.10

Node version

Not applicable

Browser

Chrome

Additional context

No response

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.
Copy link

dosubot bot commented May 8, 2024

The issue you're encountering with the tooltip not appearing for the "totals" row in a table chart in Superset version 3.1.2 seems to be related to how the tooltip functionality is implemented for this specific part of the table. The tooltip functionality for individual cells is handled through the tooltipHtml function, which generates the HTML content for tooltips. This function is part of the superset-frontend/packages/superset-ui-core/src/utils/tooltip.ts file and is designed to work across different chart types, including table charts. However, it does not include specific functionality or configuration options to enable tooltips for the "totals" row.

The rendering of the "totals" row and its configuration is managed within the TableChart.tsx file, under the getColumnConfigs function, particularly in the Footer property of the column configuration object. Modifications might be required here to ensure that the "totals" row is equipped with the necessary logic to display tooltips, similar to how individual cells handle mouseover events to show tooltips.

For addressing this issue, you might need to look into how the "totals" row is rendered differently from other cells and ensure that it has event listeners attached for displaying tooltips. This could involve updating the component responsible for the "totals" row to include tooltip functionality explicitly.

Additionally, the show_totals control configuration found in the superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx file adds a checkbox option labeled "Show totals" for displaying total aggregations of selected metrics. While this control enables the display of totals, it does not directly address the tooltip functionality for these totals, indicating that further customization might be necessary to achieve the desired tooltip behavior for the "totals" row.

This information should help you understand the potential cause of the tooltip issue with the "totals" row and guide you towards areas of the codebase that might require adjustments.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant