Page 1 of 1
RGraph library
Posted: Tue Apr 08, 2014 5:51 pm
by ruiascensao
Hi,
Could you please provide more information on how to use this library in nuBuilderPro?
Thank you.
Re: RGraph library
Posted: Wed May 07, 2014 11:09 am
by ruiascensao
Hi,
Could you please provide an example?
Thank you.
Re: RGraph library
Posted: Thu May 08, 2014 8:24 am
by admin
Rui,
We actually use google charts now. Here's how..
1.Create a php snippet.
1.PNG
(sample code below)
Code: Select all
ob_start();
$gg = "
<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['corechart']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
var options = {
title: 'My Daily Activities'
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id='piechart' style='width: 400px; height: 400px;'></div>
</body>
</html>
";
ob_end_clean();
echo $gg;
2.Create an Iframe object.
2.PNG
3.PNG
Steven
Re: RGraph library
Posted: Tue May 20, 2014 11:12 am
by ruiascensao
Hi Steven,
Thank you for your help!
Re: RGraph library
Posted: Thu May 22, 2014 6:38 am
by admin
.