TradingPal / react-native-highcharts

📈 Add Highcharts charts to react-native app for IOS and Android
https://github.com/TradingPal/react-native-highcharts
256 stars 158 forks source link

events not fire #62

Open windydang26 opened 6 years ago

windydang26 commented 6 years ago

i cannot catch event. someone any suggest?

salujaharkirat commented 6 years ago

events to native code?

windydang26 commented 6 years ago

yes! i'm using react-native. events still running, but seem is web enviroment. i cannot consolog, only alert() as web. how to transmission params of hightchart to component?

salujaharkirat commented 6 years ago

Webview component injects a function called postMessage in your webview html when you pass onMessage prop to it. You can use this postMessage to fire events from webview.

You can try something like this https://snack.expo.io/Bycv3CnMz

windydang26 commented 6 years ago

oh! thank you very much! i will try it :)

windydang26 commented 6 years ago

@jinxac Webview component in library not contain onMessage props. i fork repo and edit but cannot fire onMessage. i want to fire event to receiver data point when click in highchart? are you have other idea? thank.

salujaharkirat commented 6 years ago

are u trying this on android @windydang26 ?

windydang26 commented 6 years ago

so sorry. i forget method window.postMessage. after i use postMessage to send data and onMessage to receiver data as you told. i fired events. hi. thank you @jinxac :)

cstpraveen commented 6 years ago

Hi try to change from source={{ html: newHTML, baseUrl: 'web/' }} to source={{ html: newHTML, baseUrl: 'http://localhost' }}.

It will work, or else try to remove baseUrl from the source attribute.