elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.75k stars 8.15k forks source link

[APM] Instances plot: The click area of the selectable dots are not accessible when they're on the outer areas of the chart canvas #97101

Open formgeist opened 3 years ago

formgeist commented 3 years ago

Kibana version: master

Summary

After some more testing on the new instances scatter plot, I've noticed that the click access on the chart isn't always great, especially when the dots are in outer areas of the chart canvas. Not sure if this is a limitation of the chart itself, or our implementation. One way to possibly mitigate this is to extend the domains.

2021-04-14 at 14 09 05 - Violet Worm

elasticmachine commented 3 years ago

Pinging @elastic/apm-ui (Team:apm)

smith commented 3 years ago

This might be fixable by adding a little padding to the chart theme on this chart. That might be simpler than messing with the domain, but we can also do that if the first thing doesn't work.

formgeist commented 3 years ago

@smith sounds reasonable, probably don't need much tbh

smith commented 3 years ago

I wrote:

This might be fixable by adding a little padding to the chart theme on this chart. That might be simpler than messing with the domain, but we can also do that if the first thing doesn't work.

I asked in Slack and @nickofthyme answered:

Yeah that’s the corner of the canvas so any pointer position off the canvas element itself will not show the points. We should make an issue to make this better.

The Theme.chartPadding is only going to reduce the area of the canvas relative to the axis, not provide a buffer to trigger point events. See this example https://codesandbox.io/s/quizzical-hill-4gclw?file=/src/App.tsx

But a solution that might achieve what you are looking for as a terrible workaround, would be to add a buffer to the domain. This would require you to compute the domain thus not ideal.

I would suggest opening a new issue on our repo.

Opened https://github.com/elastic/elastic-charts/issues/1140

botelastic[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

nickofthyme commented 2 years ago

Issue is open in charts https://github.com/elastic/elastic-charts/issues/1140. I added it to our project backlog, awaiting priority.