You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "maximedemarey-wb (via GitHub)" <gi...@apache.org> on 2025/06/25 21:16:03 UTC

[I] Pie Chart tooltip on hover [superset]

maximedemarey-wb opened a new issue, #33913:
URL: https://github.com/apache/superset/issues/33913

   ## Screenshot
   
   <img width="350" alt="Image" src="https://github.com/user-attachments/assets/b3457fad-23aa-463e-bec5-67cf73904d46" />
   
   in supervet v4.x it was :
   
   <img width="251" alt="Image" src="https://github.com/user-attachments/assets/cf36057a-7f67-4c8d-a7a8-d17c31afe636" />
   
   ## Description
   
   On pie chart, tooltip displays a concatenation of "total" (13 in my example) + "percentage" (59.09%) which is not readable/understandable
   
   
   


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pie Chart tooltip on hover [superset]

Posted by "fawadinam (via GitHub)" <gi...@apache.org>.
fawadinam commented on issue #33913:
URL: https://github.com/apache/superset/issues/33913#issuecomment-3073427046

   I am facing a similar issue, it does seem to work fine on Sunburst chart but not in the Pie chart. I want to customise the value its showing on the tooltip instead of the complete SQL for the value, also the value and percentages are concatenated. 
   I also tried making following change
       tooltip: {
         show: false,
   in "const echartOptions: EChartsCoreOption = {" within file transformProps.ts but it didn't seem to work at all. If i am not able to fix it, then it should be hidden atleast.
   <img width="1195" height="564" alt="Image" src="https://github.com/user-attachments/assets/623e51cf-498e-4541-8b6d-c5fc1df6d382" />


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pie Chart tooltip on hover [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #33913: Pie Chart tooltip on hover
URL: https://github.com/apache/superset/issues/33913


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pie Chart tooltip on hover [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33913:
URL: https://github.com/apache/superset/issues/33913#issuecomment-3006179452

   <!-- Greeting -->
   Hi @maximedemarey-wb! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
   
   <!-- Answer -->
   The tooltip content for Pie Charts in Superset v4.x is controlled by the "Label Type" and "Label Template" options in the chart's control panel. The unreadable concatenation of total and percentage is likely due to the current `label_type` setting. To improve readability, try setting "Label Type" to "Category, Value and Percentage" for a format like `Name: Value (Percentage)`, which matches the clearer style from previous versions. For even more control, use the "Template" option and customize the tooltip with variables like `{name}`, `{value}`, and `{percent}` [cite](https://github.com/apache/superset/blob/f802474b07bc7a2765e57fcd6612d2b4454f5c62/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx).
   
   If the "Total" label is also cluttering the chart, you can disable it by unchecking the "Show Total" option in the control panel [cite](https://github.com/apache/superset/issues/31716).
   
   These settings should help you achieve a more readable tooltip. If the issue persists, it may be related to specific chart settings or data, so experimenting with different configurations can help pinpoint the cause.
   
   
   <!-- 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/21d3dd60-a07f-4b96-b091-72d8ddcf1f95?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/21d3dd60-a07f-4b96-b091-72d8ddcf1f95?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/21d3dd60-a07f-4b96-b091-72d8ddcf1f95?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/21d3dd60-a07f-4b96-b091-72d8ddcf1f95?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/21d3dd60-a07f-4b96-b091-72d8ddcf1f95?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/21d3dd60-a07f-4b96-b091-72d8ddcf1f95?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/21d3dd60-a07f-4b96-b091-72d8ddcf1f95?feedback_type=other)</sup>&nbsp;&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/33913)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pie Chart tooltip on hover [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33913:
URL: https://github.com/apache/superset/issues/33913#issuecomment-3084828039

   I do believe this was resolved by https://github.com/apache/superset/pull/34018, but if I'm mistaken, say the word and we'll close it out!


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pie Chart tooltip on hover [superset]

Posted by "kkkasio (via GitHub)" <gi...@apache.org>.
kkkasio commented on issue #33913:
URL: https://github.com/apache/superset/issues/33913#issuecomment-3028465278

   i have same issue, How disable percent "count" option and show total?
   wtf is 5842.33%
   ![Image](https://github.com/user-attachments/assets/8bc0844c-0d19-4f40-b783-b848329980a3)
   
   my dataset:
   ![Image](https://github.com/user-attachments/assets/96d528ae-d1de-4349-82ca-7337a8e70899)
   
   my metric: 
   count(curso.tipo_id)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pie Chart tooltip on hover [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33913:
URL: https://github.com/apache/superset/issues/33913#issuecomment-3079856084

   @fawadinam would you be willing to open a PR with those changes so we can check it out? Contributions are always welcome, obviously!
   
   CC @michael-s-molina who worked on these tooltips, and may have an alternate approach.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pie Chart tooltip on hover [superset]

Posted by "fawadinam (via GitHub)" <gi...@apache.org>.
fawadinam commented on issue #33913:
URL: https://github.com/apache/superset/issues/33913#issuecomment-3075334634

   > I am facing a similar issue, it does seem to work fine on Sunburst chart but not in the Pie chart. I want to customise the value its showing on the tooltip instead of the default value, also the value and percentages are concatenated. I also tried making following change tooltip: { show: false, in "const echartOptions: EChartsCoreOption = {" within file transformProps.ts but it didn't seem to work at all. If i am not able to fix it, then it should be hidden atleast. <img alt="Image" width="1195" height="564" src="https://private-user-images.githubusercontent.com/134792908/466431055-623e51cf-498e-4541-8b6d-c5fc1df6d382.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTI2MDg5MzMsIm5iZiI6MTc1MjYwODYzMywicGF0aCI6Ii8xMzQ3OTI5MDgvNDY2NDMxMDU1LTYyM2U1MWNmLTQ5OGUtNDU0MS04YjZkLWM1ZmMxZGY2ZDM4Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQS
 UyRjIwMjUwNzE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDcxNVQxOTQzNTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02MmY4NWFiYWNjNWRlOTc1YWQ4NzI1YzNjMGZlZGNmOGMzN2FkYjlmYmVmOThjZDMwMWNkNTc2M2ZjYTg4ZjZlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.de4Fq8L53GfcDMJcYUcasQuM3LuBhCfM0EDmpibIhQw">
   
   So what I have done is change the return method for Tooltip in TransformProps.ts. so instead of using tooltipHtml i'm returning the actual arguments here. Following is how it looks now. 
   
   current code:
         formatter: (params: any) => {
           const [name, formattedValue, formattedPercent] = parseParams({
             params,
             numberFormatter,
             sanitizeName: true,
           });
           return tooltipHtml(
             [[metricLabel, formattedValue, formattedPercent]],
             name,
           );
   
   changed code:
   
         formatter: (params: any) => {
           const [name, formattedValue, formattedPercent] = parseParams({
             params,
             numberFormatter,
             sanitizeName: true,
           });
           return `${name} ${formattedValue}, ${formattedPercent}`;
   
   <img width="836" height="420" alt="Image" src="https://github.com/user-attachments/assets/9a4bf7e5-dc71-447e-81dc-70f62392d06c" />


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pie Chart tooltip on hover [superset]

Posted by "fawadinam (via GitHub)" <gi...@apache.org>.
fawadinam commented on issue #33913:
URL: https://github.com/apache/superset/issues/33913#issuecomment-3107725346

   yes this was resolved. thanks.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org