echo $pdocrud->render("chart",array("chart1","chart2","chart3","chart4"));
// GOOGLE CHARTS
*Add pie chart, bar chart, google charts etc using add chart function
*@param string $chartName Name of the chart
*@param string $chartType Chart type
*@param mixed $dataSource data source either tablename or array of data
*@param string $key name of col, that will serve as data key
*@param string $val name of col, that will serve as field valye
*@param string $bind whether datasource is db table or array or sql, default is db table
*@param string $param data parameter for the chart element
*return object Object of class
$pdocrud->addChart("chart1", "google-chart", array("'Task'" => "'Hour per day'","'Work'"=>8, "'Eat'"=>2, "'TV'"=>3, "'Gym'"=>4,"'Sleep'"=>9), "", "", "array",array("title" => "Employee Data","width"=>"500", "height"=>"500","google-chart-type"=>"LineChart"));
$pdocrud->addChart("chart2", "google-chart", array("'Task'" => "'Hour per day'","'Work'"=>8, "'Eat'"=>2, "'TV'"=>3, "'Gym'"=>4,"'Sleep'"=>9), "", "", "array",array("title" => "Employee Data","width"=>"500", "height"=>"500","google-chart-type"=>"BarChart"));
$pdocrud->addChart("chart3", "google-chart", array("'Task'" => "'Hour per day'","'Work'"=>8, "'Eat'"=>2, "'TV'"=>3, "'Gym'"=>4,"'Sleep'"=>9), "", "", "array",array("title" => "Employee Data","width"=>"500", "height"=>"500","google-chart-type"=>"PieChart"));
$pdocrud->addChart("chart4", "google-chart", array("'Task'" => "'Hour per day'","'Work'"=>8, "'Eat'"=>2, "'TV'"=>3, "'Gym'"=>4,"'Sleep'"=>9), "", "", "array",array("title" => "Employee Data","width"=>"500", "height"=>"500","pieHole"=> 0.4,"google-chart-type"=>"PieChart"));
$pdocrud->addChart("chart5", "google-chart", array("'Task'" => "'Hour per day'","'Work'"=>8, "'Eat'"=>2, "'TV'"=>3, "'Gym'"=>4,"'Sleep'"=>9), "", "", "array",array("title" => "Employee Data","width"=>"500", "height"=>"500","google-chart-type"=>"AreaChart"));
//
// EASY PIE CHARTS
// function defination of addChart($chartName, $chartType, $dataSource, $key, $val, $bind = "db", $param = array());
$pdocrud->addChart("chart1", "easypie", array("val" => 93), "", "", "array"); // PASS VALUE AS ARRAY
$pdocrud->addChart("chart2", "easypie", "employee", "Id", "Id as empId", "db", array("animate" => "2000")); // PASS VALUE AS DB TABLE
$pdocrud->addChart("chart3", "easypie", "select count(*) as val from employee where `City`!=''", "", "", "sql", array("animate" => "100")); // PASS VALUE AS SQL QUERY
//
// SPARKLINE CHARTS
$options_line = array("data-type"=>"line", "data-resize"=>"true", "data-height"=>"75", "data-width"=>"90%", "data-line-width"=>"1", "data-line-color"=>"#fff", "data-spot-color"=>"#fff", "data-fill-color"=>"", "data-highlight-line-color"=>"#fff", "data-spot-radius"=>"4");
$pdocrud->addChart("chart1","sparkline",array("val"=>93,34,34,34,533,434,213,23,23,23,23,23),"","","array",$options_line);
$options_bar = array("data-type"=>"bar", "data-resize"=>"true", "data-height"=>"75", "data-width"=>"90%", "data-line-width"=>"1", "data-line-color"=>"#fff", "data-spot-color"=>"#fff", "data-fill-color"=>"", "data-highlight-line-color"=>"#fff", "data-spot-radius"=>"4");
$pdocrud->addChart("chart2","sparkline",array("val"=>93,34,34,34,533,434,213,23,23,23,23,23),"","","array",$options_bar);
$options_pie = array("data-type"=>"pie", "data-resize"=>"true", "data-height"=>"75", "data-width"=>"90%", "data-line-width"=>"1", "data-line-color"=>"#fff", "data-spot-color"=>"#fff", "data-fill-color"=>"", "data-highlight-line-color"=>"#fff", "data-spot-radius"=>"4");
$pdocrud->addChart("chart3","sparkline", "employee", "Id", "Id as empId", "db",$options_pie);
$options_line = array("data-type"=>"line", "data-resize"=>"true", "data-height"=>"75", "data-width"=>"90%", "data-line-width"=>"1", "data-line-color"=>"#fff", "data-spot-color"=>"#fff", "data-fill-color"=>"", "data-highlight-line-color"=>"#fff", "data-spot-radius"=>"4");
$pdocrud->addChart("chart4","sparkline","SELECT Salary FROM `empsalary` ", "", "", "sql",$options_line);