Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:gsoc09_pr [2009/08/14 01:01]
kethees
dev:gsoc09_pr [2009/08/14 01:21] (current)
kethees
Line 23: Line 23:
  
 == Future Enhancement(s) == == Future Enhancement(s) ==
 +   * Integrating Person Registry with other person oriented modules.
    * Tracking person roles such missing person, disaster victim, logistic oriented person and etc within PR.    * Tracking person roles such missing person, disaster victim, logistic oriented person and etc within PR.
- +   * Enhancing Person API and lib_chart.inc library functionalities.
  
 ===== Person API ===== ===== Person API =====
Line 99: Line 99:
 ===== Open Flash Chart Library ===== ===== Open Flash Chart Library =====
  
-This allows you to creat a chart with Flash capability. In order to use following function, you need to do is include lib_chart.inc library and call the shn_draw_ofc() API function.+This allows you to creat a chart with Flash capability. In order to use following function, you need to do is include lib_chart.inc library and call the shn_draw_chart() API function.
  
 == Chart API == == Chart API ==
 +
 +    * lib_chart.inc library includes following code snippets.
 <code php> <code php>
    include_once $global['approot']. '/3rd/php-ofc-library/open_flash_chart_object.php';    include_once $global['approot']. '/3rd/php-ofc-library/open_flash_chart_object.php';
    include_once $global['approot'] .'/3rd/php-ofc-library/open-flash-chart.php';    include_once $global['approot'] .'/3rd/php-ofc-library/open-flash-chart.php';
  
-   function shn_draw_ofc($width, $height, $data_file_url)+   function shn_draw_chart($width, $height, $data_file_url)
    {    {
        $base = 'res/ofc/';        $base = 'res/ofc/';
Line 112: Line 114:
    }    }
  
 +</code>
 +
 +Sample $data_file_url formed via stream as follows.
 +
 +e.g:
 +<code php>
 +$url_gender = 'index.php?mod=pr&act=gender&stream=text';
 +</code>
 +
 +<code php>
 +   function shn_text_pr_gender(){
 +      $array = Data::get_pr_gender();
 +      $data = $array['data'];
 +      $label = $array['label'];
 +
 +      foreach($data as $d){
 +         $total += $d;
 +      }
 +      
 +      foreach($data as $key=>$d){
 +         $data[$key] = round(($d/$total*100),2);
 +      }
 +
 +      $g = new graph();
 +      $g->bg_colour='#FFFFFF';
 +      $g->pie(60,'#505050','{font-size: 10px; color: #404040;');
 +      $g->pie_values( $data, $label );
 +      $g->pie_slice_colours( array('#31A43F','#A79810','#D21389') );
 +      $g->set_tool_tip( ' Label: #x_label#<br>Value: #val#%' );
 +      $g->title( 'Gender', '{font-size:14px; color: #d01f3c}' );
 +      echo $g->render();
 +   }
 </code> </code>
 == Ontology == == Ontology ==

Navigation
QR Code
QR Code dev:gsoc09_pr (generated for current page)