Jpadilla1 / react-native-ios-charts

Bringing iOS Charts to React Native
MIT License
588 stars 66 forks source link

could I custom callback to this smart chart? #58

Open L-Jovi opened 8 years ago

L-Jovi commented 8 years ago

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 commented 8 years ago

any idea?

Jpadilla1 commented 8 years ago

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 .

L-Jovi commented 8 years ago

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

prithsharma commented 7 years ago

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