react-native-highcharts icon indicating copy to clipboard operation
react-native-highcharts copied to clipboard

Formatter function can't have external references

Open novellizator opened this issue 7 years ago • 2 comments

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).

novellizator avatar Feb 16 '18 14:02 novellizator

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 avatar Sep 04 '19 13:09 JamesWen1993

@novellizator

JamesWen1993 avatar Sep 04 '19 13:09 JamesWen1993