🥰 [FEATURE] Allow data label style to be a function (same as for data points)
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 591
- PR merge metrics
- No merged PRs in 30d
Description
### 🥰 Features description [Please make everyone to understand it]
Allow data label style to be a function (same as for data points).
### 🏞 What problem does this feature solve
So it would be possible to use different colors for different categories.
### 🧐 What does the proposed API look like
```
label.style: (item) => {
if (item.category === 'Gas fuel') {
return {fill: 'red'};
}
return {fill: 'green'};
},
```
### 🚑 Any additional [like screenshots]

Contributor guide
Research direction
Start by locating the data-label style handling and the existing data-point style callback support. Trace how the proposed label.style function receives an item and how returned styles are applied. Done means label.style accepts a function and allows category-specific colors such as the example; add or update coverage if the relevant tests are found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100