Open ammann29 opened 1 week ago
Hey there, this is a bit tricky, but you'll want to open up the debugger and look at your values more closely and work from there.
I was able to get it to return and display the active y value using this:
const yValueDisplay = useDerivedValue(() => {
const active = Object.entries(firstTouch.y).find(([key, v]) => {
return !isNaN(v.value.value);
});
return active![1].value.value.toString();
});
because not all the pumps have a value for where you are touching, so that is why it's NaN
, and in your code you were always reaching for pump1
s data primarily... It's pretty sensitive touch area, but try this out.
Question
Is it possible to have multiple line charts with different x and y values combined in one chart? I am using scatter on each line and on pressing scatter want to display data under the chart.
Right now, scatter is being displayed on data points but I am only able to use touch points on the first line chart only. I am only getting touch point data from first line. On pressing scatter on other lines i am getting NaN. Also, in "value" variable no matter i click on which line i am always getting ''isFirstPressActive'' as true.
"victory-native": "^41.0.1" "react-native": "^0.71.7" "@shopify/react-native-skia": "^1.4.2" "react-native-reanimated": "^3.15.4" "react-native-gesture-handler": "^2.20.0"
https://github.com/user-attachments/assets/a9028840-58fd-4f4c-ad82-786c119cc79a