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

Range label tooltip overlapping with axis tooltip: question #1520

Closed
aniov opened this issue Aug 1, 2019 · 5 comments
Closed

Range label tooltip overlapping with axis tooltip: question #1520

aniov opened this issue Aug 1, 2019 · 5 comments
Assignees
Labels

Comments

@aniov
Copy link

aniov commented Aug 1, 2019

Hy, having the pen bellow:

https://codepen.io/aniov/pen/aewRrM?editors=0010

How can I disable (hide) categoryAxis tooltip but see range label tooltip on mouse over ?
The range label must be inside chart.
(It seems that for some reason categoryAxis is inheriting range label tooltip color)

Thank you.

@martynasma
Copy link
Collaborator

To disable axis tooltip:

categoryAxis.tooltip.disabled = true;

However, axis tooltip inheriting color of the axis range label is a weird bug. We'll need to fix that.

For dev team:

Initially axis tooltip is correct:
image

After hovering over range label the fill of the axis tooltip changes:
image

@aniov
Copy link
Author

aniov commented Aug 2, 2019

Thank you for your response but disabling categoryAxis tooltip results in range label tooltip being disabled also (I suppose because is created on top of categoryAxis and inherits his properties).
Only if I move range labels outside chart I can see tooltips for them, otherwise they are overlapped by categoryAxis tooltip.

RangeLabelTooltip

How can I disable (hide) categoryAxis tooltip but see range label tooltip on mouse over ?

Thank you.

@martynasma
Copy link
Collaborator

I suppose you will need to create a "personal" tooltip for each range, so it does not try to reuse axis' tooltip:

range.label.tooltip = new am4core.Tooltip();

@aniov
Copy link
Author

aniov commented Aug 2, 2019

I suppose you are right.
Thank you :)

@zeroin
Copy link
Collaborator

zeroin commented Aug 5, 2019

Another solution would be setting:
categoryAxis.tooltip.getFillFromObject = false;

@zeroin zeroin closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants