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

displayColors- add margin to tooltip label color box #5506

Closed
dlewand691 opened this issue May 22, 2018 · 3 comments · Fixed by #9625
Closed

displayColors- add margin to tooltip label color box #5506

dlewand691 opened this issue May 22, 2018 · 3 comments · Fixed by #9625

Comments

@dlewand691
Copy link

Is there a way to add margin to the tooltip label color boxes (displayColors)? Currently I feel the box is too close to the label text and would like to push it away some (set either in pixels, ems, or rems).

Expected Behavior

Ability to add margin to any side of the label color boxes

Current Behavior

No found way to do this

Possible Solution

Control margins similar to the tooltip title, etc.

Environment

  • Chart.js version: 2.7.2
  • Browser name and version: Chrome 66, MacOs
@etimberg
Copy link
Member

etimberg commented Jun 8, 2018

This isn't currently possible

@ollystephens1
Copy link

Any movement on this?

@jennatuckerdeveloper
Copy link

jennatuckerdeveloper commented Oct 21, 2019

I used this in options, tooltips:

        label: function(tooltipItem, data) {
          const label = data.datasets[tooltipItem.datasetIndex].label || ''
          const value = tooltipItem.value
          return `  ${label} ${value}`
        },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants