Skip to content

Instantly share code, notes, and snippets.

@AntoineAugusti
Last active December 29, 2015 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntoineAugusti/7710176 to your computer and use it in GitHub Desktop.
Save AntoineAugusti/7710176 to your computer and use it in GitHub Desktop.
<?php
$BarChart = new Chart('bar', 'examplebar');
$BarChart->set('data', array(array(2, 10, 16, 30, 42), array(42, 30, 16, 10, 2)));
$BarChart->set('legend', array('01/01', '01/02', '01/03', '01/04', '01/05'));
// We don't want to use the x-axis for the legend so we specify the name of each dataset
$BarChart->set('legendData', array('Annie', 'Marc'));
$BarChart->set('displayLegend', true);
echo $BarChart->returnFullHTML();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment