Skip to content

[FEATURE] Add tooltip textLabelColor callback #4191

@Elolawyn

Description

@Elolawyn

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions