Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. $this->load->model('raminten_db');
  2. $tampung = $this->raminten_db->getPenjualanAll();
  3.  
  4. // Load chart library
  5. $this->load->library('graph');
  6.  
  7. //-------------------------
  8. // Graph generation(first round)
  9. // Create the phplot argument
  10. $arr = array();
  11. foreach ($tampung as $row)
  12. {
  13.     $arr[] = array($row->kode_menu, $row->kuantitas);
  14. }
  15.  
  16. // Additional parameters, phplot key in the name of the method, set the value argument
  17.      $params = array('SetTitle' => 'Penjualan',// title
  18.        'SetPlotType' => 'points',// chart the type of area bars linepoints lines pie points squared stackedbars thinbarline
  19.        );
  20.  
  21.  
  22.     // Data and a set of parameters
  23.      $this->graph->setdata($arr,$params);
  24.     // Graph generation
  25.      $this->graph->draw();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement