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

[FEATURE] Add tooltip textLabelColor callback #4191

Closed
Elolawyn opened this issue Apr 27, 2017 · 1 comment
Closed

[FEATURE] Add tooltip textLabelColor callback #4191

Elolawyn opened this issue Apr 27, 2017 · 1 comment

Comments

@Elolawyn
Copy link

Expected Behavior

I want to be able to apply data color (bar color) to tooltip label:

tooltips: {
  callbacks: {
    textLabelColor: (tooltipItem, chartInstance) => {
      return chartInstance.data.datasets[tooltipItem.datasetIndex].backgroundColor;
    }
  }
}

Current Behavior

There is a callback called labelColor that can be used to set the color of the box that appears right before the label but not the text.

@etimberg
Copy link
Member

Happy to look at a PR for this.

apoorvasrinivasan added a commit to apoorvasrinivasan/Chart.js that referenced this issue Apr 29, 2017
@etimberg etimberg added this to the Version 2.7 milestone May 21, 2017
etimberg pushed a commit that referenced this issue May 28, 2017
Add a new tooltip callback `labelTextColor` that returns the colour for each item in the body of the tooltip.

Fixes issue #4191
exwm pushed a commit to exwm/Chart.js that referenced this issue Apr 30, 2021
Add a new tooltip callback `labelTextColor` that returns the colour for each item in the body of the tooltip.

Fixes issue chartjs#4191
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