finddata has asked for the wisdom of the Perl Monks concerning the following question:
My query is i want to convert the above table into pie chart format . i should built two piechart one is for jobs pending and jobs running by matching it with queue name. If the queue name is available twice in the column we should calculate those two rows of jobs pending and jobs running and make them into single. code which i had tried are as follows:I have the following mysql table which obtained by following query(sel +ect * from tables); <code> | time | queue_name | description + | priority | jobs_pending | jobs_running | | 1490155563 | adice_long | ADICE Low-Priority/Long Runtime Job Q +ueue | 5 | 6 | 3 + + | 1490155563 | adice | ADICE +Low-Priority/Long Runtime Job Queue | 8 | 9 + | 3 + + + + + + | | 1490155563 | incisive | ADICE-Incisive Co-Simulation Queue + | 7 | 0 | | 1490155563 | vcs | ADICE High-Priority/Short Runtime Job + Queue | 10 | 0 | |
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";
But am not sure am in right way to do it. |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";
|
|---|