chartjs / chartjs/chartjs-plugin-datalabels

Issue with positioning of Label in Donut Chart if only one series is enabled

Open
#338 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
920
Forks
507
PR merge metrics
No merged PRs in 30d

Description

In mine chart i have few values. It positioning perfectly!
but once user disabled all of the values except one - label jumps to the edge of the series, not to the center of it
![image](https://user-images.githubusercontent.com/5916679/187721572-42e4689e-d581-415c-843f-54b9ce8ca2dc.png)
on this screenshot series 12-18, 19,24, 25-40 and 65+ has 0es. and oly 41-64 has value (10)

Plugin setup is
`datalabels: {
display: true,
color: '#fff',
font: {
weight: 500,
size: 15,
family: 'Poppins',
},
anchor: 'center',
formatter: (value: number) => {
return value || '';
},
},
`

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.