Hi ,

I am currently developing a an application in Fujitsu Runmyprocess, there i 
am trying to implemet google graphs,. The graphs are coming fine but i want 
these graphs to be controlled or filter during the run time so could you 
please tell me how to do so??

I am attaching the script. please find it out and help me

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-chart-api.
For more options, visit https://groups.google.com/d/optout.
//Handle 0,1 or several records from report feed

function get_array(my_father, my_son) {
if (typeof(my_father) == "object") {
if (my_father[my_son] != undefined) {
if (my_father[my_son].length != undefined) {
var my_array = my_father[my_son];
} else {
var my_array = [my_father[my_son]];
}
} else {
var my_array = [];
}
} else {
var my_array = [];
}
return my_array;
}

//Display a PieChart

function drawPieChart(html_id, array_data, array_column, chart_title, 
chart_width, chart_height) {
 // Create our data table.
 var data = new google.visualization.DataTable();
 for (i = 0; i < array_column.length; i++) {
 data.addColumn(array_column[i].type, array_column[i].title);
 }
 var array_array_data = new Array();
 for (i = 0; i < array_data.length; i++) {
 array_array_data.push([array_data[i].label, array_data[i].value]);
 }
 data.addRows(array_array_data);
 // Instantiate and draw our chart, passing in some options.
 var chart = new 
google.visualization.PieChart(document.getElementById(html_id));
 chart.draw(data, {backgroundColor: '#ffffff',
 is3D : true,
 title : chart_title,
 isStack : true,width:0,height:150,
 
colors:['#689f46','#e88d28','#ffc206','#507cd4','#B1CD12','#AE12CD','#1222CD','#12CD3E','#E3E3E3']
 });
}

//Get report feed and then render the PieChart 1

function draw_Pie1() {
 $.ajax({
 type : "GET",
 url : 
"https://live.runmyprocess.com/live/113561401431760429/analysis/appli/COUNT?field=NUMBER&group=MEASURE_10&operator=EE%20EE%20EE&value=80597%20LIVE%20127638&filter=PROJECT%20MODE%20APPLI&nb=10000&media=json";,
 data : {},
 cache : false,
 async : true,
 dataType : "json",
 error : function () {
 alert('Error while loading credits.');
 },
 success : function (P_result) {
 var array_column = [{
 "type" : "string",
 "title" : "Logger"
 }, {
 "type" : "number",
 "title" : "Logged Date"
 }
 ];
 var my_entries = get_array(P_result.feed.entry.content.data, "result");
 var array_data = new Array();
 for (var i = 0; i < my_entries.length; i++) {
 array_data.push({
 "label" : my_entries[i].serie.value,
 "value" : parseFloat(my_entries[i].value)
 });
 }


 //alert(JSON.stringify(array_data));
 var html_id = "chart_div2";
 var chart_title = "Engagement Reason";
 var chart_width = 0;
 var chart_height = 240;
 drawPieChart(html_id, array_data, array_column, chart_title, chart_width, 
chart_height);
 }
 });
}

//init charts

draw_Pie1();

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-chart-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to