javascript - Trying to inject datapoints into iOS webView using highcharts -
while porting android app ios hit barrier: have uiwebview set run highcharts (it works provided sample), can't figure out how pass variables javascript in order display real time changes. android-equivalent of we're trying is:
webview.loadurl("javascript:" + "point = " + "[date.utc(" + myear + "," + mmonth + "," + mday + "," + hr + "," + min + "," + sec + ")," + value+ "];");
or example:
webview.loadurl("javascript:" + "var curve_name = " + "'illuminance';" + "var unit_of_meas = " + "'lx';" + "var x_axis_title = " + "'date';" + "var y_axis_title = " + "'illuminance (lx)';" + "var plot_title = " + "'illuminance data';" + "var plot_subtitle = " + "'';")
uiwebview
has method called stringbyevaluatingjavascriptfromstring
can use run script. think can use pass , initialize variable like.
Comments
Post a Comment