Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->load->model('raminten_db');
- $tampung = $this->raminten_db->getPenjualanAll();
- // Load chart library
- $this->load->library('graph');
- //-------------------------
- // Graph generation(first round)
- // Create the phplot argument
- $arr = array();
- foreach ($tampung as $row)
- {
- $arr[] = array($row->kode_menu, $row->kuantitas);
- }
- // Additional parameters, phplot key in the name of the method, set the value argument
- $params = array('SetTitle' => 'Penjualan',// title
- 'SetPlotType' => 'points',// chart the type of area bars linepoints lines pie points squared stackedbars thinbarline
- );
- // Data and a set of parameters
- $this->graph->setdata($arr,$params);
- // Graph generation
- $this->graph->draw();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement