Touch events on multiple line charts
See original GitHub issueWhat is the problem?
Currently the only way to overlay multiple lines is to follow the layered charts story and overlay them. The works and displays all data, but doesn’t allow for touch events on children beyond the top most chart.
When does it happen?
Follow the decorator story, add onPress to each Circle
, and add multiple line charts with the decorator child.
What platform?
- iOS
- Android
React Native version: 0.55.4
Code to reproduce
Object.keys(displayTypes).map((type, index) => {
const lineData = this.getGraphData(normalizedData, type);
const isFirst = index === 0;
return (
<LineChart
key={type}
style={isFirst ? { flex: 1 } : StyleSheet.absoluteFill}
data={lineData}
svg={{ stroke: lineColor, strokeWidth: 3 }}>
{isFirst ? <Grid /> : null}
<LinePoints
color={lineColor}
onPress={this.onLinePointPress}
allData={data}
/>
</LineChart>
);
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
How to disable the cross and other touch events in ios- ...
the zooming and touching is enabled. I do not let the user do anything in the chart, even selecting is not allowed. I...
Read more >Multitouch done right / D3
Touch events, which can involve multiple touch, will return the coordinates of each touch in a list. For all the event types registered...
Read more >Gestures and Touch Events | CodePath Android Cliffnotes
Gesture recognition and handling touch events is an important part of developing user ... In multiple touch events (i.e pinch open or pinch...
Read more >Interactions | Chart.js
const chart = new Chart(ctx, { type: 'line', data: data, options: { // All of these (default) events trigger a hover and are...
Read more >How touch events are delivered in Android | by Suragch
No one else down the line gets a chance at it. More detailed explanation. The above diagram makes things a little more simple...
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
Handling this one too…
Hi ,Sorry am new to react native i try to use your example to create multiple line but no luck my app keep crashing,is there a solution for that,thanks.