Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add boolean property to match the Datalabels color with the corresponding line/bar color #11607

Closed
bogdanblunt opened this issue Dec 7, 2023 · 2 comments

Comments

@bogdanblunt
Copy link

Feature Proposal

Currently, the data label's color is black and it can be changed to any fixed color.
Chartjs doesn't haveb a property though, to match the color of the dataset line/bar.

Possible Implementation

There are a few suggestions on the internet that currently work as workarounds only for bar. It should be possible either to match the data set colors for the datalabels, or to have access to the data[dataIndex]'s color.

@bogdanblunt bogdanblunt changed the title Add property to match the Datalabels color with line/bar color Add boolean property to match the Datalabels color with line/bar color Dec 7, 2023
@bogdanblunt bogdanblunt changed the title Add boolean property to match the Datalabels color with line/bar color Add boolean property to match the Datalabels color with the corresponding line/bar color Dec 7, 2023
@LeeLenaleee
Copy link
Collaborator

The datalabels is a sepperate plugin so we can't put a boolean in the core for that. You will need to open an issue in the datalabels plugin repository with this request:

https://github.com/chartjs/chartjs-plugin-datalabels

@bogdanblunt
Copy link
Author

Closing this ticket, as it concerns the chartjs-plugin-datalabels, as @LeeLenaleee suggested in the previous comment.
Opened chartjs/chartjs-plugin-datalabels#404 there.

@bogdanblunt bogdanblunt closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants