Stacked Area Chart onPress get value and position for tooltip
See original GitHub issueWhat is the problem?
For Stacked Area Chart, onPress is explicit in svgs array, not in the data. We’re unable to get the values & position of the pressed item.
When does it happen?
Clicking a value in the chart.
What platform?
- iOS
- Android 27.0.0
React Native version: 0.55.2
Code to reproduce
const colors = [ '#8800cc' ];
const keys = [ 'count' ];
const svgs = [ { onPress: () => console.log('apples') }]
<StackedAreaChart
style={ { height: 200, paddingVertical: 16 } }
data={ data }
keys={ keys }
colors={ colors }
curve={ shape.curveNatural }
svgs={ svgs }
/>
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (6 by maintainers)
Top Results From Across the Web
How to Sort a Tooltip in a Stacked Bar Chart in Chart JS
How to Sort a Tooltip in a Stacked Bar Chart in Chart JSCustomize your tooltip to sort a tooltip data based on stacked...
Read more >Victory Stacked Area giving undefined on tooltip
eventHandlers should be given as an object whose keys are standard event names (e.g., onClick) and whose values are event callbacks.
Read more >Adding Tooltip to React-Native Charts - Level Up Coding
We obviously want this tooltip to be positioned dynamically and show value according to the data points rendered on the chart.
Read more >Tooltip - Chart.js
The xAlign and yAlign options define the position of the tooltip caret. If these parameters are unset, the optimal caret position is determined....
Read more >Tooltips - Victory
When tooltips are added to a chart in this way, defaultEvents on VictoryTooltip are automatically added to the component using them, in this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kashifsulaiman Thanks!! Cheers
@JesperLekland It worked using Decorators! Thanks alot!