Use parameter in function passed to google.setOnLoadCallback();

前端 未结 2 1633
孤城傲影
孤城傲影 2021-02-04 03:58

I\'m trying to use Google Visualization API to display data gathered from a MySQL server. I want to get the data using PHP and then pass it into the javascript function call to

2条回答
  •  囚心锁ツ
    2021-02-04 04:40

    in the first example you pass in the function to the callback, in the second example you call the function and then pass in the result of that call to the callback.

    try:

    setOnLoadCallback(function(){ drawChart(data) })
    

提交回复
热议问题