victory icon indicating copy to clipboard operation
victory copied to clipboard

Unable to show VictoryTooltip on onClick ( touch ) event inside VictoryVoronoiContainer

Open Engazan opened this issue 4 years ago • 2 comments

The Problem

Unable to show VictoryTooltip when clicked on chart, but default (hover works) but hover is not ideal for my case ( react-native ), even when i try pass "event"prop from docs it does not trigger

Reproduction

https://codesandbox.io/s/affectionate-joana-rput2t?file=/index.js

Description

I would like to show VictoryTooltip when click on chart, but cant figure it out how to do it when we are in VictoryVoronoiContainer

Engazan avatar Mar 31 '22 12:03 Engazan

Same problem here! Any possibility to overwrite default behaviour? So it could activate label onPressIn but not deactivate that onPressOut

Witkod avatar Jul 19 '22 09:07 Witkod

You might want to avoid the default behavior of an event by overriding it. Just define the function, but if you want to go further you will have to explore the object better since the documentation doesn't cover this subject very well

<VictoryChart
   events={[
     {
       target: 'parent',
       eventHandlers: {
         onTouchEnd: (props, { vIndex }) => {
           // vIndex represents the index of the closest selected element
           console.log(vIndex);
         },
       },
     },
   ]}
/>

bleszerd avatar Jul 27 '22 17:07 bleszerd

This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar Mar 02 '24 01:03 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

github-actions[bot] avatar Mar 09 '24 02:03 github-actions[bot]