Skip to content

feat(AreaChart, LineChart): prevent freezing of tooltip when hovering over it

What does this MR do?

When hovering over an Area Chart or Line Chart, the data tooltip can get stuck if the client manages to hover over it. This restricts the usability of the chart - it's not possible to hover over other data points and see relevant information unless the client hovers outside of the chart.

Also, the tooltip follows the graph lines instead of the mouse pointer, which is unintuitive for the client.

2020-02-11_11.11.43

This MR solves these problems by removing mouse events inside of the data tooltip and using the mouse coordinates instead of the data lines to set the position of the data tooltip.

Related Issue

gitlab#216383 (closed)

Does this MR meet the acceptance criteria?

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidlines.
  • If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui package can be upgraded quickly after the changes are released:
  • Added the ~"component:*" label(s) if applicable.
Edited by 🤖 GitLab Bot 🤖

Merge request reports