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

Formatter function can't have external references #74

Open novellizator opened 6 years ago

novellizator commented 6 years ago

Hey, I know, you are stringifying the formatter function and sending it over to the native side.

Anyway, I think you could either put up a caveat, how it works, or somehow fix it, perhaps.

For example by accepting the formatter even if it's an object (that can be neatly stringified).

JamesWen1993 commented 5 years ago

Hey bro! i find a solution! ChartView: <ChartView onMessage={({nativeEvent: state}) => this.OnMessage(state.data)}/>

formatter: formatter = function () { //code------ window.postMessage(this.point) return s }

you can try,it's work fine!

JamesWen1993 commented 5 years ago

@novellizator