Skip to content

[FEATURE] Request: Allow varying widths in pie/doughnut chart of multiple datasets #4724

Description

@ea-ncu

Expected Behavior

Allow us to change the width of one of the datasets in a pie/doughnut chart. It would be handy to be able to set your own values or allow the graph to use the data to create a "weight" attribute (dataset 1 has points 5,4,3 while dataset 2 has points 50,40,30, so dataset 2 could be thicker).

Current Behavior

Currently it is split evenly between the amount of datasets and will all be equal width.

Possible Solution

A simple weight attribute in a dataset could work. Say, a weight of 1 will retain the original size. A dataset of weight 0.5 will have half as much weight as a dataset of 1, so it will be half as thick.

Context

I am trying to add a ring around my pie chart that indicates if a percentage has been reached. It is meant to show (in my example work) how many customers it took to reach 80% of the total sales. I am currently doing this with a second dataset consisting of data 80,20. However, I want to reduce the size of the ring as it is not the relevant information to be displayed, and make it so that it is simply a "border" or "outline" to the actual data. I am also interested if there is a marker option in chart.js that accomplishes this, similar to drawing a line y = 5 on a line graph to compare your actual line graph to.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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