Google Charts
Google have released an new API to enable embedded charts on your web site, the article featuring this is here.
I have embedded this in my media server reporting package, and I am amazed at the speed of it.
My charts that took 20 seconds in php with my under-powered server now take less than a second.
Consequently, a new release 1.08 is now available for download.
Addendum 08-Dec-2007:
After closer inspection, the values passed to the API must be between 0 and 100.
Clearly this causes me a few issues, especially when dealing with larger numbers
After some lateral thinking, I realised that I had to normalise the data. So I have written this php function
function normaliseData($data, $maxScale)
{
$value="";
// Normalize values to 0-100 for Chart API
foreach (explode("," , $data)as$v)
{
$v = ((($v 1.0000) / ($maxScale 1.0000)) * 100);
$value .= "$v". ",";
}
$value = substr($value,0,strlen($value)-1);
return$value;
}
When integrated with Firefly it looks cool see this Example screenshot
I have embedded this in my media server reporting package, and I am amazed at the speed of it.
My charts that took 20 seconds in php with my under-powered server now take less than a second.
Consequently, a new release 1.08 is now available for download.
Addendum 08-Dec-2007:
After closer inspection, the values passed to the API must be between 0 and 100.
Clearly this causes me a few issues, especially when dealing with larger numbers
After some lateral thinking, I realised that I had to normalise the data. So I have written this php function
function normaliseData($data, $maxScale)
{
$value="";
// Normalize values to 0-100 for Chart API
foreach (explode("," , $data)as$v)
{
$v = ((($v 1.0000) / ($maxScale 1.0000)) * 100);
$value .= "$v". ",";
}
$value = substr($value,0,strlen($value)-1);
return$value;
}
When integrated with Firefly it looks cool see this Example screenshot















