Skip to content

Allow option to display absolute values for pie chart #19338

Open
@darkdragon-001

Description

@darkdragon-001

Problem

I would like to show a label displaying the absolute numbers used to create the pie chart. Currently, only percentage labels are supported via autopct. Hacky solutions like https://stackoverflow.com/a/48299798/3779655 or https://stackoverflow.com/a/41089685/3779655 exist to retrieve the absolute values based from the fractional ones. It would be better to support it out of the box.

Proposed Solution

Add option wedgelabels=None|'percent'|'absolute'|list of strings together with wedgelabelfmt replacing autopct.

For migration, initialize wedgelabelfmt=autopct for wedgelabels='percent' and overwrite if wedgelabelfmt is set.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions