Skip to content

Instantly share code, notes, and snippets.

@badcrocodile
Created January 18, 2018 02:47
Show Gist options
  • Save badcrocodile/c8c57825d4a1f2bd52de298fa5e3d8a7 to your computer and use it in GitHub Desktop.
Save badcrocodile/c8c57825d4a1f2bd52de298fa5e3d8a7 to your computer and use it in GitHub Desktop.
Use JS and PHP to render graph
<script type="text/javascript">
FusionCharts.ready(function(){
var fusioncharts = new FusionCharts({
type: 'column2d',
renderAt: 'global-food-safety-audit-rating',
width: '500',
height: '300',
dataFormat: 'json',
dataSource: <?= $chart_data ?>
}
);
fusioncharts.render();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment