I want to pass value from my controller's function to be processed in view as a chart. But I had a problem with passing the value data.
I've tried to pass the data but it returns null.
Here it is the data that i want to pass through view :
0: {total: "12", person: "[email protected]", activity: "Request Config Files"} activity: "Request Config Files" person: "[email protected]" total: "12"
and this is my view:
$("#btn_ixt_filter").click(function(){
// get_ixt_report("<?php echo base_url();?>index.php/Dashboard/ict_report/" + star_date + "-" + end_date);
$.ajax({
url:"<?php echo base_url(); ?>Dashboard/ict_report/" + star_date +"-"+ end_date,
method: "POST",
dataType : "json",
data: {
'category' : $("#categoryField").val(),
'selection': $("#selectionField").val(),
'counter' : $("#counterField").val(),
'group_by' : $("#groupbyField").val(),
'userid' : $("#useridField").val(),
'role' : $("#roleField").val(),
'customer' : $("#customerField").val(),
'project' : $("#projectField").val(),
'combiner' : $("#combinerField").val(),
},
success:function(data){
$('#result').html(data);
$total.html(total_ticket);
$activity.html(activity);
}
})
event.preventDefault();
The question is how to get these data, total, person, and activity. Thanks