CodeCanyon

Google Charts Plugin

  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 1 and 9 items
  • Sweden
  • Referred between 10 and 49 users
ponjoh says

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

Posted 3 years ago
  • Has been a member for 3-4 years
  • Bought between 10 and 49 items
  • United States
  • Referred between 200 and 499 users
gariben says

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

Posted 3 years ago
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Canada
  • Referred between 1 and 9 users
freekrai says
Author

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.

Posted 3 years ago
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
Twade says

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.

Posted 3 years ago
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
  • United States
keithv says

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!

Posted 3 years ago
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Canada
  • Referred between 1 and 9 users
freekrai says
Author

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.

Posted 3 years ago
  • Has been a member for 3-4 years
  • Bought between 100 and 499 items
  • Japan
soremite says
Purchased

Works great.

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

Posted 3 years ago
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Canada
  • Referred between 1 and 9 users
freekrai says
Author

@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.

Posted 3 years ago
  • Has been a member for 2-3 years
  • Bought between 1 and 9 items
  • Indonesia
Slepi says

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.

Posted 3 years ago
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Canada
  • Referred between 1 and 9 users
freekrai says
Author

@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.

Posted 3 years ago
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • United Kingdom
  • Referred between 1 and 9 users
jeffeatworld says
Purchased

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…

Posted 3 years ago
Author
freekrai freekrai replied

I’ve had some users on DBStract with pretty long values.

I’ve had it handling over 100 characters pretty easily. base64_encode’s only limitation that I’ve run into is with IE6 , where it could only handle up to 2000 characters.

You can change it to something else, but base64 definitely handles more than 100 characters.

Posted 3 years ago
Purchased
jeffeatworld jeffeatworld replied

Cheers, taking a real basic example I literally just changed the first entry in $dataMultiple which is for Feb 2008 > IE7 from 22 to 200 to see it would scale – that’s what I’m talking about.

I read this page – http://code.google.com/apis/chart/formats.html#scaled_values

I’m wondering how to adjust the script for scaling?

Posted 3 years ago
Author
freekrai freekrai replied

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

Posted 2 years ago
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • United Kingdom
  • Referred between 1 and 9 users
jeffeatworld says
Purchased

Cheers – whats the update queue?

Posted 2 years ago
  • Has been a member for 1-2 years
  • Bought between 10 and 49 items
bafadam says
Purchased

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

Posted 2 years ago
Author
freekrai freekrai replied

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.

Posted 2 years ago
  • Has been a member for 2-3 years
  • Bought between 50 and 99 items
  • United Kingdom
cfoinfo says
Purchased

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

Posted 1 year ago
  • Has been a member for 1-2 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 10 and 49 items
  • United States
  • Referred between 1 and 9 users
sitejerk says
Purchased

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?

Posted 11 months ago
  • Has been a member for 1-2 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 10 and 49 items
  • United States
  • Referred between 1 and 9 users
sitejerk says
Purchased

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

Posted 11 months ago
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Netherlands
  • Referred between 10 and 49 users
ceasar says
Purchased

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.

Posted 11 months ago
Author
freekrai freekrai replied

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

Posted 11 months ago
Author
freekrai freekrai replied

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

Posted 11 months ago
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Netherlands
  • Referred between 10 and 49 users
ceasar says
Purchased

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

Posted 11 months ago
Author
freekrai freekrai replied

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.

Posted 11 months ago
Purchased
ceasar ceasar replied

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 :)

Posted 11 months ago

You must sign in or sign up to purchase this item.

$5Regular Licence

$5

Regular Licence a website (commercial, personal, client), or intranet site project - Details

$25Extended Licence

$25

Extended Licence a website template for sale (including on ThemeForest or ActiveDen) - Details

87 Purchases 18 Comments

Buyer Rating
12345 ( 16 ratings )
freekrai

freekrai

  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Canada
  • Referred between 1 and 9 users
View Portfolio
Created 23 June 09
Compatible Browsers FireFox 2, FireFox 3, IE6, IE7, Safari
Software Version PHP 5.x
Software Framework N/A
Files Included PHP
by
by
by
by
by