basic7.php 436 B

123456789101112131415161718
  1. <?php
  2. require_once 'bootstrap.php';
  3. //random data as X=>array of Y
  4. $data = array();
  5. for ($i = 0; $i <= 20; $i++) {
  6. $data[$i] = array(rand(0, 129), rand(0, 79), rand(0, 54), rand(0, 4));
  7. }
  8. $chartMancer->setChartTitle('Chart embedded as data URI scheme');
  9. $chartMancer->setImageWidth(1200);
  10. $chartMancer->setImageHeight(400);
  11. $base64Chart = $chartMancer->renderChart($data, 'base64html');
  12. print('<img src="' . $base64Chart . '">');