<?php require '../lib/icons/GoogleChartIconNote.php'; $chart = new GoogleChartIconNote('Hello world'); $chart->setTitle('Example'); $chart->setTextColor('D01F3C'); if (isset($_GET['debug'])) { var_dump($chart->getQuery()); echo $chart->validate(); echo $chart->toHtml(); } else { header('Content-Type: image/png'); echo $chart; }
function current_version($version = '0.6') { $text = "Current version\n is " . $version; $chart = new GoogleChartIconNote($text); $chart->setTitle('Beta'); $chart->setTextColor('D01F3C'); return sprintf('<img src="%s" alt="%s" >', $chart->getUrl(), $text); }