Differences

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

dev:chartlib [2006/08/25 05:45]
editor
dev:chartlib [2009/07/06 20:36] (current)
Line 1: Line 1:
 +====== Chart Library ======
 +
 +===== lib_chart.inc =====
 +  *  lib_chart.inc is a sahana library which enables module developers to generate module specific charts and graphs.
 +<code php>
 +include_once $global['approot']."/inc/reporting/lib_chart.inc";
 +</code>
 +<code php>
 +generate_piechart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +
 +generate_piechart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +
 +generate_barchart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +
 +generate_areachart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +
 +generate_linechart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +
 +generate_linepointchart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +
 +generate_pointschart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +
 +generate_thinbarlinechart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +
 +generate_squaredchart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +
 +generate_stackedbarschart($chart_file_name,$title,$xtitle,$ytitle,$dataArray,$keyword_arr);
 +</code>
 +
 +
 +  * parameters :
 +  - $chart_file_name – (data type = String) The file name of the chart. This name is used when the chart is downloaded.
 +  - $title – (data type = String) The tile of the chart should be specified.
 +  - $xtitle – (data type = String) The title of the x axis should be specified.
 +  - $ytitle – (data type = String) The title of the y axis should be specified.
 +  - $dataArray – data type = array(array(x_value_1,y_value_1),array(x_value_2,y_value_2),...);
 +
 +<code php>
 +shn_chart_download_link($chart_id);
 +</code>
 +  * parameters:
 +  * $chart_id – (data type = String) returns the chart download link.
 +<code php>
 +shn_chart_display_link($chart_id);
 +</code>
 +  * parameters:
 +  * $chart_id – (data type = String) returns the chart display link.
 +

Navigation
  • Navigate