chartjs / chartjs/chartjs-plugin-datalabels
Labels disappear after chart update
- Dominant language
- JavaScript
- Stars
- 920
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
### Current behaviour
If only active points labels are displayed (`display: (context) => context.active`) and `chart.update()` triggered while some labels are displayed, these labels disappear until another point become active.
### Expected behaviour
`chart.update()` don't breaks active points label visibility.
### Steps to Reproduce
1. Open example (https://codesandbox.io/s/plugin-example-forked-7ntsoq?file=/src/App.vue)
2. Hover on any point
3. Wait until `chart.update()` trigger (5 sec)
4. Labels disappear and appear again only after another point hovered
### Environment
chart.js: 4.1.1
chartjs-plugin-datalabels: 2.2.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked CodeSandbox reproduction using Chart.js 4.1.1 and chartjs-plugin-datalabels 2.2.0. Trace the update triggered after five seconds while a point is hovered, then verify that labels controlled by the active-point display condition remain visible after chart.update().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- chart.js, javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100