Skip to content

Pie / doughnut full responsive width #150

Description

@QuantumHive

I first thought this was an issue with the original chartjs, but found out that the following is an issue with react-chartjs-2:

When creating a pie or doughnut chart, the full width is not utilized.

When using vanilla chartjs, as you can see on this codepen, the full available width gets used, which increases the size of the chart.
In the demonstrations of react-chartjs-2 you can see that pie/doughnut charts are reduced in size because they do not utilize the full width. Try viewing this on a mobile device (or with your browser's developer tools in responsive mode). The chart becomes very small in size and could've been bigger.
A solution is indeed by changing the sizes manually, but this defeats the purpose of being a responsive chart.

Why is the pie/doughnut chart not utilizing the full width available of its parent container?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions