See the code here

Simple Bar Chart (Database)


// you can setup your own local MySQL database too. There is plenty of documentation online. Give it a try.
$host = "172.18.8.24";
$port = 3306;
$username = "zcdemo01user";
$password = "whateveryouwant";
$db = "phpdemo_db
$host = "127.0.0.1";
$port = 8889;
$username = "root";
$password = "root";
$db = "mydb";

$myQuery  = "SELECT date, unitsSold FROM feed_data";
$myQuery2 = "SELECT date, unitsSold AS 'Units', expected AS 'Expected', anotherMetric AS 'Competitor' FROM feed_data";
$myQuery3 = "SELECT unitsSold AS 'Units', expected AS 'Expected', anotherMetric AS 'Competitor' FROM feed_data";

// ################################ CHART 1 ################################

// This chart will use data pulled from our database
$zc = new ZC("myChart", "bar");

$zc->connect($host, $port, $username, $password, $db);
$data = $zc->query($myQuery2, true);
$zc->closeConnection();

$zc->setSeriesData([0,1,2,3,4,5,6,7]);
$zc->setSeriesText($zc->getFieldNames());
$zc->render();

Simple Area Chart (Hardcoded)

Decent Line Chart (Level 1 Functions)

Beautiful Chord Chart (Level 2 Function)

Powerfull Mixed Chart (Level 3 Function)