sub print_overall_summary { my $str = shift; $DBH = &connect or die "Cannot connect to the sql server \n"; $DBH->do("USE $str;"); my $stmt="select distinct * from summary order by time desc ;"; ; my $sth = $DBH->prepare( $stmt ); $sth->execute() or print "Could not in7sert_overall_summarydata"; print "<script language=\"javascript\" type=\"text/javascript\"> \ +n"; print "\$(document).ready(function(){ \n"; %TABLE_DATA =(); print "var data_running=[[\"Adice \($TABLE_DATA{1}{'ENTRY'}\)\",$TABLE +_DATA{5}{'ENTRY'}],\ [\"Incisive \($TABLE_DATA{1}{'ENTRY'}\)\",$TABLE_ +DATA{5}{'ENTRY'}],\ [\"Vcs \($TABLE_DATA{1}{'ENTRY'}\)\",$TABLE_DATA{ +5}{'ENTRY'}], \n"; print "var data_pending=[[\"Adice \($TABLE_DATA{1}{'ENT +RY'}\)\",$TABLE_DATA{4}{'ENTRY'}],\ [\"Incisive \($TABLE_DATA{1}{'ENTRY'}\)\",$TABLE_ +DATA{4}{'ENTRY'}],\ [\"Vcs \($TABLE_DATA{1}{'ENTRY'}\)\",$TABLE_DATA{ +4}{'ENTRY'}],\n"; + [download] print " \n + pieChart(\"placeholder39\",data_running,{title:\"<b><center>Jobs Run +ning</center></b>\"});\n"; print " \n pieChart(\"placeholder41\",data_pending,{title:\"<b>< +center>Jobs Pending</center></b>\"});\n"; [download] print " \n pieChart(\"placeholder30\",data_machine,{title:\"<b>< +center>Machine Status<center></b>\"});"; print " \n pieChart(\"placeholder29\",data_cpu,{title:\"<b><cent +er>CPU Slots</center></b>\"});\n"; print " \n pieChart(\"placeholder39\",data_running,{title:\"<b>< +center>Jobs Running</center></b>\"});\n"; print " \n pieChart(\"placeholder41\",data_pending,{title:\"<b>< +center>Jobs Pending</center></b>\"});\n"; print "});"; print "</script>"; }
In reply to Re^3: How to calculate the column and print it in pie chart format using perl?
by finddata
in thread How to calculate the column and print it in pie chart format using perl?
by finddata
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |