dosubot[bot] commented on issue #36115: URL: https://github.com/apache/superset/issues/36115#issuecomment-3532297603
<!-- Greeting --> Hi @originalcodester! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> You can separate the percentage and value in pie/donut chart labels by using the "Template" label type in the chart settings. In the label template field, you can use placeholders like `{name}`, `{value}`, and `{percent}` and add your preferred separator or even a new line (using `\n`). For example, set the template to `{name}: {value} | {percent}` for a pipe separator, or `{name}: {value}\n{percent}` to put the percentage on a new line. This change only affects the label on the chart, not the tooltip. This option is available in the Superset UI for ECharts-based pie/donut charts and does not require code changes—just update the label type and template in the chart configuration panel. [See implementation details in the code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts#L32-L435). <!-- 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/c0f51aba-4be5-437b-9735-6a49f3ef98ed?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c0f51aba-4be5-437b-9735-6a49f3ef98ed?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c0f51aba-4be5-437b-9735-6a49f3ef98ed?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c0f51aba-4be5-437b-9735-6a49f3ef98ed?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c0f51aba-4be5-437b-9735-6a49f3ef98ed?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c0f51aba-4be5-437b-9735-6a49f3ef98ed?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c0f51aba-4be5-437b-9735-6a49f3ef98ed?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36115) -- 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]
