chartjs / chartjs/Chart.js

Docs: Tweak up pie/polar/donut chart legend description

Open
#11,543 1 comment 3 reactions 0 assignees View on GitHub
type: documentation
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Documentation Is:

- [ ] Missing or needed?
- [X] Confusing
- [ ] Not sure?

### Please Explain in Detail...

In the [Legend Configuration Options](https://www.chartjs.org/docs/latest/configuration/legend.html#configuration-options), it says,

> **WARNING**
>
> The doughnut, pie, and polar area charts override the legend defaults. To change the overrides for those chart types, the options are defined in `Chart.overrides[type].plugins.legend.`

As a newcomer to Chart.js, this page doesn't tell me quite what I need to use the info.

### Your Proposal for Changes

My recommendations:

1. Move the **WARNING** below the table of options. Perhaps add this sentence to the intro paragraph: "Warning: for donut, pie,and polar charts, see the Warning below."
2. More importantly, in the Warning block, expand the example to say, "... the options are defined in `Chart.overrides[type].plugins.legend` where `type` can be one of `pie` (or `"pie"`), etc.

Many thanks!

### Example

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.