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

Make colon in y-axis titles for tooltips optional #1660

Closed
kristofsw opened this issue Jun 4, 2020 · 2 comments
Closed

Make colon in y-axis titles for tooltips optional #1660

kristofsw opened this issue Jun 4, 2020 · 2 comments
Labels
feature-request New feature or request tooltip

Comments

@kristofsw
Copy link

Hi,

I have noticed that there is no option to not show the colon after the label of a series. I get that it should be followed by the value but in my case I want to display the label below the value (see image below). Without that option, I have to design my tooltip another way which is a bit annoying.

image

It would be nice if there would be an extra parameter for the y title formatter where you can choose to show or hide the colon (defaults to show).

Is there a way to do this? Thanks in advance.

@kristofsw kristofsw changed the title Make colon optional Y axis titles in tooltips Make colon in y-axis titles for tooltips optional Jun 4, 2020
@junedchhipa junedchhipa added tooltip feature-request New feature or request labels Jun 4, 2020
@junedchhipa
Copy link
Contributor

Good point, I just implemented it.
From the next version, the colon is supplied directly in the formatter instead of hard-coding it.

So, when you change the formatter to below, the colon is removed.

tooltip: {
  y: {
    title: {
      formatter: function(seriesName) {
        return seriesName
      }
    }
  }
}

@kristofsw
Copy link
Author

Very nice, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request tooltip
Projects
None yet
Development

No branches or pull requests

2 participants