react-native-ios-charts icon indicating copy to clipboard operation
react-native-ios-charts copied to clipboard

could I custom callback to this smart chart?

Open L-Jovi opened this issue 8 years ago • 4 comments

hi, thanks for your smart chart in react-native js side, it's cool and convenient.

I want to get x axis and y axis value when I interact with chart component, I notice that native Android implements almost all event type while iOS also implement part of some,

but I can't find any bridge which defined in our component swift code, maybe I'm missing, how could I custom callback here?

thanks for your time.

L-Jovi avatar Sep 19 '16 09:09 L-Jovi

any idea?

L-Jovi avatar Sep 21 '16 02:09 L-Jovi

Hi @L-Jovi it's currently note implemented, but the way to do this is by passing native events to javascript and in, let's say the Scatter Chart component, the callback would be called with the values. I haven't had time to work on this, but if anyone wants to take a shot at it, I'd recommend starting from here https://facebook.github.io/react-native/docs/communication-ios.html#calling-react-native-functions-from-native-events and here https://facebook.github.io/react-native/docs/native-components-ios.html#events .

Jpadilla1 avatar Sep 21 '16 02:09 Jpadilla1

@Jpadilla1 thanks for your reply, I'll try it.

L-Jovi avatar Sep 21 '16 10:09 L-Jovi

Any updates on this? I can try implementing this but since I've no iOS experience, I'll need some support.

prithsharma avatar Nov 21 '16 10:11 prithsharma