freekrai

freekrai does not currently provide support for this item.

20 comments found.

Cool! Bookmarked and appreciated =) Hehe I hadn’t bought anything on Envato until the PHP Scripts category came along =P

Looking cool.

What data do you need to create the graphs?

just table data in cvs/txt/xls format, upload to Google, and it generates the graph? or am I getting it all wrong?

Thanks

Thanks ponjoh :)

gariben, You put the data in a PHP array, and the class does the work of sending it to google, handling caching, etc.

Idea is that you just had to set up your array containing your data and the class does the rest.

It’s been working well on every project I’ve used it on, so I figured I’d let others make use of it too.

I also have a version that is purely javascript, minus the caching, just haven’t finished the documentation to upload it here yet.

Amazing work, has been planning to do this for envato but you beat me to it :P Looks really good though! Can see it being very useful on sites.

Is there a way to save the resulting graphic to your server? Or do you have to reference an image on Google’s server?

Thanks!

keithv, the file that is saved by the cacher function is the png file saved to your hard drive, I have saving as a .txt file and being read out via the cache system, but you can also have it save it straight as a png file.

Works great.

If you use godaddy hosting add php5 to the extentions and check inside the files for any php references.

@soremite, what sort of godaddy hosting account do you have?

I haven’t had a server there for a while (moved them to mediatemple and slicehost), but I’ve never had to add php5 to the extension before ever, and all my files were php5.

Hello freekrai,

Is it possible to have this script converted into a CakePHP component with minimal efforts?

For example, since you implemented caching in this script, will it be difficult to customize it so that the caching system complies to the file/folder-structure conventions used by CakePHP?

Thanks.

@Slepi, as it is now, can set in it’s own folder and be called by a CakePHP script, to convert it into a full CakePHP component would be a rewrite of pretty much the whole system, and then would only work for CakePHP.

In its current form, it can be used on any website that has PHP , and is not limited just to one framework, and I myself would rather leave it that way.

Hi

Great littel php snippet here, makes it so much simpler especailly things like the dimension and choosing colours.

I have a quiestion – How do you change the encoding? I asking becuase I have values taht are often over 100 adn I think simple encoding only goes up to 100 :-(

I’ve yet to try it with database results but I’m assuming that too will work like a charm…

I just got back from a vacation with my wife and daughter, so I wasn’t exactly able to do any development work. Catching up on stuff now, and then getting back to finishing what I started.

Any news bro? Been a while since I last asked I figured you might have it sorted by now?...

It’s in the update queue, should be available to you guys shortly

Cheers – whats the update queue?

I’ll just safely assume you didn’t go back and add the scaling options to the views.

I thought they got added, it’s been a hectic year. Let me check my code in the morning to see what version is on here.

has this been updated to take advantage of Google’s new interactive charts (e.g. more data about pie segment on click)?

Excellent plugin and I will buy the extended version now as it fits in my application that I sell nicely.

Quick question – Is it ready to use interactive charts as shown here: http://code.google.com/apis/charttools/docs/choosing.html

If not, could you help how I can integrate these charts in your code?

Another Q – How do I change values of Y axis which has value 1-100?

This doesn’t work :(

The cache files are corupt. Just tried the example and changed the url

The following errors appear in the cache files

400 Bad Request Your client has issued a malformed or illegal request. The parameter ‘chs’ must have a width of at least 1 pixel.

Check your logs, I’m actually using this plugin in several projects and never have a problem… I was actually using it before I listed it here, and just implemented it again last week on a new site with no problem

Check your logs, I’m actually using this plugin in several projects and never have a problem… I was actually using it before I listed it here, and just implemented it again last week on a new site with no problem

No errors in apache logs

This is the complete txt file from your example

s:1436:" 

<html><head>
<meta content="text/html;charset=utf-8" http-equiv="content-type" />
<title>400 Bad Request</title>
<style><!--
body {font-family: arial,sans-serif}
div.nav {margin-top: 1ex}
div.nav A {font-size: 10pt; font-family: arial,sans-serif}
span.nav {font-size: 10pt; font-family: arial,sans-serif; font-weight: bold}
div.nav A,span.big {font-size: 12pt; color: #0000cc}
div.nav A {font-size: 10pt; color: black}
A.l:link {color: #6f6f6f}
A.u:link {color: green}
//--></style>
<script><!--
var rc=400;
//-->
</script>
</head>
<body text="#000000" bgcolor="#ffffff">
<table cellspacing="0" border="0" width="100%" cellpadding="2"><tr><td nowrap rowspan="3" width="1%">
<b><font size="10" color="#0039b6" face="times">G</font><font size="10" color="#c41200" face="times">o</font><font size="10" color="#f3c518" face="times">o</font><font size="10" color="#0039b6" face="times">g</font><font size="10" color="#30a72f" face="times">l</font><font size="10" color="#c41200" face="times">e</font>&nbsp;&nbsp;</b>
</td><td>&nbsp;</td></tr>
<tr><td bgcolor="#3366cc"><font color="#ffffff" face="arial,sans-serif"><b>Error</b></font></td></tr>
<tr><td>&nbsp;</td></tr></table>
<blockquote>
<h1>Bad Request</h1>
Your client has issued a malformed or illegal request.
<ul>
<li>The parameter &#39;chs&#39; must have a width of at least 1 pixel.</li>
</ul>
<p>
</p></blockquote>
<table cellspacing="0" cellpadding="0" width="100%"><tr><td bgcolor="#3366cc"><img height="4" alt="" width="1" /></td></tr></table>
</body></html>
";

php 5.3.0 version

I’m using 5.3 on my sites, and not getting an error from google.

Message me from my profile page with a link to your page so I can see how you are sending it.

I see the problem now

In the class you have hardcoded the path /googlecharts/

$url = _GOOGLECHART_URL.”/cacher.php?stream=”.base64_encode($url);

Removing solves the problem :)

Does this plugin handle the creation of interactive charts?

It is possible for you to write the code to create the PHP array from CSV and XML?

by
by
by
by
by
by