I have a page which generates HTML dynamically and does an echo of it. How can I do this with the JQPlot. I can have multiple graphs on same page. I see that JQPlot uses document.ready to render it. I will generate required arrays from php .
How should I do this so that I can just call a PHP/Javascript method / include and pass required parameters to display chart?
If I have multiple charts should I put a document.ready and than out a PHP
for loop inside it and call a generic plot function where I can pass
all my parameters ?
something as below
$(document).ready{function(){
<?php for loop to generate required objects for chart ?>
Call JQPlot function to generate chart
<? >
Use php’s json_encode to generate a javascript object in your javascript tag :