basic3.php 1013 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. require_once 'bootstrap.php';
  3. //random data as X=>array of nested Y
  4. $data = array();
  5. for ($i = 0; $i <= 542; $i++) {
  6. $data[$i] = array(rand(0, 129), rand(0, 79), rand(0, 54), rand(0, 41), rand(0, 4));
  7. }
  8. //Custom dimensions
  9. $chartMancer->setImageWidth(1220);
  10. $chartMancer->setImageHeight(450);
  11. $chartMancer->setBarWidth(2);
  12. //Custom coloring
  13. $chartMancer->setBaseColor(array('r'=>32,'g'=>220,'b'=>40));
  14. $chartMancer->setBackGroundColor(array('r'=>0,'g'=>0,'b'=>0));
  15. $chartMancer->setGridColor(array('r'=>200,'g'=>220,'b'=>200));
  16. $chartMancer->setAxisColor(array('r'=>255,'g'=>255,'b'=>255));
  17. //Custom palette, more LSD expirence!
  18. $chartMancer->setPalette('ACID POWERED COLORS!');
  19. //Obviously title
  20. $chartMancer->setChartTitle('Custom chart title');
  21. //Appending data peak value to the chart
  22. $chartMancer->setDisplayPeakValue(true);
  23. //debug dataset and performance stats
  24. $chartMancer->setDebug(true);
  25. //getting our awesome chat
  26. $chartMancer->renderChart($data);