jquery - Rendering JQPlot through PHP -


i have page generates html dynamically , echo of it. how can jqplot. can have multiple graphs on same page. see jqplot uses document.ready render it. generate required arrays php .

how should can call php/javascript method / include , pass required parameters display chart?

if have multiple charts should put document.ready , out php loop inside , call generic plot function can pass parameters ?

something below

$(document).ready{function(){    <?php loop generate required objects chart  ?>   call jqplot function generate chart    <? >  

use php's json_encode generate javascript object in javascript tag :

<script type="text/javascript">    var data = <?php echo json_encode($phpdata)?>    ...    ... process data jqplot, it's in js variable. </script> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -