This is a demonstration of integrating your PHP server-based code with
RGraph. As demonstrated here you can use the json_encode()
PHP
function to convert your PHP arrays or objects into a string that you
can print along with the rest of your page. You can then use the resulting
JavaScript data structure to pass the information to RGraph.
<script src="RGraph.svg.common.core.js"></script> <script src="RGraph.svg.bar.js"></script>Put this where you want the chart to show up:
<div style="width: 550px; height: 300px" id="chart-container"></div>This is the code that generates the chart: