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

Strange tooltip behaviour on stacked bar chart #309

Open
mstainer14 opened this issue Aug 5, 2024 · 0 comments
Open

Strange tooltip behaviour on stacked bar chart #309

mstainer14 opened this issue Aug 5, 2024 · 0 comments

Comments

@mstainer14
Copy link

mstainer14 commented Aug 5, 2024

Hi @entronad,

I am experiencing a strange issue with a stacked bar chart paired with a tooltip.

I have the following selections included in my graph:

selections: {
  'tooltipTouch': PointSelection(
    on: {
      GestureType.tapDown,
      GestureType.longPressMoveUpdate,
    },
    clear: {
      GestureType.scaleUpdate,
      GestureType.doubleTap,
    },
    // dim: Dim.x,
    devices: {PointerDeviceKind.touch},
  ),
  'groupTouch': PointSelection(
    on: {
      GestureType.tapDown,
      GestureType.longPressMoveUpdate,
[Screencast from 05-08-24 18:00:29.webm](https://github.com/user-attachments/assets/8abf0011-be2d-436f-9b19-436828a80598)

    },
    clear: {
      GestureType.scaleUpdate,
      GestureType.doubleTap,
    },
    devices: {PointerDeviceKind.touch},
  ),
},

and the tooltip is as follows:

tooltip: TooltipGuide(
  renderer: simpleTooltip,
  selections: {'tooltipTouch', 'tooltipMouse'},
),
Screencast.from.05-08-24.18.00.29.webm

In the attached video you can see that when I select the bar chart at X-value 17 at the very bottom of the bar. the first tooltip for X-value 1 is shown. Similarly, if I click slightly above but still below the value at X-value 19 the tooltip for that value is selected. The tooltip for X-value 17 is only shown if I click anywhere above the '200kg' label.

I can add dim: Dim.x, to the PointSelection() however, this now makes it so that I cannot individually select each tooltip when the bar charts are stacked.

Is there a way such that when a stacked bar is clicked it only shows the tooltip for the portion of the bar and not any of the surrounding ones?

The desired behaviour is like the following:

Screencast.from.05-08-24.18.05.22.webm

Many thanks! 😄

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

No branches or pull requests

1 participant