我有生成我的图表的代码,我想显示value_sekolah中的5个最大数据,我必须如何更改代码?
function index()
{
if($this->processData["is_view"] == false) { show_404("forbidden access ".$this->page_name, false); }
// generate chart
$param['multiple'] = false;
$param['displayTitle'] = $this->title;
$param['displayName'] = 'nama_sekolah';
$param['displayValue'] = 'value_sekolah';
$this->tbl_psb_calon_siswa->str_usedFields = "asal_sekolah as nama_sekolah,count(pk_calon_siswa) as value_sekolah";
$this->tbl_psb_calon_siswa->arrStr_groupBy = "asal_sekolah";
$param['result'] = $this->tbl_psb_calon_siswa->selectData();
$chart = $this->generateChart($param);
$arr_controller['chart_canvas'] = $chart['canvas'];
$arr_controller['chart_js'] = $chart['chart'];
$this->load->view("templates/grafik_template",$arr_controller);
}