Skip to content

New colors plugin doesn't color pie charts #10849

@stockiNail

Description

@stockiNail

Feature Proposal

In version 4 (I'm testing alpha 3), there is new colors plugin which should set a default colors for dataset. PR 10764.

There are checks in the plugin to understand the type of the chart but "pie" chart type (must be the same of "doughnut") is missing and the plugin is not coloring the pie chart correctly.

Codepen: https://codepen.io/stockinail/pen/yLEOZxo

Possible Implementation

I think an additional check should be added, as following:

    if (type === 'doughnut' || type === 'pie') {
      colorizer = createDoughnutDatasetColorizer();
    } else if (type === 'polarArea') {
      colorizer = createPolarAreaDatasetColorizer();
    } else {
      colorizer = createDefaultDatasetColorizer();
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions