Open San10694 opened 4 years ago
same issue. Any Solution ?
use WebView from react-native, insert data in the webview like this
<WebView style={{ height: 200, }} ref={'highCharts'} source={{ html:<your highchart string > }} />
and for accessing functions use this
this.refs.highCharts.postMessage(JSON.stringify(data))
and for listening data use this inside your highchart string
` document.addEventListener("message", (event) => {
}) `
use WebView from react-native, insert data in the webview like this
<WebView style={{ height: 200, }} ref={'highCharts'} source={{ html:<your highchart string > }} />
and for accessing functions use this
this.refs.highCharts.postMessage(JSON.stringify(data))
and for listening data use this inside your highchart string
` document.addEventListener("message", (event) => {
}) `
It would be great if you could show an example for use series.addPoint() . I'm stuck this issues
I want to access all the high chart APIs outside the scope, I tried ref={'chart' } but didn't help, I am getting all the props via ref but not other functions
for the example, how to use below statements outside of the scope like in componentDidMount() ( ie. this.series[0] is not available outside the scope) var series = this.series[0]; setInterval(function () { var x = (new Date()).getTime(), // current time y = Math.random(); series.addPoint([x, y], true, true); }, 1000);