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

Tooltip position is offset on cursor interaction and centered for synced tooltips #966

Closed
formgeist opened this issue Jan 7, 2021 · 4 comments
Labels
:tooltip Related to hover tooltip

Comments

@formgeist
Copy link

Summary

When enabling tooltip synchronization on the charts, the tooltip on the active chart is positioned according to the configuration (adjacent to the vertical line), but the synced tooltips show on top of the vertical line not respecting the configuration.

The below screenshot can be reproduced on the APM Service overview page in Kibana 7.11 or master.

Screenshot 2021-01-07 at 08 37 19

@cyrille-leclerc
Copy link

Thanks @formgeist . cc @alex-fedotyev

@nickofthyme
Copy link
Collaborator

@formgeist Thanks for opening this issue.

The external tooltip placement can be set via the externalPointerEvents.tooltip.placement prop on Settings component.

<Chart>
  <Settings
    onPointerUpdate={onPointerUpdate}
    externalPointerEvents={{
      tooltip: { placement: 'left' },
    }}
  />
</Chart>

Below notice the top tooltip placement change from left to right to bottom.

Screen Recording 2021-01-07 at 10 52 AM

See the storybook example here.

Let me know if this solves your problem.

A current limitation of this is that the height of vertical placement is always at the top of the following chart.

@formgeist
Copy link
Author

@nickofthyme Thanks for example and that worked! I've opened a PR to reconfigure the chart settings to set the tooltip placement differently elastic/kibana#87729

@nickofthyme
Copy link
Collaborator

Perfect! No problem, glad to help.

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

No branches or pull requests

3 participants